01 / 21

Confidence Intervals
for a Mean

Learn to construct and interpret t-intervals that estimate a population mean from sample data: the foundation of biostatistical inference.

Biostatistics

What Is a Confidence Interval?

A confidence interval (CI) is a range of plausible values for an unknown population parameter. Instead of a single point estimate, a CI tells us: "We are \( C\% \) confident the true population mean \( \mu \) falls within this interval."

Point Estimate
The sample mean \( \bar{x} \): our single best guess for \( \mu \).
Interval Estimate
A range \( (\bar{x} - E,\; \bar{x} + E) \) that likely contains \( \mu \).

Why Use the \( t \)-Distribution?

When the population standard deviation \( \sigma \) is unknown (the usual case in biostatistics), we estimate it with the sample standard deviation \( s \). This extra uncertainty means we need wider tails than the normal curve: enter the \( t \)-distribution.

0 \( z \)-curve \( t \)-curve Heavier tails = wider CI

Understanding Degrees of Freedom

The shape of the \( t \)-distribution depends on degrees of freedom (df). For a one-sample \( t \)-interval:

Small df (e.g., 3)
Heavy tails, larger \( t^* \) critical value, wider CI.
Large df (e.g., 120)
Tails shrink, \( t^* \approx z^* \), CI narrows toward the \( z \)-interval.

The \( t \)-Interval Formula

\( \bar{x} \)
Sample Mean ±
\( t^* \)
Critical Value ·
\( \frac{s}{\sqrt{n}} \)
Standard Error Margin of Error (E)

The interval stretches from \( \bar{x} - E \) to \( \bar{x} + E \), where \( E = t^* \cdot \dfrac{s}{\sqrt{n}} \) is the margin of error.

Anatomy of a 95% CI

\( \bar{x} \) \( \bar{x} - E \) \( \bar{x} + E \) \( E \) \( E \) \( \mu \) (unknown, hopefully inside!)

\( z \)-Interval vs \( t \)-Interval

\( z \)-Interval \( t \)-Interval
\( \sigma \) known? Yes No (use \( s \))
Critical value \( z^* \) \( t^*_{\,\text{df}} \)
Standard error \( \frac{\sigma}{\sqrt{n}} \) \( \frac{s}{\sqrt{n}} \)
Interval width Narrower Wider (extra uncertainty)
When to use Rare (textbook only) Almost always in practice

Checking the Conditions

Before computing a \( t \)-interval, verify three conditions:

1
Random: The data come from a random sample or randomized experiment.
2
Independence (10% rule): The sample size \( n \) is less than 10% of the population, or observations are independent.
3
Nearly Normal: The population is approximately normal, or \( n \geq 30 \) (Central Limit Theorem), or the sample data show no strong skewness or outliers.

How to Compute a \( t \)-Interval

1
Check conditions: Random, Independent, Nearly Normal.
2
Calculate the sample statistics: Find \( \bar{x} \) (sample mean) and \( s \) (sample standard deviation).
3
Determine df: \( \text{df} = n - 1 \).
4
Find \( t^* \): Look up the critical value for your confidence level and df (e.g., \( t^* = 2.064 \) for 95% CI with df = 24).
5
Compute the interval: \( \bar{x} \pm t^* \cdot \dfrac{s}{\sqrt{n}} \).
6
Interpret: "We are \( C\% \) confident that the true population mean lies between (lower, upper)."

Example 1: Blood Pressure

A random sample of \( n = 25 \) patients has a mean systolic blood pressure of \( \bar{x} = 128 \) mmHg with \( s = 15 \) mmHg. Construct a 95% confidence interval for the population mean.

1
df = \( 25 - 1 = 24 \)
2
\( t^* \) for 95% CI, df = 24: \( t^* = 2.064 \)
3
Standard Error: \( \dfrac{s}{\sqrt{n}} = \dfrac{15}{\sqrt{25}} = \dfrac{15}{5} = 3.0 \)
4
Margin of Error: \( E = 2.064 \times 3.0 = 6.192 \)

Example 1: Visualized

120 125 130 135 \( \bar{x} = 128 \) 121.81 134.19 \( E = 6.19 \) \( E = 6.19 \) 95% Confidence Interval

Example 2: Cholesterol Levels

A researcher randomly selects \( n = 16 \) adults and measures total cholesterol (mg/dL). The sample gives \( \bar{x} = 210 \) and \( s = 28 \). Build a 90% CI for the mean.

1
df = \( 16 - 1 = 15 \)
2
\( t^* \) for 90% CI, df = 15: \( t^* = 1.753 \)
3
SE = \( \dfrac{28}{\sqrt{16}} = \dfrac{28}{4} = 7.0 \)
4
ME = \( 1.753 \times 7.0 = 12.271 \)

Example 3: Reaction Time

A neuroscience study tests \( n = 36 \) participants for reaction time (ms). Results: \( \bar{x} = 245 \), \( s = 42 \). Construct a 99% CI.

1
df = \( 36 - 1 = 35 \)
2
\( t^* \) for 99% CI, df = 35: \( t^* = 2.724 \)
3
SE = \( \dfrac{42}{\sqrt{36}} = \dfrac{42}{6} = 7.0 \)
4
ME = \( 2.724 \times 7.0 = 19.07 \)

What Affects Interval Width?

Confidence Level ↑
Higher confidence (e.g., 99% vs 95%) means a larger \( t^* \), so the interval gets wider.
Sample Size \( n \) ↑
Larger \( n \) shrinks \( \frac{s}{\sqrt{n}} \) and lowers \( t^* \) (more df), so the interval gets narrower.
Variability \( s \) ↑
More spread in the data increases the standard error, making the interval wider.

Common Mistakes

✕ Using \( z^* \) instead of \( t^* \)
When \( \sigma \) is unknown and you use \( s \), you must use the \( t \)-distribution, not \( z \).
✕ Wrong df
Degrees of freedom is \( n - 1 \), not \( n \). Using \( n \) gives the wrong critical value.
✕ Misinterpreting the CI
Saying "95% chance \( \mu \) is in the interval" is wrong. The interval is fixed; \( \mu \) either is or isn't inside. The 95% refers to the method.

Summary at a Glance

Component Symbol / Formula Key Detail
Point estimate \( \bar{x} \) Sample mean
Standard error \( \frac{s}{\sqrt{n}} \) Measures precision
Critical value \( t^*_{\,\text{df}} \) From \( t \)-table, \( \text{df} = n-1 \)
Margin of error \( E = t^* \cdot \dfrac{s}{\sqrt{n}} \) Half-width of interval
CI formula \( \bar{x} \pm E \) Always state confidence level
Conditions R-I-N Random, Independent, Normal

Question 1 of 5

A sample of \( n = 20 \) yields \( \bar{x} = 50 \), \( s = 10 \). What are the degrees of freedom for the \( t \)-interval?

Question 2 of 5

Which formula gives the margin of error for a \( t \)-interval?

Question 3 of 5

A 95% CI for mean heart rate is (68, 76) bpm. Which interpretation is correct?

Question 4 of 5

With \( n = 25 \), \( \bar{x} = 128 \), \( s = 15 \), and \( t^* = 2.064 \), what is the 95% CI?

Question 5 of 5

All else equal, which change would make a confidence interval narrower?