M reflects that single datapoint and this colors all

Info icon This preview shows pages 50–53. Sign up to view the full content.

View Full Document Right Arrow Icon
m reflects that single datapoint and this colors all the derived errors. This isn’t fixed by using the reduced chi-square hatwider χ 2 , which will be nowhere near unity. Replacing the sum of residuals squared by the ARS seems reasonable until you realize that the MARS coefficient values are completely independent of the residuals—yet, you’d expect the errors to be smaller for better data! A similar concern holds for replacing the ARS by its weighted counterpart. My current—but untested—recommendation is this. Suppose you have M datapoints. Con- ventionally, we define the +1 σ dispersion by the boundary where 34 . 2% of the points lie outside the limit, and ditto for the 1 σ boundary. These boundaries are defined only by the number of daapoints outside the boundaries, not how big the residuals are. We can do the same here. Define the sample variance not by the sum-of-squares of residuals as in equation 3.1, but rather by how far away from the MARS fitted line you need to go before 34 . 2% of the points lie outside the plus-and-minus boundaries. Then use this fake variance in equation 3.7. 13.5. Pedantic Comment: The MARS and the Double-sided Exponential pdf In fact, there is a specific pdf for which the MARS is the theoretically correct solution: the double-sided exponential. Here the pdf of the measured datapoints is p y m ) = e -| Δ y m | m 2 σ m . (13.7)
Image of page 50

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
– 51 – where, again, Δ y m = ( y m a · f ( x m )). For this, the logarithm of the likelihood function is (we exclude the term involving log Π M - 1 m =0 1 σ m for simplicity) L y m ) = log( L y m ) ) = M - 1 summationdisplay m =0 bracketleftbigg | y m a · f ( x m )) | σ m bracketrightbigg . (13.8a) The absolute value signs are horrible to deal with, so we rewrite this as L y m ) ) = summationdisplay Δ y m > 0 y m a · f ( x m ) σ m summationdisplay Δ y m < 0 y m a · f ( x m ) σ m . (13.8b) Now we take the derivative of L with respect to a n and set it equal to zero to find the maximum. This gives dL da n = summationdisplay Δ y> 0 f n ( x m ) σ m summationdisplay Δ y< 0 f n ( x m ) σ m = 0 , (13.9) which is the MARS fit. 13.6. IDL’s related resources IDL provides the median function, which uses sorting and is much faster than our general weighted-MARS technique—but of course cannot deal with functional forms. IDL also provides ladfit (“least absolute deviation fit”), which does a weighted-MARS fit for a straight line. My routine, polyfit_median , does a weighted-MARS fit for an arbitrary polynomial; it is slightly less accurate as ladfit for an odd number of points but is slightly better for an even number.
Image of page 51
– 52 – 14. FITTING WHEN MORE THAN ONE MEASURED PARAMETERS HAVE UNCERTAINTIES We’ve mentioned that one of the essential assumptions of least squares is that the independent variables are known with high precision and the errors occur only in the measured data. Suppose you’re fitting two variables, t and y , as in equation 0.1. This essential assumption means that t is known with high precision and all the uncertainty is in y , and you are minimizing the squares of the residuals in the y -direction only. If
Image of page 52

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 53
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern