🔍

AP Statistics · Unit 2 Case File

Data Detective Agency

Written by Kim Min-ho, Instructor
Published by TopEdu Prep
Confidential

Unit 2 · Exploring Two-Variable Data

The Case of the
Connected Clues

A self-study casebook for young statisticians. Six cases. One rookie detective. A pile of numeric clues waiting to be understood.

Welcome, Detective. Every case you'll open in this file involves two clues left at the same scene — a pair of numbers, or a pair of categories, recorded for the same group of suspects. Your job isn't to memorize formulas. It's to ask the same question a real detective asks: are these two clues connected, and if so, how strongly? Work through each case in order — the skills build on each other — then report to Agency HQ's final debrief for your summary sheet.
Case File 01

Skill: Scatterplots & Correlation

The First Look at the Scene

Field Notes Every investigation starts the same way: lay both clues out side by side and simply look at them. Detective Kim's rookie partner has two lists of numbers from six suspects. Before touching a single formula, the rule is: plot it first, describe what you see second.

What to look for

  • Scatterplot — a graph that plots one quantitative variable against another for each individual. The explanatory (x) variable goes on the horizontal axis; the response (y) variable goes on the vertical axis.
  • Directionpositive association: as x goes up, y tends to go up. Negative association: as x goes up, y tends to go down.
  • Form — does the pattern look like a straight line (linear), a curve, or no pattern at all?
  • Strength — how closely do the points hug the pattern? Tightly clustered = strong. Widely scattered = weak.
  • Unusual features — any point that breaks from the pattern (an outlier) or splits into separate clusters.
Evidence A

The Study Hours Case — will this dataset return all through the file

Six suspects reported how many hours they studied for a test, and their test score was recorded.

SuspectABCDEF
Hours studied (x)123456
Test score (y)505565707890
Reading the scene As hours studied increase, scores climb almost every time — a positive association. The points fall close to a straight path, so the form is linear, and because they hug that path tightly, the strength is strong. No suspect breaks the pattern, so there are no outliers here — this scene is unusually clean.
Detective Check

A new suspect studied 0 hours. Based on the pattern in Evidence A, what would you predict?

Solved
Case File 02

Skill: Least-Squares Regression Line

Drawing the Detective's Path

Field Notes A scatterplot shows the pattern, but Detective Kim wants to predict — if a new suspect shows up with only one clue (x), can we estimate the other (y)? That means drawing one single best-fit line through the mess of points.

What to know

  • The least-squares regression line is the line ŷ = b₀ + b₁x that makes the sum of the squared vertical distances from each point to the line as small as possible.
  • b₁ (the slope) is the predicted change in y for every one-unit increase in x.
  • b₀ (the intercept) is the predicted value of y when x = 0 — but it's only meaningful if x = 0 actually makes sense for the data.
  • The line always passes through the point (x̄, ȳ) — the mean of x and the mean of y.
  • Interpolation (predicting inside the range of observed x-values) is trustworthy. Extrapolation (predicting far outside that range) is risky — the pattern might not continue.
Evidence A, continued

Fitting the line to the Study Hours Case

Using the six suspects from Case 01 (x̄ = 3.5, ȳ = 68), technology gives the least-squares line:

ŷ = 40.60 + 7.83x
Interpretation Slope (7.83): for every extra hour studied, the model predicts a score about 7.83 points higher.
Intercept (40.60): a suspect who studied 0 hours is predicted to score about 40.60 — but since x = 0 sits right at the edge of what was observed, treat this cautiously.

Interpolation example — predict the score for 4.5 hours studied (inside the 1–6 range):
ŷ = 40.60 + 7.83(4.5) = 75.8

Extrapolation warning — predict the score for 12 hours studied (far outside the 1–6 range):
ŷ = 40.60 + 7.83(12) = 134.6 — an impossible test score! This is exactly why extrapolation is dangerous.
Detective Check

Using ŷ = 40.60 + 7.83x, what score is predicted for a suspect who studied 3.5 hours?

Solved

Hint: 3.5 is x̄ — and the regression line always passes through (x̄, ȳ).

Case File 03

Skill: Correlation Coefficient r and r²

Measuring How Strong the Connection Is

Field Notes "Strong," "weak," "linear" — these are useful words, but Detective Kim needs a number. Two tools do that job: r for how connected the clues are, and for how much of the mystery the connection actually explains.

What to know

  • Correlation (r) measures the direction and strength of a linear relationship. It always falls between −1 and 1.
  • The sign of r matches the direction (positive or negative). The size of r (how close to 1 or −1) matches the strength.
  • r = 0 means no linear relationship — it does not necessarily mean no relationship at all (a curve could still exist).
  • , the coefficient of determination, is the proportion (often shown as a %) of the variation in y that is explained by the linear relationship with x.
  • r² is easier to explain in plain English than r, which is why statisticians report both.
Evidence A, continued

How strong is the Study Hours connection?

For the six suspects in Cases 01–02, technology reports:

r = 0.992   r² = 0.984
Interpretation r = 0.992 is very close to 1, confirming a strong, positive, linear relationship between hours studied and test score.

r² = 0.984, or 98.4%, means about 98.4% of the variation in test scores among these suspects is explained by the linear relationship with hours studied. Only about 1.6% is left over — due to other factors, or plain randomness.
Detective Check

A different case reports r = 0.85. What is r², as a percent?

Solved
Case File 04

Skill: Residuals & Residual Plots

Checking the Detective's Work

Field Notes Even a good line makes mistakes on individual suspects. A residual is the size of that mistake — and plotting all the mistakes together reveals whether a straight line was ever the right tool for this case.

What to know

  • Residual = actual − predicted = y − ŷ.
  • A positive residual means the model underestimated that point (actual is higher). A negative residual means the model overestimated it.
  • Least-squares regression makes the sum of the residuals equal to 0 (they balance out).
  • A residual plot graphs the residuals against x. If the points are scattered randomly around the zero line with no leftover pattern, a linear model was a good choice.
  • If the residual plot shows a curve, that's a signal the true relationship is not linear, even if r was high.
Evidence A, continued

Residuals for the Study Hours Case

x123456
Actual y505565707890
Predicted ŷ48.4356.2664.0971.9179.7487.57
Residual (y−ŷ)1.57−1.260.91−1.91−1.742.43
Reading the residual plot If you plotted these six residuals against x, they'd bounce above and below zero with no leftover curve — small, patternless scatter. That confirms the straight-line model from Case 02 was a reasonable choice for this data. Notice the residuals also sum to (essentially) zero, as least-squares guarantees.
Detective Check

A suspect actually scored 82. The regression line predicted 78. What is the residual?

Solved
Case File 05

Skill: Outliers vs. Influential Points

The Suspect Who Doesn't Fit

Field Notes Every so often a strange clue turns up — one that breaks the pattern completely. Detective Kim's toughest question: does this weird clue actually change the whole case, or is it just... weird?

What to know

  • An outlier is any point that doesn't fit the overall pattern — it can be unusual in its x-value, its y-value, or both.
  • An influential point is a point whose removal would noticeably change the regression line (its slope and/or intercept).
  • The key factor for influence is usually an extreme x-value (called high leverage) — points near the middle of the x-values rarely swing the line much, even if their y-value is strange.
  • Not every outlier is influential, and not every influential point looks dramatic on a scatterplot at first glance — always check what happens to the line with and without it.
Evidence B

The Screen Time Case (a fresh dataset)

Baseline: 5 suspects' daily screen time (hours) vs. self-reported happiness (1–10 scale) — a perfect negative pattern:

Screen time (x)12345
Happiness (y)87654

Baseline line: ŷ = 9 − x, with r = −1.00 (perfectly linear).

Suspect A joins the case: x = 3, y = 20

This x-value (3) sits right in the middle of the x-range — low leverage.

Result r drops sharply from −1.00 to about −0.24 — the correlation weakens a lot. But the slope barely moves, staying at about −1.00. Suspect A is a clear outlier (way off the pattern in y), but is not influential — removing it wouldn't meaningfully change the line, because it sits near x̄.

Suspect B joins the case instead: x = 20, y = 3

This x-value (20) is far outside the original 1–5 range — high leverage.

Result The slope changes dramatically, from −1.00 to about −0.21, and r moves from −1.00 to about −0.79. Suspect B is both an outlier and an influential point — its extreme x-value drags the whole line toward it.
Detective Check

Which suspect is the influential point, and why?

Solved
Case File 06

Skill: Two-Way Tables & Conditional Distributions

Sorting Suspects Into Groups

Field Notes Not every clue is a number — sometimes it's a category. Detective Kim surveys a classroom of 100 students on two categorical clues: their gender and their favorite subject. Time to organize the evidence into a table.

What to know

  • A two-way table displays counts for two categorical variables at once — rows for one variable, columns for the other.
  • A marginal distribution looks at just one variable's totals (the row or column sums), ignoring the other variable.
  • A joint distribution gives each cell's count as a proportion of the entire table's total.
  • A conditional distribution looks at one variable's distribution restricted to just one category of the other — for example, "among boys only, what percent like each subject?"
  • To check for an association between two categorical variables, compare the conditional distributions across groups. If they're noticeably different, the variables appear related.
Evidence C

The Classroom Case

MathArtTotal
Boys402060
Girls152540
Total5545100
Conditional distribution of subject, given gender Boys: Math = 40/60 = 66.7%, Art = 20/60 = 33.3%
Girls: Math = 15/40 = 37.5%, Art = 25/40 = 62.5%

Since 66.7% is quite different from 37.5%, the two conditional distributions don't match — this suggests gender and subject preference are associated in this classroom.
Detective Check

What percent of girls prefer Art?

Solved
Final Debrief

Unit 2 Master Summary

The Complete Case Notebook

Field Notes Six cases closed, Detective. Before you leave the Agency, review the master notebook below — every tool from this unit, in one place.

01 · Scatterplots

Plot the explanatory variable (x) against the response variable (y). Describe direction, form, strength, and any unusual features.

02 · Regression Line

ŷ = b₀ + b₁x. Slope = predicted change in y per unit x. The line always passes through (x̄, ȳ). Interpolate with confidence; extrapolate with caution.

03 · r and r²

r (−1 to 1) measures direction and strength of a linear relationship. is the percent of variation in y explained by x.

04 · Residuals

residual = y − ŷ. A random, patternless residual plot confirms a linear model fits well; a curve means it doesn't.

05 · Outliers vs. Influential Points

An outlier breaks the pattern. It's influential only if removing it substantially changes the line — usually because of an extreme x-value (high leverage).

06 · Two-Way Tables

Compare conditional distributions across groups. Different distributions between groups suggest an association between the two categorical variables.

Case Closed