In this case the residual δ y m y m y mars where y

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

View Full Document Right Arrow Icon
When we take the median of a bunch of points that’s like taking a biased average of the points. In this case the residual Δ y m = y m y MARS , where y MARS is the derived median value. Normally we take the median by finding that datapoint for which the number of positive residuals is equal to the number of negative ones. Here we take a more general approach. First, write the ARS as a function of the a trial value y ARS ; we will find that the median value is y MARS , the one that gives the minimum of the ARS. So write ARS ( y ARS ) = M - 1 summationdisplay m =0 | ( y m y ARS ) | = M - 1 summationdisplay m =0 | Δ y m | (13.1a) The absolute value signs are horrible to deal with, so we rewrite this as ARS ( y ARS ) = summationdisplay Δ y m > 0 ( y m y ARS ) summationdisplay Δ y m < 0 ( y m y ARS ) (13.1b) To find the minimum of the ARS we take its the derivative with respect to y ARS and set it equal to zero. The derivative of each term is equal to 1, so we get dARS dy ARS = summationdisplay Δ y> 0 1 summationdisplay Δ y< 0 1 = M y > 0) M y < 0) (13.2) Setting this equal to zero requires choosing M y > 0) = M y < 0). In plain English: y MARS is that value of y ARS which provides equal numbers of positive and negative residuals. This is the very definition of the median! Thus, for the “average” of a bunch of numbers, the median is the same as the MARS. The median is defined unambiguously only if M is odd: the median datapoint then has equal numbers with positive as negative residuals. If M is even, then the median lies anywhere between the two middle points. Similarly, the ARS doesn’t change between the two middle points because as you increase the residual from one point the residual from the other decreases by an identical amount, so the sum of the absolute values doesn’t change. 13.1.2. For an arbitrary function, e.g. the slope—it’s a weighted MARS Things change if we are fitting a function other than the “average” (i.e., the standard median). Suppose, for example, that we want to fit the slope s using MARS. Then y m = s MARS x m so the
Image of page 47

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

View Full Document Right Arrow Icon
– 48 – analog to equation 13.1a is ARS ( s ARS ) = M - 1 summationdisplay m =0 | ( y m x m s ARS ) | = M - 1 summationdisplay m =0 | Δ y m | (13.3) Carrying out the same steps, the analog for equation 13.2 becomes dARS ds ARS = summationdisplay Δ y> 0 x m summationdisplay Δ y< 0 x m (13.4) This is no longer the median. Rather, it’s a weighted ARS , or WARS. In calculating the ARS, each datapoint is weighted by its x value. This weighting is exactly the same weighting that would occur in a standard least-squares fit for the slope. To show this, carry out the steps in equations 12.1 for a single function f ( x ) = sx . This makes sense because points with large x are intrinsically able to define the slope better than points with small x . Fig. 13.1.— Illustrating the difference between the median and weighted MARS fits for a slope.
Image of page 48
– 49 – Let’s explore the effect of this weeighted MARS by considering a simple example, shown in Figure 13.1. Five datapoints are shown with black circles. The dashed line is the median fit; there are two points above and two below the line, so it is the true median. But this fit is unsatisfying
Image of page 49

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

View Full Document Right Arrow Icon
Image of page 50
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