11. Inference for One Mean

b. Confidence Interval
Math 115

Yurk

From Testing to Estimation

The hypothesis test answers “Is the true mean equal to \mu_0?”

But we also want to know “What values of \mu are plausible given the data?”

Solution: a confidence interval for \mu using the t-distribution.

Same machinery as 11a — conditions, SE = s/\sqrt{n}, t-distribution with df = n - 1. New piece: a t critical value t^* replaces the test statistic.

Recap: Cherry Blossom

Is the true 2017 mean finish time different from 93.29 minutes (the historical 2006 value)? Random sample of n = 100 runners from the 2017 10-mile race.

Hypotheses (two-sided), with \mu = true 2017 mean:

H_0: \mu = 93.29    vs    H_A: \mu \neq 93.29

The data:

n \bar{x} s
100 99.02 17.93

From 11a: T \approx 3.19, p-value \approx 0.0019 → rejected H_0. The true 2017 mean differs from 93.29. Today: what is a plausible range for \mu?

CI Formula for One Mean

When conditions are met:

\text{CI} = \bar{x} \pm t^*_{df} \times \frac{s}{\sqrt{n}}

  • \bar{x} = point estimate; s / \sqrt{n} = standard error
  • t^*_{df} = t critical value (df = n - 1, from a t-table or statistical software)
  • t^*_{df} \times s/\sqrt{n} = margin of error

Confidence level → multiplier:

  • 90% → smaller t^* → narrower CI
  • 95% → standard choice
  • 99% → larger t^* → wider CI

Sample size matters too: smaller n (smaller df) → larger t^* → wider CI. As df grows, t^* approaches z^* (1.645 / 1.96 / 2.576).

Conditions for the CI

Same as 11a — all met for Cherry Blossom:

  • 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 ✓

Computing the 95% CI for Cherry Blossom

From 11a: \bar{x} = 99.02, s = 17.93, n = 100, SE \approx 1.793.

t critical value: t^*_{99} \approx 1.984 (95% confidence; very close to z^* = 1.96 since df = 99 is large).

Margin of error: ME = t^* \times SE = 1.984 \times 1.793 \approx 3.557

95% CI: \bar{x} \pm ME = 99.02 \pm 3.557 \approx (95.46, 102.57) minutes

Interpreting the CI

95% CI: (95.46, 102.57) minutes

Interpretation: We are 95% confident that the true mean finish time for all 2017 Cherry Blossom 10-mile runners lies between 95.46 and 102.57 minutes.

Does the CI include 93.29? No — the 2006 mean sits below the entire interval.

This agrees with the hypothesis test in 11a: rejected H_0 ↔︎ the 2006 value is outside the CI.

In plain terms: the 2017 mean is plausibly anywhere from about 2.2 to 9.3 minutes slower than 2006.

When CI and Test Agree

For a two-sided test at level \alpha vs. a (1 - \alpha) CI for \mu:

Test result CI for \mu
Reject H_0 excludes \mu_0
Fail to reject H_0 contains \mu_0

Same correspondence as for proportions (topics 6 / 10). The test asks “is \mu_0 ruled out?” — the CI shows you everything that isn’t ruled out.

The CI tells you how big the effect is, not just whether it exists.

Body Temperature — Setup

What’s a plausible range for true mean body temperature?

Data: same scenario as 11a — a random sample of n = 30 healthy adults, \bar{x} = 98.25^\circF, s = 0.73^\circF (sample stats from Shoemaker, 1996; based on Mackowiak et al., 1992). Wunderlich’s 98.6 is the historical reference.

Recall (from 11a): hypothesis test gave T \approx -2.63, p-value \approx 0.014 → rejected H_0: \mu = 98.6.

  1. Check the conditions. Independence: random sample of healthy adults ✓. Normality: n = 30 \geq 30 ✓ (assume no extreme outliers). Same as 11a.

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

Body Temperature — CI & Conclusion

Recall: \bar{x} = 98.25, SE \approx 0.133, df = 29. Use t^*_{29} \approx 2.045 for 95% confidence.

  1. Compute the margin of error. ME = t^* \times SE = 2.045 \times 0.133 \approx 0.273 °F

  2. Compute the 95% CI for \mu. \bar{x} \pm ME = 98.25 \pm 0.273 \approx (97.98, 98.52) °F

  3. Interpret the interval, check consistency with the 11a hypothesis test, and state scope. We’re 95% confident the true mean body temperature for healthy adults is between 97.98 and 98.52 °F. The CI excludes 98.6 — consistent with rejecting H_0 in 11a, and pointing to a true mean below Wunderlich’s value. Scope: random sample → conclusion generalizes to all healthy adults.

What Affects Strength of Evidence and CI Width?

Strength of evidence (larger |T| → smaller p-value)

T = \dfrac{\bar{x} - \mu_0}{s/\sqrt{n}}

  • Larger effect size |\bar{x} - \mu_0| → larger |T|
  • Larger sample size n → smaller SE → larger |T|
  • Smaller variability s → smaller SE → larger |T|

CI for \mu (narrower = more precise)

\bar{x} \pm t^* \times \dfrac{s}{\sqrt{n}}

  • Lower confidence level → smaller t^* → narrower CI
  • Larger sample size n → smaller SE and smaller t^* → narrower CI
  • Smaller variability s → smaller SE → narrower CI

Strength of Evidence — Predict

Cherry Blossom recap: n = 100, \bar{x} = 99.02, s = 17.93, \mu_0 = 93.29 → T \approx 3.19, p-value \approx 0.0019.

For each variant (others held constant), does the evidence become stronger or weaker?

  1. The researchers had sampled 400 runners instead of 100 (same \bar{x}, s). Stronger. Quadrupling n halves SE → |T| doubles.

  2. The sample mean had come in at 102 minutes instead of 99.02 (same n, s). Stronger. Larger effect size |\bar{x} - \mu_0| → larger |T| directly.

  3. The 2017 sample had been noisier: s = 25 instead of 17.93 (same n, \bar{x}). Weaker. Larger s → larger SE → smaller |T|.

CI Width — Predict

Cherry Blossom recap: 95% CI = (95.46, 102.57) minutes — width about 7.1 minutes.

For each variant (others held constant), does the CI become narrower or wider?

  1. The researchers had sampled 400 runners instead of 100 (same \bar{x}, s). Narrower. Larger n → smaller SE and smaller t^* → narrower CI.

  2. They build a 99% CI instead of 95%. Wider. Higher confidence → larger t^* → wider CI. (More confidence costs precision.)

  3. The 2017 sample had been noisier: s = 25 instead of 17.93. Wider. Larger s → larger SE → wider CI.

Same Logic: Proportions and Means

One Proportion One Mean
Statistic \hat{p} \bar{x}
H-test SE \sqrt{p_0(1-p_0)/n} s / \sqrt{n}
CI SE \sqrt{\hat{p}(1-\hat{p})/n} s / \sqrt{n}
Reference distribution normal (z) t (with df = n - 1)
CI \hat{p} \pm z^* \cdot SE \bar{x} \pm t^* \cdot SE
Test statistic Z = \dfrac{\hat{p} - p_0}{SE} T = \dfrac{\bar{x} - \mu_0}{SE}

Formulas differ; logic is identical: quantify sampling variability with SE → use it to measure precision (CI) or surprise (test).

Looking Ahead

We’ve built both halves of single-mean inference: hypothesis test (11a) and confidence interval (today).

Next time: two means — comparing the average of one group to another. Same t-distribution machinery, with a new SE for the difference \bar{x}_1 - \bar{x}_2.

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.