11. Inference for One Mean

a. Hypothesis Test
Math 115

Yurk

Where We’ve Been — and Where We’re Going

Topic Variables Statistic Example
6 One binary categorical \(\hat{p}\) Payday loans — fraction supporting regulation
10 Two binary categorical \(\hat{p}_1 - \hat{p}_2\) CPR — survival rates by treatment
11 (today) One numerical \(\bar{x}\) Cherry Blossom — mean finish time
12 Numerical + binary categorical \(\bar{x}_1 - \bar{x}_2\) Birth weights — by smoking habit

Same framework throughout — only the statistic changes row to row.

From Proportions to Means

Topic 2 introduced the sample mean as a way to describe a numerical variable’s center. Today it becomes our statistic of interest for inference — with notation that mirrors the proportions pattern.

Quantity Sample (statistic) Population (parameter)
Center \(\bar{x}\) (“x-bar”) \(\mu\) (“mu”)
Spread \(s\) \(\sigma\) (“sigma”)

\(\bar{x}\) and \(s\) come from the sample; \(\mu\) and \(\sigma\) are population values we want to learn about. Both pairs will show up in the formulas coming next.

Cherry Blossom Run

Are runners getting faster or slower? Annual 10-mile race in Washington, D.C.

  • 2006 mean finish time (all runners): 93.29 minutes
  • Data: random sample of 100 runners from the 2017 race

Hypotheses (two-sided). Let \(\mu\) = true mean finish time for all 2017 10-mile runners.

  • \(H_0: \mu = 93.29\) (no change from 2006)
  • \(H_A: \mu \neq 93.29\) (mean has changed in either direction)

EDA: Cherry Blossom

n mean (\(\bar{x}\)) sd (\(s\)) min max
100 99.02 17.93 53.3 139.1

Observed: sample mean is \(\bar{x} = 99.02\) minutes — about 5.7 minutes higher than the 2006 mean of 93.29. Sampling noise, or a real shift?

A New CLT Result: One Mean

When conditions are met, the sampling distribution of the sample mean is approximately normal with:

  • Mean: \(\mu\) (the true population mean)
  • Standard Error: \(SE = \dfrac{\sigma}{\sqrt{n}}\)

The catch: we don’t know the population SD \(\sigma\).

Fix: substitute the sample SD \(s\) for \(\sigma\), so \(SE \approx \dfrac{s}{\sqrt{n}}\).

Try it: if we quadrupled the sample size (keeping \(s\) unchanged), what happens to \(SE\)?

\(SE\) shrinks by half: \(\sqrt{4n} = 2\sqrt{n}\), so the denominator doubles. Halving \(SE\) costs four times the data.

Technical Conditions: One Mean

Two conditions for inference about \(\mu\) from a single sample:

Condition Rule
Independence Sample observations independent — typically from a random sample (with \(n < 10\%\) of the population), otherwise justified from study context
Normality \(n \geq 30\): data may show mild skew, but no extreme outliers.
\(n < 30\): data should look roughly normal.

Try it: do both conditions hold for the Cherry Blossom sample? (The 2017 10-mile field had \(17,442\) runners.)

Independence: random sample of 2017 runners, \(n = 100\) is well under 10% of the \(17,442\) 10-mile runners ✓. Normality: \(n = 100 \geq 30\) ✓; histogram is roughly symmetric with no extreme outliers ✓. Both conditions met.

Test Statistic for One Mean

The T-statistic measures how far \(\bar{x}\) is from the null value \(\mu_0\), in SE units:

\[T = \frac{\bar{x} - \mu_0}{s / \sqrt{n}}\]

Where:

  • \(\bar{x}\) is the observed sample mean
  • \(\mu_0\) is the null value (from \(H_0: \mu = \mu_0\))
  • \(s / \sqrt{n}\) is the estimated SE

Same formula structure as Z — observed minus null over SE. But \(T\) uses \(s\) in place of \(\sigma\), so under \(H_0\) it doesn’t quite follow the standard normal. It needs its own reference distribution — coming up next.

The t-Distribution

Under \(H_0\), \(T = (\bar{x} - \mu_0)/(s/\sqrt{n})\) follows a t-distribution with degrees of freedom \(df = n - 1\).

  • Bell-shaped and symmetric like the normal
  • Thicker tails (more probability of extreme values — accounting for the noise in \(s\))
  • Smaller \(n\) → thicker tails (noisier \(s\))
  • As \(df\) grows, t approaches the normal

A p-value comes from an area under the appropriate t-distribution — we’ll walk through one when we work through Cherry Blossom.

Statistic & Test Statistic

For each scenario, identify the statistic of interest and the test statistic (\(Z\) or \(T\)).

  1. A pre-election poll asks 500 voters about a ballot measure. Is the percentage who support it different from 50%? Statistic: \(\hat{p}\) (single proportion). Test statistic: \(Z\) — normal model (topic 6).

  2. A clinical trial randomly assigns patients to a new drug or placebo. Do the recovery rates differ between groups? Statistic: \(\hat{p}_1 - \hat{p}_2\) (difference of proportions). Test statistic: \(Z\) — normal model (topic 10).

  3. A nutrition study measures sodium content in 40 fast-food burgers. Is the mean sodium content different from 1200 mg? Statistic: \(\bar{x}\) (single mean). Test statistic: \(T\) — t-distribution with \(df = n - 1\) (today).

Putting It Together for Cherry Blossom

Hypotheses (two-sided): \(H_0: \mu = 93.29\) vs \(H_A: \mu \neq 93.29\)

Sample

  • \(n = 100\)
  • \(\bar{x} = 99.02\) minutes
  • \(s = 17.93\) minutes

Conditions met (random sample; \(n = 100 \geq 30\); no extreme outliers). Coming up: compute SE → compute T → get p-value → conclude.

Computing T for Cherry Blossom

SE: \(\dfrac{s}{\sqrt{n}} = \dfrac{17.93}{\sqrt{100}} \approx 1.793\) minutes

Try it: plug into \(T = \dfrac{\bar{x} - \mu_0}{SE}\) with \(\bar{x} = 99.02\), \(\mu_0 = 93.29\), \(SE \approx 1.793\).

\(T = \dfrac{99.02 - 93.29}{1.793} \approx 3.19\) — the sample mean sits about 3.2 SEs above the 2006 value.

Calculating the P-value

Two-sided p-value = 2 × (smaller-tail area) \(\approx 0.0019\)

Conclusion for Cherry Blossom

Results: \(T \approx 3.19\) (\(df = 99\)), p-value \(\approx 0.0019\) — well below 0.05 → reject \(H_0\).

Conclusion: Convincing evidence that the mean finish time for 2017 Cherry Blossom 10-mile runners differs from 93.29 minutes, the mean from 2006.

In plain terms: the 2017 sample mean was about 5.7 minutes higher than 93.29 — runners were noticeably slower, and a difference this large is very unusual by chance.

Scope: random sample of 2017 runners → conclusion extends to all 2017 10-mile runners.

Body Temperature — Setup

Is the average body temperature really 98.6°F? The 98.6 value comes from 19th-century work by Wunderlich; modern work suggests it’s lower.

Data: a random sample of \(n = 30\) healthy adults with \(\bar{x} = 98.25^\circ\)F, \(s = 0.73^\circ\)F (sample stats from Shoemaker, 1996; based on Mackowiak et al., 1992).

  1. State \(H_0\) and \(H_A\) for \(\mu\) = true mean body temperature (two-sided). \(H_0: \mu = 98.6\)    \(H_A: \mu \neq 98.6\)

  2. What is \(\bar{x} - \mu_0\)? In which direction? \(98.25 - 98.6 = -0.35^\circ\)F. Sample mean is lower than the 98.6 reference — consistent with the modern challenge to Wunderlich’s value.

Body Temperature — Conditions

Recall: \(n = 30\), \(\bar{x} = 98.25\), \(s = 0.73\), \(\mu_0 = 98.6\).

  1. Check independence. Random sample of healthy adults ✓ — observations should be independent.

  2. Check normality. \(n = 30\) meets the rule of thumb (\(n \geq 30\)) ✓. With raw data we’d also look for strong skew or extreme outliers; body temperatures for healthy adults are typically near-symmetric, so we’ll assume that’s fine.

Body Temperature — T and Conclusion

Recall: \(\bar{x} = 98.25\), \(s = 0.73\), \(n = 30\), \(\mu_0 = 98.6\); conditions met.

  1. Compute the degrees of freedom. \(df = n - 1 = 29\)

  2. Compute the standard error. \(SE = s / \sqrt{n} = 0.73 / \sqrt{30} \approx 0.133\)

  3. Compute \(T\). \(T = (\bar{x} - \mu_0) / SE = (98.25 - 98.6) / 0.133 \approx -2.63\)

  4. The two-sided p-value is about 0.014. Conclusion at \(\alpha = 0.05\), including scope? p-value \(< 0.05\) → reject \(H_0\). Convincing evidence the true mean body temperature differs from 98.6°F (and the sample suggests it’s lower). Scope: random sample → conclusion generalizes to all healthy adults.

Looking Ahead

We’ve tested “Is the true mean equal to \(\mu_0\)?” with the t-distribution.

Next time: a confidence interval for \(\mu\) — “What’s a plausible range for the true mean?” — using the same t-distribution machinery.

What about randomization? Simulation-based methods (like topics 3 and 9 for proportions) also exist for means and work in a similar way — useful when normality is in question (though they carry their own assumptions). We won’t cover them in the slides; you’ll meet them in a later lab.

References

  • Introduction to Modern Statistics (2e) textbook by Mine Çetinkaya-Rundel and Johanna Hardin
  • Section 19.2
  • Shoemaker, A. L. (1996). What’s normal? — Temperature, gender, and heart rate. Journal of Statistics Education, 4(2). link
  • Mackowiak, P. A., Wasserman, S. S., & Levine, M. M. (1992). A critical appraisal of 98.6°F, the upper limit of the normal body temperature, and other legacies of Carl Reinhold August Wunderlich. JAMA, 268(12), 1578–1580.