The y-intercept may be found using the formula b = Σ y − m Σ x 3 b = Σ y − m Σ x 3, which means the quantity of the sum of the median y values minus the slope times the sum of the median x values divided by three. Substituting the median x and y values from the first and third groups gives m = 174 − 143 71 − 66.5, m = 174 − 143 71 − 66.5, which simplifies to m ≈ 6.9. The slope can be calculated using the formula m − y 2 − y 1 x 2 − x 1. This allows us to find the slope and y-intercept of the median–median line. When this is completed, we can write the ordered pairs for the median values. Table 12.5 shows the correct ordering of the x values but does not show a reordering of the y values. However, to find the median, we first must rearrange the y values in each group from the least value to the greatest value. The corresponding y values are then recorded. We must remember first to put the x values in ascending order. The first and third groups have the same number of x values. We first divide our scores into three groups of approximately equal numbers of x values per group. If multiple data points have the same y values, then they are listed in order from least to greatest y (see data values where x = 71). Remember that this is the data from Example 12.6 after the ordered pairs have been listed by ordering x values. Let’s first find the line of best fit for the relationship between the third exam score and the final exam score using the median–median line approach.
We can obtain a line of best fit using either the median–median line approach or by calculating the least-squares regression line.
If each of you were to fit a line by eye, you would draw different lines. We will plot a regression line that best fits the data. The third exam score, x, is the independent variable, and the final exam score, y, is the dependent variable.