Least-squares regression line

    Least-Squares Regression Line (LSRL)

    The Least-Squares Regression Line (LSRL) is a mathematical model used in statistics to describe the relationship between two quantitative variables. Specifically, it's a straight line that best fits the data points in a scatterplot by minimizing the sum of the squares of the vertical distances from each data point to the line. This line is often denoted as \( \hat{y} = a + bx \), where \( \hat{y} \) (read as 'y-hat') is the predicted value of the response variable, \( x \) is the explanatory variable, \( a \) is the y-intercept, and \( b \) is the slope.

    Interpreting the Slope and Y-intercept

    • Slope (b): The slope represents the predicted change in the response variable \( \hat{y} \) for every one-unit increase in the explanatory variable \( x \). For example, if we are predicting a student's final exam score (y) based on hours studied (x), a slope of 5 means that for every additional hour studied, the predicted final exam score increases by 5 points.
    • Y-intercept (a): The y-intercept represents the predicted value of the response variable \( \hat{y} \) when the explanatory variable \( x \) is 0. It's crucial to consider if a y-intercept of 0 for the explanatory variable is meaningful in the context of the problem. For instance, if predicting house price based on square footage, a y-intercept represents the predicted price of a house with 0 square feet, which is usually not practically interpretable.

    Calculating the LSRL

    While technology (graphing calculators or statistical software) is typically used on the AP exam to find the LSRL, understanding the formulas provides insight into its construction:

    • Slope (b): \( b = r \frac{s_y}{s_x} \)
      Where \( r \) is the correlation coefficient, \( s_y \) is the standard deviation of the response variable, and \( s_x \) is the standard deviation of the explanatory variable.
    • Y-intercept (a): \( a = \bar{y} - b\bar{x} \)
      Where \( \bar{y} \) is the mean of the response variable and \( \bar{x} \) is the mean of the explanatory variable.

    A key property of the LSRL is that it always passes through the point \( (\bar{x}, \bar{y}) \).

    Residuals

    A residual is the difference between an observed value of the response variable and the value predicted by the regression line. It is calculated as: \( \text{Residual} = y - \hat{y} \). Positive residuals indicate that the model underpredicted the observed value, while negative residuals indicate an overprediction. A residual plot, which plots the residuals against the explanatory variable (or predicted values), is used to assess the appropriateness of the linear model. A random scatter of points in the residual plot suggests that a linear model is appropriate, whereas a pattern (e.g., a curve) indicates that a linear model may not be the best fit.

    Extrapolation

    Extrapolation is the use of a regression line to predict values of the response variable for explanatory variable values that are outside the range of the observed data. This practice is often unreliable and can lead to inaccurate predictions because the relationship observed within the range of the data may not hold true beyond it. For example, predicting the height of a 60-year-old based on a model built for children aged 2-10 would be extrapolation and likely inaccurate.

    Practice questions

    1

    What does the slope of the least-squares regression line represent in the context of predicting a car's fuel efficiency (miles per gallon) based on its weight (in pounds)?

    2

    If a residual for a particular data point is positive, what does this imply about the LSRL's prediction for that observation?

    3

    Why is it generally cautioned against using the least-squares regression line for extrapolation?

    4

    A study found the LSRL for predicting a student's score on a final exam (y) based on the number of hours they studied (x) to be \( \hat{y} = 60 + 5x \). What is the practical interpretation of the y-intercept in this context?

    Practice more free →

    Free AP4U account — unlimited practice, AI grader, and progress tracking.

    Canonical: https://apforu.com/ap/statistics/unit-2-exploring-two-variable-data/least-squares-regression-line