Главная » Просмотр файлов » Thompson - Computing for Scientists and Engineers

Thompson - Computing for Scientists and Engineers (523188), страница 39

Файл №523188 Thompson - Computing for Scientists and Engineers (Thompson - Computing for Scientists and Engineers) 39 страницаThompson - Computing for Scientists and Engineers (523188) страница 392013-09-15СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 39)

weights (wyj), and fit values (Yj) for the least-squares normalization example discussed in the text.The fitting function used in Table 6.2 is Yj = 1 + j. In order to control theanalysis, the data are generated asin terms of the errorsI generated these errors by using the Chapel Hill telephone directory to choose random numbers as the least significant digit of six directory entries, while their signswere chosen from six other entries and assigned as + for digits from 0 to 4 and —for digits from 5 to 9.

The data weights, wyj, are 100 times the reciprocal squaresof the errors.If the data are normalized to the fit, Least Squares Normalization producesa normalization factor Nd = 0.36364 (l/Nd = 2.7500) and a minimum objectivefunction= 99.78. Alternatively, if the fit is normalized to the data, then theleast-squares normalization factor is Nf = 2.1418 with= 58.77. In the absence of errors we should obtain exactly Nd = 0.5, Nf = 2, and zero for the objective functions.

The data, errors, and fits are shown in Figure 6.5.Strictly speaking, when displaying renormalized values in Figure 6.5 we shouldapply the factor Nd to the data, but it is easier to display the comparison of data normalized to fit versus fit normalized to data by dividing the fit by Nd, as shown in thefigure. The important point is that the two methods of estimating normalization factors produce normalizations that differ from each other by about 25%. Note that thenormalization factors would not change if we changed all the errors (and therefore allthe weights) by the same factor.208LEAST-SQUARES ANALYSIS OF DATAFIGURE 6.5 Least-squares normalization factors for the data in Table 6.2.

The solid line is thefit before normalization. The dashed line is the best fit after the fit has been normalized to the data.The dotted line compares the scaled fit after the data have been normalized to the fit, but the normalization factor Nd has been divided into the data to simplify comparison.Now that you see how the method is applied, how about trying it yourself?Exercise 6.20(a) Code program Least Squares Normalization, adapting the input andoutput functions to be convenient for your computing environment.(b) Test all the program control options (by N and choice ) for correct termination of all the whi1e loops.(c) Check the program using the tests for correctness suggested above.(d) Use the data given in Table 6.2 to compare your normalization-factor valueswith those given above.

Display the data and fits as in Figure 6.5. nWith the understanding that you have gained from this analysis of least-squaresnormalization factors, and with the function NormObj now being available for usein your other data-fitting programs, you have one more useful and versatile tool forcomparing data and fits by least-squares methods.6.5 LOGARITHMIC TRANSFORMATIONSAND PARAMETER BIASESWe now turn to another topic in least-squares analysis, namely an example of the effects of transforming variables. In order to obtain a tractable solution, we revert tothe conventional approximation that the x data are known exactly but the y values areimprecise.

The transformation that we consider is that of taking logarithms in orderto linearize an exponential relationship.6.5LOGARITHMIC TRANSFORMATIONS AND PARAMETER BIASES209Exponential growth and decay are ubiquitous in the natural sciences, but by thesimple device of taking logarithms we can reduce a highly nonlinear problem to alinear one, from which estimates of the slope (exponent) and intercept (pre-exponential) can be readily obtained by using a linear-least-squares fitting program. Thisseemingly innocuous procedure of taking logs usually results in biased values of fitting parameters, but we show now that such biases can often be simply corrected.This problem is mentioned but not solved in, for example, Taylor’s introduction toerror analysis.The origin of biasA moment of reflection will show why biasing occurs in logarithmic transformations.

Consider the example of data that range-from l/M through unity up to M, asshown in Figure 6.6.FIGURE 6.6 The origin of bias in logarithmic transformations. The top line shows the realline from 0 to M, with M = 4. Under logarithmic transformation the interval from l/ M to 1 mapsinto the same length as the interval from 1 to M.For large M there are two subranges of data in Figure 6.6, having lengths roughlyunity and M, respectively. After taking (natural) logs the subranges are each oflength In(M), so that the smallest values of the original data have been unnaturallyextended relative to the larger values.Exercise 6.2 1Take any set of data (real or fictitious) in which the dependent variables, y (x),are approximately exponentially related to the independent variables, x, and areroughly equally spaced.

The range of the y values should span at least twodecades. First make a linear plot of y against x, then plot 1n (y) against x.Verify that the plots of the original and transformed independent variables differas just described. nThe effect of the logarithmic transformation is therefore to make derived parameter estimates different from the true values. Although such parameter bias is evident,textbooks on statistical and data-analysis methods usually do not even mention it.Here we make an analysis that is realistic and that allows simple corrections for parameter bias to be made in many situations of interest. We also suggest a Monte Carlosimulation exercise by which you may confirm the analytical estimates.210LEAST-SQUARES ANALYSIS OF DATAProbability analysis for biasSuppose that the fitting function, Y, is defined in terms of the independent variable,x, by the exponential relation(6.54)in which the fitting parameters are the pre-exponential A and the exponent B (positive for growth, negative for decay).

Suppose that the data to be described by thefunction in (6.54) are y(xj); that is,(6.55)in which ej is the unknown random error for the jth datum. Only random errors,rather than systematic errors also, are assumed to be present. Under logarithmictransformation (6.54) and (6.55) result in(6.56)If the errors ej were ignored, this would be a linear relation between the transformeddata and the independent variable values xj. If (6.54) is substituted into (6.56), Aand B appear in a very complicated nonlinear way that prevents the use of linear leastsquares methods.To procede requires an error model (Sections 6.1, 6.3) for the dependence ofthe distribution of the errors ej upon the xj.

The only possibility in (6.56) that allows straightforward estimates of bias and that is independent of the xj is to assumeproportional random errors, that is,(6.57)in which is the same standard deviation of ej/Y (x j ) at each j. The notationP(0,Ij) is to be interpreted as follows. In statistics P(0,I) denotes an independentprobability distribution, P, having zero mean and unity standard deviation at each j.Since I is a unit vector, Ij = 1 for all j, and P(0,Ij) is a random choice fromP(0,I) for each j. For example, the Gaussian distribution in Figure 6.1 has(6.58)where vj is a random variable parametrizing the distribution of errors at each datapoint. Proportional errors (constant percentage errors from point to point) are common in many scientific measurements by appropriate design of the experiment.

Exceptions to proportional errors occur in radioactivity measurements in nuclear physics and photon counting in astronomy and other fields, both of which have Poissonstatistics with square-root errorsunless counting intervals are steadilyincreased to compensate count rates that decrease with time. From the connection6.5LOGARITHMIC TRANSFORMATIONS AND PARAMETER BIASES211between error models and weighting models (Sections 6.1 and 6.3), note that proportional errors correspondingly imply inverse-squared proportional weights.Before (6.56) and (6.57) can be used for fitting, we have to take expectationvalues, E in statistical nomenclature, on both sides, corresponding to many repeatedmeasurements of each datum.

This concept is clearly discussed in Chapter 6.3 ofSnell’s introductory-level book on probability We assume that each xj is precise,so that we obtain(6.59)in which the biased estimate of the intercept, Ab, is given by(6.60)The use of I rather than Ij is a reminder that the expectation value is to be taken overall the data. Even when only a single set of observations is available, it is still mostappropriate to correct the bias in the estimate of A by using (6.60) in the way described below. An estimate of the fractional standard deviation can be obtained experimentally by choosing a representative xj and making repeated measurements ofyj,. Computationally, an error estimate can be obtained from the standard deviationof the least-squares fit.Equation (6.60) shows that a straightforward least-squares fit of data transformed logarithmically gives us a biased estimate for A, namely Ab, and that theamount of bias depends both upon the size of the errorand on its distribution(P) but, most important, not at all on the xj.

Характеристики

Тип файла
PDF-файл
Размер
4,66 Mb
Тип материала
Учебное заведение
Неизвестно

Список файлов книги

Свежие статьи
Популярно сейчас
Как Вы думаете, сколько людей до Вас делали точно такое же задание? 99% студентов выполняют точно такие же задания, как и их предшественники год назад. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6358
Авторов
на СтудИзбе
311
Средний доход
с одного платного файла
Обучение Подробнее