AP Statistics • Exploring Two-Variable Data

Introducing Statistics: Are Variables Related?

Discover how statisticians detect, visualize, and quantify relationships between two variables using scatterplots and correlation.

A scatter plot with data columns and a percentage symbol.
Inside this lesson 10 sections 5 questions 6 figures

SECTION 1

Historical Context & Motivation

The desire to understand whether two measurable quantities move together — and if so, how strongly — is one of the oldest questions in empirical science. Long before formal statistical methods existed, scientists and scholars recognized patterns: taller people tended to weigh more, warmer days seemed to coincide with higher crop yields, and rising trade volumes appeared to track national wealth. The challenge was transforming these intuitions into rigorous, reproducible measurements. The development of bivariate analysis — the study of relationships between two variables — gave scientists a powerful toolkit for moving beyond anecdote to evidence.

1805 • Legendre's Least Squares

Adrien-Marie Legendre published the method of least squares, providing the first formal framework for fitting a line to observed data points in astronomy and geodesy.

1886 • Galton's Regression to the Mean

Sir Francis Galton studied parent and offspring heights, discovering that extreme values in one generation tended to "regress" toward the average in the next — coining the term regression.

1896 • Pearson's Correlation Coefficient

Karl Pearson formalized the product-moment correlation coefficient r, giving researchers a single number between −1 and +1 to quantify the strength and direction of a linear relationship.

1977 • Tukey's Exploratory Data Analysis

John Tukey championed graphical methods — including scatterplots and residual plots — arguing that visualization should always precede numerical summaries.

2020s • Modern Data Science

Massive datasets and computational tools now allow analysts to explore bivariate relationships in real time, yet the foundational ideas of scatterplots, correlation, and regression remain central to AP Statistics and beyond.

The central question this unit addresses is deceptively simple: Are two variables related? Answering it rigorously requires us to define what "related" means statistically, choose appropriate visual displays, compute numerical summaries, and — crucially — avoid confusing association with causation. These ideas form the backbone of Unit 2 in the AP Statistics curriculum and appear repeatedly on the exam.

SECTION 2

Core Principles & Definitions

Before we can assess whether two variables are related, we need a precise vocabulary. In any bivariate study, we identify an explanatory variable (sometimes called the independent variable) that we suspect may influence or predict a response variable (the dependent variable). The explanatory variable is conventionally plotted on the horizontal axis, and the response variable on the vertical axis. Even when no causal claim is intended, this convention helps organize our analysis and communication.

1

Association

Two variables are associated if knowing the value of one variable provides information about the value of the other. Association can be positive, negative, or nonlinear.
2

Scatterplot

A scatterplot displays paired quantitative data as points in a coordinate plane. It reveals direction, form, strength, and unusual features of the relationship.
3

Direction

A positive association means both variables increase together; a negative association means one decreases as the other increases.
4

Form & Strength

The form describes whether the pattern is linear or curved. The strength describes how tightly points cluster around the underlying pattern.
5

Correlation ≠ Causation

Even a strong statistical association does not prove that changes in the explanatory variable cause changes in the response. Lurking variables and confounding must always be considered.
✦

KEY TAKEAWAY

Think of exploring a bivariate relationship like tuning into a radio signal. The scatterplot lets you "hear" the signal — direction, form, and unusual features. The correlation coefficient r is your signal-strength meter, telling you how clearly the linear pattern comes through above the noise. But neither the signal nor the meter tells you what is broadcasting — that requires additional investigation into causation.

SECTION 3

Visual Explanation: Anatomy of a Scatterplot

A well-constructed scatterplot is the single most important tool for exploring bivariate data. The diagram below shows a scatterplot of study hours versus exam score for 15 students, annotated with the four key features you must describe on the AP exam: direction, form, strength, and unusual features (outliers, clusters, or influential points).

Study Hours (Explanatory Variable)Exam Score (Response)024681012405060708090Trend lineOutlierDirection: Positive ↗
Scatterplot of study hours versus exam score. The dashed violet line represents the overall trend. Note the outlier at approximately (2.5, 80) — a student who scored unusually high relative to their study time. The overall pattern shows a strong, positive, roughly linear association.
💡

AP Exam Tip

When describing a scatterplot on the AP exam, always address all four features using the mnemonic D-F-S-U: Direction (positive/negative), Form (linear/nonlinear), Strength (strong/moderate/weak), and Unusual features (outliers, clusters, gaps). Omitting any one of these can cost you points on free-response questions.

SECTION 4

Mathematical Framework: The Correlation Coefficient

While a scatterplot provides a qualitative picture, we need a numerical summary to quantify the linear relationship between two quantitative variables. The Pearson correlation coefficient r does exactly this. It standardizes both variables — converting them to z-scores — and then measures the average product of those z-scores across all observations. The resulting value always falls between −1 and +1, providing a unitless measure of linear association strength and direction.

CORRELATION COEFFICIENT

r=(1/(n−1))×Σ[(xi−xˉ)/sx×(yi−yˉ)/sγ]r = (1 / (n − 1)) × Σ[(xᵢ − x̄)/sₓ × (yᵢ − ȳ)/sᵧ]

where n = number of paired observations, x̄ and ȳ are the sample means, and sₓ and sᵧ are the sample standard deviations. Each fraction (xᵢ − x̄)/sₓ is the z-score for that observation.

COEFFICIENT OF DETERMINATION

r2=(fractionofvariationinyexplainedbythelinearmodel)r² = (fraction of variation in y explained by the linear model)

If r = 0.90, then r² = 0.81, meaning 81% of the variability in the response variable is accounted for by the linear relationship with the explanatory variable. The remaining 19% is due to other factors or randomness.

The formula reveals important conceptual insights. When both z-scores have the same sign (both above or both below their respective means), the product is positive, contributing to a positive r. When the z-scores have opposite signs, the product is negative, pulling r toward −1. If the points scatter randomly, positive and negative products cancel, yielding r ≈ 0. Note that r measures only linear association — a perfect parabolic relationship can produce r = 0 if the curvature is symmetric.

  • r = +1: Perfect positive linear relationship — all points lie exactly on an upward-sloping line.
  • r = −1: Perfect negative linear relationship — all points lie exactly on a downward-sloping line.
  • r = 0: No linear relationship, though a strong nonlinear pattern may exist.
  • |r| > 0.8: Generally considered strong; |r| between 0.5 and 0.8 is moderate; |r| < 0.5 is weak.

SECTION 5

Types of Association & Scatterplot Patterns

Not all bivariate relationships look the same. The form, direction, and strength of an association determine which statistical tools are most appropriate. The diagram below illustrates four common scatterplot patterns, each with a distinct combination of these characteristics. Recognizing these patterns at a glance is essential for selecting the correct analytical approach and for earning full credit on AP free-response questions.

Strong Positive Linearr ≈ 0.95Strong Negative Linearr ≈ −0.92Nonlinear (Curved)r ≈ 0.10 (misleading!)No Associationr ≈ 0.03
Four common scatterplot patterns. Top-left: strong positive linear (r ≈ 0.95). Top-right: strong negative linear (r ≈ −0.92). Bottom-left: nonlinear pattern where r is misleadingly near zero. Bottom-right: no association — points scattered with no discernible pattern.

The bottom-left panel deserves special attention. The parabolic data exhibit a clear, strong pattern, yet the correlation coefficient r is near zero because the relationship is not linear. This illustrates a critical principle: always examine the scatterplot before computing r. A numerical summary alone can be deeply misleading — a lesson famously demonstrated by Anscombe's Quartet, four datasets with nearly identical correlation coefficients but drastically different scatterplot appearances.

SECTION 6

Worked Example: Computing and Interpreting r

Suppose we collect data on the number of absences (x) and final exam score (y) for five students in a statistics course. The data are: (2, 88), (4, 78), (6, 72), (8, 62), (10, 58). We want to compute the correlation coefficient r, interpret it in context, and determine how much of the variation in exam scores is explained by the linear relationship with absences.

Correlation Between Absences and Exam Score

  1. 1

    Step 1 — Compute the Means

    The mean of x is x̄ = (2 + 4 + 6 + 8 + 10) / 5 = 30 / 5 = 6. The mean of y is ȳ = (88 + 78 + 72 + 62 + 58) / 5 = 358 / 5 = 71.6.
    x̄ = 6, ȳ = 71.6
  2. 2

    Step 2 — Compute the Standard Deviations

    For x: sₓ = √[Σ(xᵢ − x̄)² / (n − 1)] = √[(16 + 4 + 0 + 4 + 16) / 4] = √[40/4] = √10 ≈ 3.162. For y: sᵧ = √[Σ(yᵢ − ȳ)² / (n − 1)] = √[(268.96 + 40.96 + 0.16 + 92.16 + 184.96) / 4] = √[587.2/4] = √146.8 ≈ 12.116.
    sₓ ≈ 3.162, sᵧ ≈ 12.116
  3. 3

    Step 3 — Compute z-Scores and Products

    For each observation, calculate zₓ = (xᵢ − 6)/3.162 and zᵧ = (yᵢ − 71.6)/12.116, then multiply them. For example, observation (2, 88): zₓ = −1.265, zᵧ = 1.354, product = −1.713. Repeating for all five points: products are −1.713, −0.428, −0.003, −0.428, −1.713. The sum of the products is −4.285.
    Σ(zₓ × zᵧ) ≈ −4.285
  4. 4

    Step 4 — Compute r

    r = (1/(n − 1)) × Σ(zₓ × zᵧ) = (1/4) × (−4.285) ≈ −0.9713. On the AP exam, you would typically use your calculator's LinReg function to obtain this value directly.
    r ≈ −0.971
  5. 5

    Step 5 — Interpret in Context

    The correlation r ≈ −0.971 indicates a strong, negative, linear association between the number of absences and final exam score. As absences increase, exam scores tend to decrease. Furthermore, r² ≈ 0.943, meaning approximately 94.3% of the variation in exam scores among these five students is explained by the linear relationship with number of absences.
    r² ≈ 0.943 → 94.3% of variation explained
ℹ

Calculator Shortcut

On the TI-83/84, enter x-values into L1 and y-values into L2, then run STAT → CALC → 8:LinReg(a+bx). If r does not appear, turn on diagnostics first: 2nd → 0 (CATALOG) → DiagnosticOn → ENTER.

SECTION 7

Strengths, Limitations, and Common Pitfalls

The correlation coefficient r is an indispensable tool, but like any summary statistic, it can mislead when used carelessly. Understanding its properties and limitations is essential both for correct AP exam responses and for sound statistical practice. The table below contrasts the strengths and weaknesses of relying on r as a measure of association.

StrengthsLimitations
Unitless: allows comparison across different datasets regardless of measurement scales.Measures only linear association; a strong curved pattern can yield r ≈ 0.
Bounded between −1 and +1: provides a standardized scale for interpreting strength and direction.Highly sensitive to outliers: a single extreme point can dramatically inflate or deflate r.
Symmetric: r(x, y) = r(y, x), so swapping explanatory and response roles does not change its value.Does not imply causation: a strong r can arise from confounding or lurking variables.
Invariant under linear transformations of the data (changing units does not affect r).Requires both variables to be quantitative; categorical data require different tools (e.g., chi-square).

Strengths and Limitations of the Correlation Coefficient r

✦

KEY TAKEAWAY

Think of the correlation coefficient as a medical thermometer. It gives you an accurate reading of one specific symptom — the degree of linear co-movement — but it cannot diagnose the underlying cause. Just as a doctor would never prescribe treatment based solely on a temperature reading without examining the patient, a statistician should never conclude causation based solely on a correlation value without considering study design, potential confounders, and the shape of the scatterplot.

SECTION 8

Connection to Regression and Advanced Methods

The question "Are variables related?" is the launching point for a deeper investigation that occupies much of the AP Statistics curriculum. Once we establish that a linear association exists, we naturally want to model it — that is, find the equation of the line that best summarizes the relationship and use it to make predictions. This leads us from correlation to least-squares regression, where we derive the line ŷ = a + bx that minimizes the sum of squared residuals. The table below previews how the introductory concepts in this lesson connect to more advanced topics you will encounter.

This Lesson (Introductory)What Comes Next (Advanced)
Scatterplot: visual display of bivariate dataResidual plots: diagnosing whether the linear model is appropriate
Correlation coefficient r: measures strength and direction of linear associationSlope b and intercept a: the least-squares regression equation ŷ = a + bx, with b = r × (sᵧ / sₓ)
r²: proportion of variability explainedStandard deviation of residuals (s): measuring prediction error
Association ≠ causation (observational data)Inference for regression: t-tests and confidence intervals for the slope to assess statistical significance

From Exploration to Inference: How Introductory Concepts Lead to Advanced Methods

Importantly, the relationship b = r × (sᵧ / sₓ) reveals that the regression slope is directly proportional to the correlation coefficient. A stronger linear association (larger |r|) means the regression line captures more of the data's behavior. In later units, you will also learn to construct confidence intervals and perform hypothesis tests for the population slope β, bridging the gap between exploratory data analysis and formal statistical inference. Mastering the ideas in this lesson — understanding scatterplots, interpreting r, and recognizing the limits of correlation — lays the foundation for everything that follows.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

A researcher computes r = −0.02 for a large dataset of paired quantitative observations. She then examines the scatterplot and observes a clear U-shaped (parabolic) pattern. Which of the following best explains this situation?
  • A. The two variables are not associated in any way.
  • B. The correlation coefficient is unreliable for large datasets.
  • C. The correlation coefficient only measures linear association, so a strong nonlinear pattern can produce r ≈ 0.
  • D. A calculation error must have occurred because r must be large when there is a clear pattern.
  • E. The researcher should have used the absolute value of r to detect the parabolic pattern.
Show answer (C)
The correct answer is C. The Pearson correlation coefficient r measures only the strength and direction of a linear association. A symmetric U-shaped (parabolic) pattern produces roughly equal positive and negative z-score products, which cancel to yield r ≈ 0. This does not mean the variables are unassociated (eliminating A), nor does it reflect unreliability for large samples (eliminating B) or a calculation error (eliminating D). Taking the absolute value of r (E) would still yield approximately 0 and would not detect curvature. This example underscores why we must always examine the scatterplot before interpreting r.

Question 2: BASIC CALCULATION

A study of 50 cities finds that the correlation between average daily temperature (°F) and average monthly ice cream sales (thousands of dollars) is r = 0.87. What is the value of r², and which interpretation is most appropriate?
  • A. r² = 0.76; about 76% of the variation in ice cream sales is explained by the linear relationship with temperature.
  • B. r² = 0.76; temperature causes 76% of ice cream sales.
  • C. r² = 0.93; about 93% of the variation in ice cream sales is explained by the linear relationship with temperature.
  • D. r² = 0.76; 76% of cities have above-average ice cream sales when temperatures are high.
  • E. r² = 0.87; about 87% of the variation in ice cream sales is explained by the linear relationship with temperature.
Show answer (A)
The correct answer is A. We compute r² = (0.87)² = 0.7569 ≈ 0.76. The proper interpretation is that approximately 76% of the variation in ice cream sales is explained by the linear relationship with temperature. Choice B incorrectly implies causation from an observational study. Choice C computes r² incorrectly (0.93 ≈ √0.87, not 0.87²). Choice D misinterprets r² as a proportion of cities rather than a proportion of variability. Choice E confuses r with r² — you must square the correlation to obtain the coefficient of determination.

Question 3: INTERMEDIATE

A dataset has a correlation coefficient of r = 0.65 between hours of exercise per week and resting heart rate. If each person's exercise hours are converted from hours to minutes (multiplied by 60), what is the new correlation coefficient?
  • A. r = 0.65 × 60 = 39.0
  • B. r = 0.65
  • C. r = 0.65 / 60 ≈ 0.011
  • D. r = −0.65, because the transformation reverses direction.
  • E. It cannot be determined without the original data.
Show answer (B)
The correct answer is B. The correlation coefficient r is invariant under linear transformations of either variable. Multiplying all x-values by a positive constant (here, 60) changes the units but does not affect the z-scores — because both the numerator (xᵢ − x̄) and the denominator (sₓ) scale by the same factor, canceling out. Therefore r remains 0.65. Choice A incorrectly multiplies r by the constant. Choice C incorrectly divides. Choice D is wrong because multiplying by a positive constant does not reverse direction (only multiplying by a negative constant would negate r). Choice E is incorrect because this property is guaranteed by the definition of r.

Question 4: APPLIED

4 pts
A health researcher collects data from 20 adults on their daily sodium intake (mg) and systolic blood pressure (mmHg). The scatterplot shows a moderately strong, positive, roughly linear association with one apparent outlier — a person who consumes very high sodium but has an unusually low blood pressure. The computer output reports r = 0.58 and r² = 0.336. (a) Describe the association between sodium intake and systolic blood pressure as revealed by the scatterplot. Be sure to address direction, form, strength, and unusual features. (b) Interpret r² = 0.336 in the context of this study. (c) If the outlier is removed and the correlation is recalculated, would you expect r to increase, decrease, or remain approximately the same? Justify your reasoning. (d) The researcher concludes that reducing sodium intake will lower blood pressure. Is this conclusion justified based on this study? Explain.
Show answer
Part (a) — 1 point: There is a moderately strong, positive, roughly linear association between daily sodium intake and systolic blood pressure. As sodium intake increases, systolic blood pressure tends to increase. There is one unusual observation — a person with very high sodium intake but unusually low blood pressure — that appears to be an outlier. Part (b) — 1 point: Approximately 33.6% of the variability in systolic blood pressure among these 20 adults is explained by the linear relationship with daily sodium intake. The remaining 66.4% is due to other factors not captured by this linear model. Part (c) — 1 point: Removing the outlier would likely cause r to increase (become larger in absolute value). The outlier has high x but low y, which places it far from the positive linear trend. Its z-score product is strongly negative, pulling the overall r toward zero. Removing it eliminates this drag, so the remaining points will produce a stronger positive correlation. Part (d) — 1 point: No, this conclusion is not justified. This is an observational study, not a randomized experiment, so we cannot establish causation. A strong association does not prove that sodium intake causes changes in blood pressure. There may be lurking or confounding variables — such as overall diet quality, exercise habits, or genetic factors — that influence both sodium consumption and blood pressure. To establish a causal link, a randomized controlled experiment would be required.

Question 5: CRITICAL THINKING

4 pts
Consider the following two claims: Claim 1: "If two variables have a correlation of r = 0, then there is no relationship between them." Claim 2: "If we know r, we can determine the slope of the least-squares regression line." (a) Evaluate Claim 1. Provide a specific counterexample (describe or sketch the data pattern) showing that Claim 1 can be false. (b) Evaluate Claim 2. Is the claim true or false? If true, explain what additional information (if any) is needed. If false, explain why. (c) Explain why the distinction between association and causation is considered one of the most important ideas in statistics. Give a real-world example of a strong correlation that does not imply causation. (d) A student says, "Since r is always between −1 and 1, an r of 0.40 means the relationship is only 40% as strong as a perfect linear relationship." Is this interpretation correct? Explain using r².
Show answer
Part (a) — 1 point: Claim 1 is false. A counterexample: consider data points arranged in a perfect circle or a symmetric U-shape (quadratic pattern). For instance, the points (−2, 4), (−1, 1), (0, 0), (1, 1), (2, 4) follow the relationship y = x² perfectly, yet r = 0 because the relationship is perfectly symmetric and nonlinear. The variables are clearly related — y is perfectly determined by x — but the correlation coefficient fails to detect this because it measures only linear association. Part (b) — 1 point: Claim 2 is false as stated. Knowing r alone is not sufficient to determine the slope b of the least-squares regression line. The formula b = r × (sᵧ / sₓ) shows that we also need the standard deviations of both variables. Two datasets can have the same r but very different slopes if their standard deviations differ. For example, if sᵧ = 10 and sₓ = 2, then b = 0.8 × (10/2) = 4.0; but if sᵧ = 2 and sₓ = 10, then b = 0.8 × (2/10) = 0.16, despite both having r = 0.8. Part (c) — 1 point: The distinction is critical because acting on a correlation as if it were causation can lead to misguided policies, ineffective treatments, or wasted resources. A classic example: there is a strong positive correlation between per capita ice cream consumption and drowning deaths across months of the year. However, eating ice cream does not cause drowning. The lurking variable is temperature — warm weather independently increases both ice cream consumption and swimming activity. Without recognizing this, one might absurdly recommend banning ice cream to prevent drownings. Only properly designed randomized experiments can establish causation. Part (d) — 1 point: The student's interpretation is incorrect. The value r = 0.40 does not mean 40% of a perfect relationship's strength. The more meaningful measure is r² = (0.40)² = 0.16, which tells us that only 16% of the variation in the response variable is explained by the linear relationship with the explanatory variable. This means 84% of the variation remains unexplained — the relationship is actually quite weak. The percentage of explained variation scales with r², not r, so an r of 0.40 captures far less predictive power than 40% might suggest.

SUMMARY

Lesson Summary

Summary

Exploring whether two variables are related is the foundational question of bivariate analysis. We begin by constructing a scatterplot — plotting the explanatory variable on the horizontal axis and the response variable on the vertical axis — and then describing the pattern using four features: direction (positive or negative), form (linear or nonlinear), strength (strong, moderate, or weak), and unusual features (outliers, clusters, or gaps).

The correlation coefficient r quantifies the strength and direction of a linear association as a unitless value between −1 and +1, while r² tells us the proportion of variability in the response variable explained by the linear model. Crucially, r measures only linear association, is sensitive to outliers, and is invariant under linear transformations of either variable. Above all, association does not imply causation — establishing a causal link requires a carefully designed randomized experiment, not merely a strong correlation. These foundational ideas connect directly to least-squares regression and inference for slopes in subsequent AP Statistics units.

Varsity Tutors • AP Statistics • Introducing Statistics: Are Variables Related?