PracticeVideosBlogFlashcards

7.2 Bivariate Data, Scatterplots, Correlation & Linear Regression

Key Takeaways

  • Bivariate data analysis explores relationships between explanatory (x) and response (y) variables across direction, form, strength, and unusual departures on a scatterplot.

  • The Pearson correlation coefficient r measures the strength and direction of linear association only; it is dimensionless, bounded by [-1, 1], invariant under positive linear transformations, and non-resistant to outliers.

  • The Least-Squares Regression Line (LSRL) ŷ = b₀ + b₁x minimizes the sum of squared vertical residuals Σeᵢ², with slope b₁ = r(s_y / s_x) and intercept b₀ = ȳ - b₁x̄, guaranteeing that the line passes through the centroid (x̄, ȳ).

  • The coefficient of determination r² quantifies the proportion of total variation in the response variable y that is explained by the linear relationship with the explanatory variable x.

  • Residual plots (eᵢ vs xᵢ or ŷᵢ) assess model adequacy: random scatter indicates linearity and homoscedasticity, curvature indicates model inadequacy, and fanning indicates heteroscedasticity; influential points with high leverage can drastically distort regression parameters.

Last updated: September 2026

7.2 Bivariate Data, Scatterplots, Correlation & Linear Regression

Investigating relationships between two quantitative variables is a cornerstone of secondary mathematics education. Under the NBPTS standards, accomplished teachers guide students from informal visual impressions of scatterplots to rigorous algebraic and statistical modeling. This involves understanding the mathematical mechanisms governing the Pearson correlation coefficient rr, deriving the least-squares regression line (LSRL), evaluating model assumptions via residual plots, and guarding against the pervasive traps of confounding, extrapolation, and misinterpreting influential observations.


1. Scatterplots & Characterizing Bivariate Associations

A scatterplot displays bivariate quantitative data (xi,yi)(x_i, y_i) on a Cartesian coordinate plane. Convention assigns:

  • Explanatory Variable (xx, Independent/Predictor): Plotted along the horizontal axis; hypothesized to explain, predict, or influence changes in the response.
  • Response Variable (yy, Dependent/Criterion): Plotted along the vertical axis; measures the outcome of interest.

Four Essential Descriptors of Bivariate Data

When describing a scatterplot, secondary students must systematically address four key characteristics:

  1. Direction: A positive association indicates that above-average values of xx tend to accompany above-average values of yy; a negative association indicates that above-average values of xx accompany below-average values of yy.
  2. Form: Linear, curvilinear (quadratic, exponential, logarithmic), or clustered into distinct subgroups.
  3. Strength: The degree of adherence of the points to the underlying form (strong, moderate, or weak).
  4. Unusual Features: Outliers, influential points, high-leverage points, or pronounced gaps.

2. Pearson Product-Moment Correlation Coefficient (rr)

The Pearson correlation coefficient rr provides an objective, standardized metric of the strength and direction of a linear relationship between two quantitative variables.

Mathematical Formulation

For nn paired observations (x1,y1),(x2,y2),…,(xn,yn)(x_1, y_1), (x_2, y_2), \dots, (x_n, y_n) with sample standard deviations sxs_x and sys_y:

r=1n−1∑i=1n(xi−xˉsx)(yi−yˉsy)=∑i=1n(xi−xˉ)(yi−yˉ)∑i=1n(xi−xˉ)2∑i=1n(yi−yˉ)2r = \frac{1}{n - 1} \sum_{i=1}^{n} \left( \frac{x_i - \bar{x}}{s_x} \right) \left( \frac{y_i - \bar{y}}{s_y} \right) = \frac{\sum_{i=1}^{n} (x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum_{i=1}^{n} (x_i - \bar{x})^2 \sum_{i=1}^{n} (y_i - \bar{y})^2}}

Notice that rr is the average product of standardized zz-scores: r=1n−1∑zxizyir = \frac{1}{n-1} \sum z_{x_i} z_{y_i}. When a data point falls in Quadrant I or III relative to the centroid (xˉ,yˉ)(\bar{x}, \bar{y}), both zz-scores share the same algebraic sign, contributing a positive product to the sum. In Quadrants II and IV, the zz-scores have opposite signs, contributing a negative product.

Critical Mathematical Properties of rr

  • Bounded Range: −1≤r≤1-1 \le r \le 1. Values of r=1r = 1 and r=−1r = -1 represent perfect positive and perfect negative collinearity, respectively. A value of r=0r = 0 denotes no linear association.
  • Dimensionless (Scale Invariance): Because rr is computed from standardized zz-scores, it has no units of measurement. Transforming units (e.g., converting centimeters to inches or Celsius to Fahrenheit) leaves rr completely unchanged, provided the scale factor is positive (a>0,c>0a > 0, c > 0). If one variable is multiplied by a negative constant, rr reverses sign.
  • Symmetry: rxy=ryxr_{xy} = r_{yx}. Switching the roles of explanatory and response variables does not alter the correlation coefficient.
  • Linearity Restriction: rr measures strictly linear association. A deterministic non-linear relationship (e.g., y=x2y = x^2 on the symmetric domain [−3,3][-3, 3]) yields r=0r = 0 despite perfect functional predictability.
  • Non-Resistance: Like the sample mean, rr is non-resistant. A single anomalous observation far from the bivariate centroid can drastically inflate or deflate rr.

3. The Least-Squares Regression Line (LSRL)

When a scatterplot demonstrates a reasonably linear trend, linear regression models the response yy as a linear function of xx:

y^=b0+b1x\hat{y} = b_0 + b_1 x

where y^\hat{y} (y-hat) represents the predicted value of the response variable for a given value of xx, b1b_1 is the slope, and b0b_0 is the yy-intercept.

The Least-Squares Criterion

For each observation (xi,yi)(x_i, y_i), the vertical error or residual is defined as:

≠i=yi−y^i=observed y−predicted y\ne_i = y_i - \hat{y}_i = \text{observed } y - \text{predicted } y

The least-squares regression line is defined as the unique line that minimizes the sum of squared vertical residuals (SSE):

min⁡b0,b1∑i=1nei2=min⁡b0,b1∑i=1n[yi−(b0+b1xi)]2\min_{b_0, b_1} \sum_{i=1}^{n} e_i^2 = \min_{b_0, b_1} \sum_{i=1}^{n} \left[ y_i - (b_0 + b_1 x_i) \right]^2

Formulas for Slope (b1b_1) and Intercept (b0b_0)

Setting the partial derivatives ∂SSE∂b0=0\frac{\partial \text{SSE}}{\partial b_0} = 0 and ∂SSE∂b1=0\frac{\partial \text{SSE}}{\partial b_1} = 0 yields the normal equations. Solving these equations produces the fundamental parameter formulas:

b1=r(sysx)b_1 = r \left( \frac{s_y}{s_x} \right) b0=yˉ−b1xˉb_0 = \bar{y} - b_1 \bar{x}

Important

The Centroid Property: Rearranging the intercept formula gives yˉ=b0+b1xˉ\bar{y} = b_0 + b_1 \bar{x}. This proves mathematically that the least-squares regression line always passes through the centroid point (xˉ,yˉ)(\bar{x}, \bar{y}) of the dataset.

Contextual Interpretation of Regression Parameters

  • Interpreting the Slope (b1b_1): "For each additional 1-unit increase in the explanatory variable xx, the model predicts an average change of b1b_1 units in the response variable yy."
  • Interpreting the yy-Intercept (b0b_0): "When the explanatory variable xx is 0 units, the model predicts the response variable yy will be b0b_0 units." (Teachers must prompt students to assess whether x=0x = 0 is physically meaningful and lies within the observed domain).

4. The Coefficient of Determination (r2r^2)

The coefficient of determination, denoted r2r^2, evaluates the explanatory adequacy of the regression model. In simple linear regression with an intercept, r2r^2 is precisely the square of Pearson's correlation coefficient.

Partitioning the Sum of Squares

The total variation in the response variable around its mean is partitioned into two additive components:

SST=SSM+SSE\text{SST} = \text{SSM} + \text{SSE} ∑i=1n(yi−yˉ)2=∑i=1n(y^i−yˉ)2+∑i=1n(yi−y^i)2\sum_{i=1}^{n} (y_i - \bar{y})^2 = \sum_{i=1}^{n} (\hat{y}_i - \bar{y})^2 + \sum_{i=1}^{n} (y_i - \hat{y}_i)^2

where:

  • SST\text{SST} (Total Sum of Squares): Total variation in yy without using xx.
  • SSM\text{SSM} (Model Sum of Squares): Variation explained by the linear regression line.
  • SSE\text{SSE} (Error/Residual Sum of Squares): Unexplained residual scatter.
r2=SSMSST=1−SSESSTr^2 = \frac{\text{SSM}}{\text{SST}} = 1 - \frac{\text{SSE}}{\text{SST}}

Standard Pedagogical Interpretation Template

Accomplished teachers train students to use the precise interpretative phrasing:

"r2×100%r^2 \times 100\% of the total variation in the response variable (yy) is explained by the linear relationship with the explanatory variable (xx)."


5. Residual Analysis & Diagnostic Plots

Calculating a high rr or r2r^2 is insufficient to claim that a linear model is appropriate. A linear model can produce r=0.95r = 0.95 on data exhibiting severe quadratic curvature. The primary diagnostic tool for model validation is the residual plot.

Fundamental Properties of Residuals

  1. ∑i=1nei=0\sum_{i=1}^{n} e_i = 0 (the sum of residuals from an LSRL with an intercept is always exactly zero).
  2. eˉ=0\bar{e} = 0 (the mean residual is zero).

Diagnosing Residual Patterns

A residual plot graphs the explanatory variable xix_i (or predicted values y^i\hat{y}_i) on the horizontal axis against the residuals eie_i on the vertical axis:

+-----------------------------------------------------------------------------------+
|                         RESIDUAL PLOT DIAGNOSTIC MATRIX                           |
+-----------------------+-----------------------------+-----------------------------+
| Observed Pattern      | Statistical Diagnosis       | Remedial Modeling Action    |
+-----------------------+-----------------------------+-----------------------------+
| Uniform random        | Linear model is appropriate | Retain linear model;        |
| scatter around e = 0  | (Homoscedasticity confirmed)| proceed with inference      |
+-----------------------+-----------------------------+-----------------------------+
| Curved pattern        | Non-linear relationship     | Reject linear model; apply  |
| (U-shape / Inverted U)| (Systematic model inadequacy| re-expression (log, power)  |
+-----------------------+-----------------------------+-----------------------------+
| Fan / Funnel shape    | Heteroscedasticity          | Logarithmic transformation  |
| (Spread widens/narrows| (Non-constant error variance| on y to stabilize variance  |
+-----------------------+-----------------------------+-----------------------------+

6. Outliers, Leverage, and Influential Points

In bivariate regression, unusual points exhibit distinct geometric properties and consequences:

Bivariate Outlier

An observation with a large vertical residual ∣ei∣|e_i|. It falls far from the general linear trend formed by the majority of the data points.

High-Leverage Point

An observation whose explanatory value xix_i lies substantially far from the centroid mean xˉ\bar{x}.

  • Leverage Property: Leverage depends solely on the xx-value, completely independent of the yy-value.
  • A high-leverage point acts like a heavy weight at the end of a long lever arm. If its yy-value aligns with the linear trend established by the rest of the data, it has a small residual, does not alter the slope, but artificially inflates rr and r2r^2.

Influential Point

An observation whose inclusion or omission substantially alters the regression parameters (slope b1b_1, intercept b0b_0, or correlation rr). A point is typically influential if it combines high leverage with an inconsistent yy-value that fails to follow the trend of the remaining data.


7. Secondary Pedagogical Traps & Instructional Interventions

Trap 1: Correlation Does Not Imply Causation

Students routinely conclude that a strong positive correlation between two variables proves that changes in xx cause changes in yy.

  • Pedagogical Intervention: Present real-world examples driven by lurking / confounding variables (e.g., the strong positive correlation between ice cream sales and drowning incidents, both driven by the confounding variable of summer outdoor temperatures). Emphasize that only a well-designed, randomized controlled experiment can establish causal inference.

Trap 2: The Hazard of Extrapolation

Students frequently use regression equations to make predictions for xx-values far outside the range of observed data.

  • Pedagogical Intervention: Illustrate the growth rate of a human infant. A linear regression predicting child height from age between 1 and 4 years will predict an adult height of 14 feet at age 35. Explain that relationships verified to be linear within a specific experimental domain may become non-linear, saturate, or reverse entirely beyond the observed data range.

Trap 3: Switching xx and yy in Regression

Students often assume that the regression line of yy on xx can simply be solved algebraically for xx to yield the regression of xx on yy.

  • Pedagogical Intervention: Clarify that least-squares regression minimizes vertical distances (y−y^y - \hat{y}), whereas regressing xx on yy minimizes horizontal distances (x−x^x - \hat{x}). Because b1,y on x=r(sysx)b_{1, y \text{ on } x} = r\left(\frac{s_y}{s_x}\right) while b1,x on y=r(sxsy)b_{1, x \text{ on } y} = r\left(\frac{s_x}{s_y}\right), the lines are geometrically distinct whenever ∣r∣<1|r| < 1.
Loading diagram...
Bivariate Regression Modeling & Residual Diagnostic Flowchart
Test Your Knowledge

An educational researcher investigates the relationship between weekly mathematics homework hours (x) and final examination scores (y, in points). The summary statistics for n = 25 students are:

x̄ = 15.0 hours, s_x = 3.0 hours, ȳ = 72.0 points, s_y = 9.0 points, r = 0.80

Using the Least-Squares Regression Line (LSRL) model ŷ = b₀ + b₁x, what is the predicted final examination score for a student who completes x = 18.0 hours of homework weekly?

A

ŷ = 74.4 points

B

ŷ = 76.8 points

C

ŷ = 81.6 points

D

ŷ = 79.2 points

Test Your Knowledge

In a bivariate dataset, an observation has an explanatory value x that is 4 standard deviations above x̄, but its response value y falls almost exactly on the regression line established by the remaining observations. How is this point properly classified, and what is its primary effect on the regression analysis?

A

The point has high leverage and low influence on the slope, but it substantially inflates the correlation coefficient r and r².

B

The point is a bivariate outlier with a large residual that severely alters the y-intercept b₀.

C

The point has low leverage and high influence, drastically rotating the regression line toward the horizontal axis.

D

The point is an uninfluential centroid point that has zero impact on either the correlation coefficient or the standard error of the slope.

Test Your Knowledge

A secondary student uses linear regression to model automobile fuel efficiency (y, in miles per gallon) from curb weight (x, in thousands of pounds) across 30 passenger vehicles, obtaining r = -0.89. Upon constructing a residual plot of eᵢ versus xᵢ, the student observes a pronounced U-shaped parabolic curve. What is the correct statistical diagnosis and instructional response?

A

Conclude the linear model is excellent because r² = (-0.89)² ≈ 0.792 demonstrates that nearly 80% of the variance is explained.

B

Conclude that the linear model is inadequate because the systematic curved pattern in the residual plot reveals a non-linear relationship; guide the student to explore a non-linear transformation (e.g., reciprocal or logarithmic re-expression).

C

Conclude that the data exhibit heteroscedasticity, which can be remedied by removing the vehicles that produce positive residuals.

D

Conclude that the student mistakenly reversed the explanatory and response variables, and recompute the regression of weight on fuel efficiency.

Sections you finish are checked off in the contents.