Detective Data: The Case of the Uncertain Mean
Every good detective story starts with a locked door. Ours starts with a locked number โ the true population mean, \(\mu\). We can never see it directly. We only get a small pile of evidence: a sample.
Worse still, we usually don't even know how spread out the population really is โ the true standard deviation, \(\sigma\), is locked away too. All we have is an estimate from our sample, \(s\).
Detective Minho has four case files on the desk today. Each one is solved with the same trusted tool: the t-distribution. Open a file below to begin.
The t-Distribution
Why we need a new curve when ฯ is unknown, and what "degrees of freedom" really means.
The Lone Sample
One sample, one claim to test. The one-sample t-test and t-interval.
The Paired Suspects
Before and after. Same subjects, measured twice โ the matched pairs t-test.
Two Rivals
Two separate groups face off. The two-sample t-test and interval.
Case File 01 โ The t-Distribution
Borrowed certainty: what happens when ฯ goes missing.
Detective Minho opens the thinnest file on the desk. Inside: a handful of measurements from a sample, and a note that reads, "Population standard deviation unknown."
Normally, a detective would use the reliable z-distribution โ but that tool only works when ฯ, the true population spread, is known. Without it, Minho must estimate ฯ using the sample's own standard deviation, \(s\). That estimate is a good guess, but a guess adds uncertainty.
To handle that extra uncertainty honestly, statisticians built a new curve: the t-distribution. It looks like the normal curve, but with fatter, taller tails โ more room reserved for the unexpected.
โ The Idea, in Plain Terms
- When ฯ is unknown, we substitute the sample standard deviation \(s\) for it. This is called standardizing with s instead of ฯ.
- Because \(s\) is only an estimate (it changes from sample to sample), our test statistic is less predictable than a z-score. The t-distribution's wider tails reflect that extra unpredictability.
- How much wider the tails are depends on the sample size, through a number called degrees of freedom (df).
- As the sample size \(n\) grows, \(s\) becomes a more trustworthy estimate of ฯ, so the t-distribution shrinks toward the normal curve. With a huge sample, t and z are almost identical.
โ Evidence Board: t* vs. z* at 95% Confidence
Notice how the critical value \(t^*\) shrinks toward \(z^*=1.960\) as degrees of freedom increase.
| df | 5 | 10 | 15 | 20 | 30 | z* (โ) |
|---|---|---|---|---|---|---|
| t* | 2.571 | 2.228 | 2.131 | 2.086 | 2.042 | 1.960 |
Which interval is wider?
A researcher builds two 95% confidence intervals from samples of the same size โ one using a t-distribution with df = 10 (because ฯ is unknown), and one using the normal distribution (imagine ฯ happened to be known). Which margin of error is larger?
Find the critical value
A detective needs a 90% confidence interval from a sample of size n = 15. What is t*?
Higher confidence, bigger number
Same detective now wants 99% confidence with a sample of size n = 25. Find t* and compare it to Clue #2.
๐ Case Notes โ Unit Recap
- Use the t-distribution whenever ฯ is unknown and estimated by s (almost always, in real life).
- \(df = n-1\) for a single sample.
- Bigger df โ t-distribution looks more like the normal curve.
- Higher confidence level โ larger t* โ wider interval, holding everything else fixed.
Detective's Challenge
Case File 02 โ The Lone Sample
One sample. One claim to test. Can the evidence back it up?
Cafรฉ Central hangs a sign: "95 mg of caffeine per cup โ guaranteed." Detective Minho isn't so sure. He buys 12 cups, tests each one in the lab, and now holds a single sample of evidence against a single claim.
This is the simplest kind of case: one sample, one number to check. The tool for the job is the one-sample t-test โ and if Minho instead wants to estimate the true mean rather than test a claim, he builds a one-sample t-interval.
โ Conditions to Check First
The sample was collected using random sampling (or a randomized experiment).
The population is Normal, or the sample is large (n โฅ 30), or a graph of the data shows no strong skew or outliers.
Individual observations are independent. If sampling without replacement, the sample is less than 10% of the population.
Testing Cafรฉ Central's Claim
Cafรฉ Central claims ฮผ = 95 mg. Minho's sample: n = 12 cups, mean \(\bar{x} = 91.2\) mg, s = 5.8 mg. Test at ฮฑ = 0.05. Assume conditions are met.
Estimating Battery Life
A tech reviewer tests n = 20 phones of the same model. Sample mean battery life \(\bar{x} = 4.6\) hours, s = 1.2 hours. Build a 95% confidence interval for the true mean battery life.
A Smaller Clue
n = 16, \(\bar{x} = 50\), s = 8, claimed \(\mu_0 = 45\). Test at ฮฑ = 0.05, two-tailed.
๐ Case Notes โ Unit Recap
- One sample, one hypothesized value ฮผโ โ one-sample t-test.
- Always check Random, Normal/Large Sample, Independent before calculating.
- Small p-value (less than ฮฑ) โ reject Hโ; otherwise, fail to reject.
- A confidence interval estimates ฮผ directly, with no hypothesized value needed.
Detective's Challenge
Case File 03 โ The Paired Suspects
Same subjects, two measurements. The difference tells the story.
A new file lands on the desk โ this one has two columns: Before and After. Eight people joined a diet program, and Minho has each person's weight before and after eight weeks.
This isn't two separate groups โ it's the same subjects, measured twice. When data comes in natural pairs like this, we don't run a two-sample test. Instead, we collapse each pair into a single difference, and run a one-sample t-test on those differences.
โ The Idea, in Plain Terms
- Matched pairs data comes from the same individual measured twice (before/after), or from naturally linked pairs (twins, left shoe/right shoe).
- Step 1: compute the difference for every pair, \(d_i = x_{1i} - x_{2i}\).
- Step 2: treat those differences as a single sample and run an ordinary one-sample t-test, testing whether the mean difference is 0 (or some other claimed value).
- Pairing controls for individual differences between subjects โ it isolates the effect we actually care about.
The Diet Program
Weights (lbs) for 8 participants, before and after an 8-week program:
| Before | 180 | 165 | 200 | 175 | 190 | 160 | 205 | 170 |
|---|---|---|---|---|---|---|---|---|
| After | 174 | 160 | 193 | 171 | 183 | 155 | 198 | 166 |
| Diff (BโA) | 6 | 5 | 7 | 4 | 7 | 5 | 7 | 4 |
Test whether the program produces true mean weight loss (ฮฑ = 0.05, one-tailed: \(H_a: \mu_d > 0\)).
The Reaction Time Puzzle
Six volunteers have their reaction time (milliseconds) measured before and after drinking a cup of coffee. Differences (Before โ After): 5, โ3, 2, 5, 3, 2. Test \(H_a: \mu_d > 0\) at ฮฑ = 0.05.
๐ Case Notes โ Unit Recap
- Recognize matched pairs: same subjects measured twice, or naturally linked pairs.
- Reduce every pair to one difference, then run a one-sample t-test on the differences.
- \(df = n-1\), where n is the number of pairs.
- A large p-value doesn't prove "no difference" โ it only means the sample didn't provide convincing evidence.
Detective's Challenge
Case File 04 โ Two Rivals
Two independent groups. Is the gap between them real?
The final file compares two rival study methods. Group A used flashcards; Group B used practice tests. The two groups are made of completely different students โ nobody appears in both groups.
Because the two samples are independent (no pairing, no overlap), Minho reaches for the two-sample t-test to compare the two population means directly.
โ Conditions to Check First
Both samples are randomly selected, or come from a randomized experiment.
Both populations are Normal, or both samples are large, or graphs show no strong skew/outliers.
The two samples are independent of each other, and observations within each sample are independent (10% condition if needed).
Flashcards vs. Practice Tests
Group A (flashcards): nโ = 10, mean score \(\bar{x}_1 = 82.4\), sโ = 6.1. Group B (practice tests): nโ = 12, \(\bar{x}_2 = 76.8\), sโ = 7.3. Test at ฮฑ = 0.05 whether the true mean scores differ.
Weekly Study Hours
Group A: nโ = 15, \(\bar{x}_1 = 6.2\) hrs, sโ = 1.5. Group B: nโ = 18, \(\bar{x}_2 = 5.4\) hrs, sโ = 1.8. Build a 95% confidence interval for \(\mu_1 - \mu_2\).
๐ Case Notes โ Unit Recap
- Two-sample t applies to two separate, independent groups โ never the same subjects twice.
- No pooling required in AP Statistics: always use the two-sample (Welch) standard error formula.
- A confidence interval for \(\mu_1-\mu_2\) that contains 0 matches "fail to reject Hโ" in a two-tailed test.
Detective's Challenge
Master File โ Case Closed
All four cases, solved. Here is the complete evidence file.
01 ยท The t-Distribution
- Use when ฯ is unknown and estimated by s.
- Fatter tails than normal; approaches normal as df increases.
- Higher confidence level โ larger t* โ wider interval.
02 ยท One-Sample t-Test / Interval
- One sample, one hypothesized value ฮผโ.
- df = n โ 1.
- Check Random, Normal/Large Sample, Independent.
03 ยท Matched Pairs t-Test
- Same subjects measured twice, or naturally linked pairs.
- Reduce pairs to differences first, then run a one-sample t-test.
- n = number of pairs, not number of measurements.
04 ยท Two-Sample t-Test / Interval
- Two separate, independent groups โ never the same subjects twice.
- No pooling in AP Statistics; use technology or the conservative df.
- A CI for ฮผโ โ ฮผโ containing 0 matches "fail to reject" at the matching ฮฑ.
Every mean has a story. Every t-statistic is a clue. Well done, Detective โ Unit 7 is solved.