1 / 9

Linear fits

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?. 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.

Download Presentation

Linear fits

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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 c2 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 yth = A + Bx + Cx2 + … is linear in the parameters (A,B,C,…). So let’s minimize c2 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. 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 c2 w.r.t. A and B, and set them both to 0 simultaneously. Minimizing c2 Suppose we have data (xi, yi,si) and we want to fit the data to a line: y = A + Bx. First we calculate c2:

  4. Minimizing c2, 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 When sigma_i -> sigma Does not depend on y_i. If ignoring errors on x_i, this is just a constant

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

  8. D 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

More Related