DETECTIVE DATA
A Statistics Mystery

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.

Case File 01

The t-Distribution

Why we need a new curve when ฯƒ is unknown, and what "degrees of freedom" really means.

Case File 02

The Lone Sample

One sample, one claim to test. The one-sample t-test and t-interval.

Case File 03

The Paired Suspects

Before and after. Same subjects, measured twice โ€” the matched pairs t-test.

Case File 04

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.

Open Case

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.
\[ df = n - 1 \]
One degree of freedom is "spent" estimating the sample mean, leaving n โˆ’ 1 independent pieces of information to estimate the spread.

โ—† Evidence Board: t* vs. z* at 95% Confidence

Notice how the critical value \(t^*\) shrinks toward \(z^*=1.960\) as degrees of freedom increase.

df510152030z* (โˆž)
t*2.5712.2282.1312.0862.0421.960
Clue #1

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?

1
Look up the critical values: \(t^*_{df=10} = 2.228\) vs. \(z^* = 1.960\).
2
Since the margin of error is \(critical\ value \times SE\), and 2.228 > 1.960, the t-interval has the larger margin of error.
Verdict: The t-interval is wider. Not knowing ฯƒ costs us precision โ€” that's the price of borrowed certainty.
Clue #2

Find the critical value

A detective needs a 90% confidence interval from a sample of size n = 15. What is t*?

1
Degrees of freedom: \(df = n - 1 = 15 - 1 = 14\).
2
For a 90% confidence level, the middle 90% is captured, leaving 5% in each tail: look up \(t^*\) with area 0.05 to the right, df = 14.
3
From the t-table (or technology): \(t^* \approx 1.761\).
Verdict: t* = 1.761 for a 90% CI with df = 14.
Clue #3

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.

1
\(df = 25 - 1 = 24\).
2
99% confidence leaves 0.5% in each tail. Looking up \(t^*\) at df = 24: \(t^* \approx 2.797\).
Verdict: t* = 2.797 โ€” much larger than 1.761 from Clue #2. Higher confidence always demands a bigger critical value, which means a wider interval.

๐Ÿ“‹ 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.
Solved
Solve It Yourself

Detective's Challenge

A sample has n = 21 observations. How many degrees of freedom does its t-distribution have?

Case File 02 โ€” The Lone Sample

One sample. One claim to test. Can the evidence back it up?

Open Case

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

Random

The sample was collected using random sampling (or a randomized experiment).

Normal

The population is Normal, or the sample is large (n โ‰ฅ 30), or a graph of the data shows no strong skew or outliers.

Independent

Individual observations are independent. If sampling without replacement, the sample is less than 10% of the population.

\[ t = \dfrac{\bar{x} - \mu_0}{s / \sqrt{n}} \qquad df = n-1 \]
Confidence interval: \( \bar{x} \pm t^{*}\dfrac{s}{\sqrt{n}} \)
Case Evidence

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.

1
Hypotheses: \(H_0: \mu = 95\), \(H_a: \mu \neq 95\).
2
Standard error: \(SE = \dfrac{5.8}{\sqrt{12}} = 1.674\).
3
Test statistic: \(t = \dfrac{91.2 - 95}{1.674} = -2.270\), with \(df = 11\).
4
Two-tailed p-value: \(p \approx 0.0443\). Compare to ฮฑ = 0.05.
Verdict: Since p โ‰ˆ 0.0443 < 0.05, reject Hโ‚€. There is convincing evidence the true mean caffeine content differs from 95 mg โ€” Cafรฉ Central's sign is misleading.
Case Evidence

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.

1
\(df = 20 - 1 = 19\), so \(t^* = 2.093\) for 95% confidence.
2
Standard error: \(SE = \dfrac{1.2}{\sqrt{20}} = 0.268\).
3
Margin of error: \(ME = 2.093 \times 0.268 = 0.562\).
4
Interval: \(4.6 \pm 0.562 = (4.038,\ 5.162)\).
Verdict: We are 95% confident the true mean battery life is between 4.04 and 5.16 hours.
Quick Check

A Smaller Clue

n = 16, \(\bar{x} = 50\), s = 8, claimed \(\mu_0 = 45\). Test at ฮฑ = 0.05, two-tailed.

1
\(SE = \dfrac{8}{\sqrt{16}} = 2\).
2
\(t = \dfrac{50-45}{2} = 2.5\), \(df = 15\), so \(t^* = 2.131\).
3
Since \(|t| = 2.5 > 2.131\), the p-value (โ‰ˆ 0.0245) is less than 0.05.
Verdict: Reject Hโ‚€. The evidence suggests the true mean is not 45.

๐Ÿ“‹ 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.
Solved
Solve It Yourself

Detective's Challenge

df = 15 and the test statistic is t = 2.5. Using t* = 2.131 for a two-tailed test at ฮฑ = 0.05, should we reject Hโ‚€?

Case File 03 โ€” The Paired Suspects

Same subjects, two measurements. The difference tells the story.

Open Case

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.
\[ t = \dfrac{\bar{d} - 0}{s_d / \sqrt{n}} \qquad df = n - 1 \]
n = number of pairs (not individual measurements), \(\bar{d}\) = mean of the differences, \(s_d\) = standard deviation of the differences.
Case Evidence

The Diet Program

Weights (lbs) for 8 participants, before and after an 8-week program:

Before180165200175190160205170
After174160193171183155198166
Diff (Bโˆ’A)65747574

Test whether the program produces true mean weight loss (ฮฑ = 0.05, one-tailed: \(H_a: \mu_d > 0\)).

1
Mean difference: \(\bar{d} = 5.625\) lbs. Standard deviation of differences: \(s_d = 1.303\) lbs.
2
\(SE = \dfrac{1.303}{\sqrt{8}} = 0.461\).
3
\(t = \dfrac{5.625}{0.461} = 12.22\), \(df = 7\).
4
One-tailed p-value is essentially 0 (far beyond \(t^* = 1.895\)).
Verdict: Reject Hโ‚€. This is an open-and-shut case โ€” overwhelming evidence of true mean weight loss.
Case Evidence

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.

1
\(\bar{d} = 2.333\) ms, \(s_d = 2.944\) ms, \(n = 6\).
2
\(SE = \dfrac{2.944}{\sqrt{6}} = 1.202\), \(t = \dfrac{2.333}{1.202} = 1.942\), \(df = 5\).
3
One-tailed critical value \(t^* = 2.015\); p-value โ‰ˆ 0.0549.
Verdict: Since p โ‰ˆ 0.0549 > 0.05, fail to reject Hโ‚€. The trail runs a little cold โ€” this sample doesn't give quite enough evidence that coffee speeds reaction time. "Fail to reject" is not the same as "proven no effect": with a slightly larger sample, this case might resolve differently.

๐Ÿ“‹ 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.
Solved
Solve It Yourself

Detective's Challenge

Which situation calls for a matched pairs t-test?

Case File 04 โ€” Two Rivals

Two independent groups. Is the gap between them real?

Open Case

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

Random

Both samples are randomly selected, or come from a randomized experiment.

Normal

Both populations are Normal, or both samples are large, or graphs show no strong skew/outliers.

Independent

The two samples are independent of each other, and observations within each sample are independent (10% condition if needed).

\[ t = \dfrac{(\bar{x}_1 - \bar{x}_2) - 0}{\sqrt{\dfrac{s_1^2}{n_1} + \dfrac{s_2^2}{n_2}}} \]
Confidence interval: \( (\bar{x}_1-\bar{x}_2) \pm t^{*}\sqrt{\dfrac{s_1^2}{n_1}+\dfrac{s_2^2}{n_2}} \) โ€” technology finds df (Welch's method); by hand, the conservative choice is \(df = \min(n_1-1,\ n_2-1)\).
Case Evidence

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.

1
Hypotheses: \(H_0: \mu_1 = \mu_2\), \(H_a: \mu_1 \neq \mu_2\).
2
\(SE = \sqrt{\dfrac{6.1^2}{10} + \dfrac{7.3^2}{12}} = 2.857\).
3
\(t = \dfrac{82.4-76.8}{2.857} = 1.960\), technology gives \(df \approx 20.0\).
4
Two-tailed p-value โ‰ˆ 0.0641.
Verdict: Since p โ‰ˆ 0.064 > 0.05, fail to reject Hโ‚€. The case remains open โ€” this sample doesn't provide quite enough evidence that the two study methods truly differ, even though flashcards scored higher on average.
Case Evidence

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\).

1
Point estimate: \(6.2 - 5.4 = 0.8\) hrs.
2
\(SE = \sqrt{\dfrac{1.5^2}{15}+\dfrac{1.8^2}{18}} = 0.575\); technology df โ‰ˆ 31, so \(t^* \approx 2.040\).
3
Margin of error: \(2.040 \times 0.575 = 1.172\).
4
Interval: \(0.8 \pm 1.172 = (-0.372,\ 1.972)\).
Verdict: The interval contains 0, so we cannot rule out "no real difference" between the groups' true mean study hours โ€” consistent with the test result above.

๐Ÿ“‹ 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.
Solved
Solve It Yourself

Detective's Challenge

A two-sample t-test is the right tool when:

Master File โ€” Case Closed

All four cases, solved. Here is the complete evidence file.

Closed

01 ยท The t-Distribution

\[ df = n-1 \]
  • 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

\[ t = \dfrac{\bar{x}-\mu_0}{s/\sqrt{n}} \qquad \bar{x} \pm t^{*}\dfrac{s}{\sqrt{n}} \]
  • One sample, one hypothesized value ฮผโ‚€.
  • df = n โˆ’ 1.
  • Check Random, Normal/Large Sample, Independent.

03 ยท Matched Pairs t-Test

\[ t = \dfrac{\bar{d}}{s_d/\sqrt{n}} \]
  • 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

\[ t = \dfrac{(\bar{x}_1-\bar{x}_2)}{\sqrt{\dfrac{s_1^2}{n_1}+\dfrac{s_2^2}{n_2}}} \]
  • 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 ฮฑ.
Case Closed

Every mean has a story. Every t-statistic is a clue. Well done, Detective โ€” Unit 7 is solved.