01 / 22

Representing Relationships
Between Two Variables

Learn to visualize, describe, and model the relationship between two quantitative variables using scatterplots, correlation, and regression.

AP Statistics

What Is a Bivariate Relationship?

A bivariate relationship describes how two quantitative variables are connected. We collect paired data: each observation has an explanatory variable \( x \) and a response variable \( y \).

Explanatory Variable
The variable we think explains or predicts change: plotted on the horizontal axis.
Response Variable
The variable we think is affected or measured as an outcome: plotted on the vertical axis.

The Scatterplot: Your Primary Tool

A scatterplot displays paired \( (x, y) \) data as individual points on a coordinate plane. It reveals the direction, form, and strength of a relationship at a glance.

Hours of Study Exam Score 0 2 4 6 8 10 50 60 70 80 90

Describe a Scatterplot: D-F-S-O

When you describe a scatterplot on the AP exam, always address four characteristics:

Direction
Positive, negative, or no trend
Form
Linear, curved, clustered, or no clear pattern
Strength
Strong, moderate, or weak (how tightly points cluster)
Outliers
Any points that fall far from the overall pattern

The Correlation Coefficient: \( r \)

The correlation coefficient \( r \) quantifies the direction and strength of a linear relationship between two quantitative variables.

-1 0 +1 Perfect negative No linear relation Perfect positive
1
\( r \) is always between -1 and +1.
2
Sign of \( r \) tells direction: positive or negative.
3
Magnitude \( |r| \) tells strength: closer to 1 = stronger linear fit.
4
\( r \) has no units and is not affected by changes in units of \( x \) or \( y \).

Computing \( r \): The Formula

The correlation coefficient is computed from the standardized values (z-scores) of each variable:

Where \( \bar{x}, \bar{y} \) are the sample means and \( s_x, s_y \) are the sample standard deviations. Each term is a product of the z-scores: \( z_{x_i} \cdot z_{y_i} \).

Key Properties of \( r \)

Unitless
Changing from cm to inches does not change \( r \).
Symmetric
\( r(x,y) = r(y,x) \): swapping variables doesn't change \( r \).
Linear Only
\( r \) measures only linear association. A strong curve can have \( r \approx 0 \).

Correlation vs. Causation

A strong correlation between \( x \) and \( y \) does not prove that \( x \) causes \( y \). There may be a lurking variable or the relationship may be coincidental.

Correlation
Two variables move together in a predictable pattern. This is what \( r \) measures.
Causation
A change in \( x \) directly produces a change in \( y \). Requires a randomized experiment to establish.

The Least-Squares Regression Line

The least-squares regression line (LSRL) is the line that minimizes the sum of the squared vertical distances (residuals) from each data point to the line:

\( b \) : Slope
For each 1-unit increase in \( x \), \( \hat{y} \) changes by \( b \) units on average.
\( a \) : Intercept
The predicted value of \( y \) when \( x = 0 \) (may not be meaningful in context).

Understanding Residuals

A residual is the difference between an observed value and its predicted value from the regression line:

x y + residual - residual residual = 0 LSRL
+
Positive residual: observed value is above the line (model underpredicts).
-
Negative residual: observed value is below the line (model overpredicts).

Coefficient of Determination: \( r^2 \)

\( r^2 \) tells us the proportion of variation in the response variable \( y \) that is explained by the linear relationship with \( x \).

\( r^2 = 1 \)
All variation in \( y \) is explained: every point falls exactly on the line.
\( r^2 = 0 \)
None of the variation in \( y \) is explained by \( x \): the line is useless.

How to Analyze a Relationship

1
Make a scatterplot. Plot \( x \) on horizontal, \( y \) on vertical. Look for direction, form, strength, outliers.
2
Compute \( r \). Quantify the linear association. Check the sign and magnitude.
3
Fit the LSRL. Calculate \( \hat{y} = a + bx \). Interpret slope and intercept in context.
4
Check residuals. Plot residuals vs. \( x \). Look for patterns (curved, fanning out) that suggest the linear model is inappropriate.
5
Report \( r^2 \). Interpret the proportion of variation explained, in context.

Example 1: Height vs. Shoe Size

A sample of 10 adults yields \( \bar{x} = 68 \) inches, \( s_x = 3.5 \), \( \bar{y} = 10.2 \), \( s_y = 1.8 \), and \( r = 0.92 \). Find the LSRL.

1
Slope: \( b = r \cdot \dfrac{s_y}{s_x} = 0.92 \cdot \dfrac{1.8}{3.5} \approx 0.473 \)
2
Intercept: \( a = \bar{y} - b\bar{x} = 10.2 - 0.473(68) \approx -21.96 \)
3
LSRL: \( \hat{y} = -21.96 + 0.473x \)

Example 2: Interpreting a Residual Plot

After fitting a linear model to data on tree age \( (x) \) vs. tree height \( (y) \), a residual plot shows a clear curved pattern:

Tree Age (years) Residual 0

Example 3: Making a Prediction

Using our earlier LSRL: \( \hat{y} = -21.96 + 0.473x \). Predict the shoe size for a person who is 72 inches tall.

1
Substitute: \( \hat{y} = -21.96 + 0.473(72) \)
2
Calculate: \( \hat{y} = -21.96 + 34.056 = 12.10 \)
3
Interpret: We predict a shoe size of about 12.1 for a 72-inch-tall adult.

Common Mistakes to Avoid

Correlation = Causation
A high \( r \) does not mean \( x \) causes \( y \). Look for lurking variables and experimental design.
Extrapolation
Using the LSRL to predict far outside the observed data range gives unreliable results.
Ignoring Residual Plots
A high \( r^2 \) doesn't mean the model is good. A patterned residual plot means the linear fit is wrong.

Summary: Key Concepts

Concept Symbol What It Tells You
Correlation \( r \) Direction and strength of linear association
Coefficient of Determination \( r^2 \) Proportion of variation in \( y \) explained by \( x \)
Slope \( b \) Predicted change in \( y \) for 1-unit increase in \( x \)
Intercept \( a \) Predicted \( y \) when \( x = 0 \)
Residual \( y - \hat{y} \) How far an observed point is from the predicted value
LSRL \( \hat{y} = a + bx \) Best-fit line minimizing squared residuals

Question 1 of 5

A scatterplot of hours worked per week vs. weekly earnings shows a strong, positive, linear pattern. Which value of \( r \) is most plausible?

Question 2 of 5

If \( r^2 = 0.64 \) for a regression of study time on test score, what does this mean?

Question 3 of 5

A LSRL is \( \hat{y} = 12.5 + 3.2x \), where \( x \) is years of experience and \( \hat{y} \) is hourly wage in dollars. What is the best interpretation of the slope?

Question 4 of 5

A residual plot of a linear model shows a clear U-shaped pattern. What does this suggest?

Question 5 of 5

A researcher finds a strong positive correlation (\( r = 0.88 \)) between ice cream sales and number of sunburns. Which conclusion is most appropriate?