Presentation is loading. Please wait.

Presentation is loading. Please wait.

Linear fits You know how to use the solver to minimize the chi^2 to do linear fits… Where do the errors on the slope and intercept come from?

Similar presentations


Presentation on theme: "Linear fits You know how to use the solver to minimize the chi^2 to do linear fits… Where do the errors on the slope and intercept come from?"— Presentation transcript:

1 Linear fits You know how to use the solver to minimize the chi^2 to do linear fits… Where do the errors on the slope and intercept come from?

2 Linear Fits So far, in order to do a linear fit, we have used the solver to find the values of m and b that minimize chi^2 When the theory has only a linear dependence on its parameters, then the minimum in  2 can be determined analytically. This is why it’s very nice to put data into a form where it can be described by a theory that depends linearly on its parameters. e.g., any polynomial function such as y th = A + Bx + Cx 2 + … is linear in the parameters (A,B,C,…). So let’s minimize c 2 for a simple polynomial: a straight line theory. Using this analytically expression, its also straight-forward to derive an analytical expression for the errors on the slope and intercept.

3 Minimizing  2 Suppose we have data (x i, y i,  i ) and we want to fit the data to a line: y = A + Bx. First we calculate  2 : Then we minimize it with respect to the parameters of the theory, A and B. To find the best values of both A and B, we need to carry out this minimization simultaneously. So we take the partial derivative of  2 w.r.t. A and B, and set them both to 0 simultaneously.

4 Minimizing  2, cont’d. Here are our two equations, rearranged. Note that all the quantities in parentheses can be computed directly from our data, so they are just numbers. Using linear algebra or matrix techniques, it is simple to invert these equations to find A and B. I won’t do it here, but will just write the answer. The answer is:

5 Error on Slope and Intercept Our calculated value for A and B depend on the measured values x_i, y_i. We can therefore get the errors on A and B by using the standard propagation of errors formula on our formulas for these quantities. Let’s do this for the intercept. The derivation for the error on the slope is parallel. Let’s also just do this for the simple case when the errors on x are small (negligible) and the errors on the y’s are all the same (sigma_i -> sigma)

6 Error on Intercept Does not depend on y_i. If ignoring errors on x_i, this is just a constant When sigma_i -> sigma

7 Error on Intercept If the sigma_i’s are all the same (sigma), this becomes

8 Error on intercept 

9 Error on Intercept Look in your linear fitter spread sheet and you’ll see this linked to the error on intercept sheet


Download ppt "Linear fits You know how to use the solver to minimize the chi^2 to do linear fits… Where do the errors on the slope and intercept come from?"

Similar presentations


Ads by Google