AP subjects/AP Statistics/t-Distribution vs Normal (z) Explorer
CED 4.2AP Statistics

t-Distribution vs Normal (z) Explorer

Use this free t-distribution vs normal (z) explorer to see why inference for a population mean uses t rather than z. Drag the degrees of freedom and compare the t curve and its critical value t∗t^* with the standard Normal curve and z∗z^*.

Controls
dfslider

How to use the simulator

The graph overlays two density curves on an axis labelled z / t, with ticks from −4 to 4. The teal solid curve is Student's t for the chosen degrees of freedom, and the navy dashed curve is the standard Normal z. Coral shading marks the tail area under the t curve beyond the critical value, and a coral line labels that cutoff to two decimal places.
  • Degrees of freedom df: a slider from 1 to 100 in steps of 1 (default 5).
  • Tail mode: Two-tail 95% (default, 2.5% in each tail), Right tail 5% or Left tail 5%.
The readout gives critical t* for the current df and critical z* to three decimal places (1.960 for two tails, 1.645 or −1.645 for one tail), plus t* − z* (extra width). A verdict box under them turns teal when that gap is under 0.1 and coral otherwise.
Values to try in Two-tail 95% mode: df = 1 gives t* = 12.706; df = 5 gives 2.571; df = 25 is the first setting where the gap drops below 0.1 (t* = 2.060); df = 100 gives 1.984, still slightly above 1.960. The verdict is only a comparison of critical values. It is not a rule that lets you switch to z for a mean.

The formula

When you standardize a sample mean using the sample standard deviation ss in place of the unknown σ\sigma, the result follows a t distribution:
t=xˉ−μ0s/n,df=n−1t = \frac{\bar{x} - \mu_0}{s/\sqrt{n}}, \qquad df = n - 1
A confidence interval for μ\mu uses the matching critical value:
xˉ±t∗sn\bar{x} \pm t^*\frac{s}{\sqrt{n}}
  • Like z, the t distributions are symmetric, bell-shaped and centred at 0.
  • They have heavier tails and a lower peak, because ss varies from sample to sample and adds extra uncertainty.
  • The smaller the df, the heavier the tails. As df grows, t approaches z.
  • At the same confidence level, t∗>z∗t^* > z^* for every df, so a t-interval is wider than a z-interval built from the same numbers.
Use t for inference about means whenever σ\sigma is estimated by ss, which is almost always. For matched pairs, n is the number of pairs. For two independent samples, take the df from technology. Proportions use z.

Worked example

Problem: A random sample of 16 bags of trail mix has mean weight xˉ=52.3\bar{x} = 52.3 g and standard deviation s=4.8s = 4.8 g. Construct a 95% confidence interval for the mean weight μ\mu of all bags.
Step 1: Conditions. The sample is random, and 16 bags is less than 10% of all bags. Since n < 30, you also need a graph of the sample showing no strong skew or outliers; assume the problem provides one.
Step 2: Standard error. s/n=4.8/16=1.2s/\sqrt{n} = 4.8/\sqrt{16} = 1.2 g.
Step 3: Critical value. df=16−1=15df = 16 - 1 = 15, so t∗=2.131t^* = 2.131.
Step 4: Interval. 52.3±2.131(1.2)=52.3±2.55852.3 \pm 2.131(1.2) = 52.3 \pm 2.558, which gives 49.74 g to 54.86 g.
Conclusion: we are 95% confident that the interval from 49.74 g to 54.86 g captures the true mean weight of all bags of this trail mix.
What z would have done: 1.96(1.2)=2.3521.96(1.2) = 2.352 gives 49.95 g to 54.65 g, about 0.41 g narrower in total. That interval looks more precise, but it would capture μ\mu less than 95% of the time.
Check it in the simulator: set df to 15 in Two-tail 95% mode. The readout shows t* = 2.131, z* = 1.960 and an extra width of 0.171, and the verdict box is coral.

Common mistakes on the AP exam

  • Using z* for a mean because n is large. With s in the standard error, the correct critical value is t*, even when n is 50 or 100.
  • Using the wrong df. For one sample, df = n − 1, not n. For paired data, n counts pairs, not individual measurements.
  • Using a one-tail value for a two-sided interval. A 95% interval puts 2.5% in each tail: t* = 2.131 at df = 15, not the one-tail 1.753.
  • Using t for proportions. Intervals and tests for p use z*, with p^(1−p^)/n\sqrt{\hat{p}(1-\hat{p})/n} as the standard error for an interval.
  • Thinking t replaces the Normal condition. t handles the extra uncertainty from estimating σ. You still need the population to be roughly Normal or n ≥ 30, or a graph with no strong skew or outliers.
  • Leaving out the name and df. Write "one-sample t-interval for μ, df = 15" so the reader can follow your work.

When the AP exam uses this

This is topic 4.2 in Unit 4 (Inference for Quantitative Data: Means), where t first appears for constructing a confidence interval for a population mean. Every later interval and test in the unit for one mean, paired differences or two means uses the same t family. A table of t critical values is supplied on the exam, and a graphing calculator gives exact values.
Embed this simulator on your class page

Free for classroom use. Paste this into your site, LMS page or blog; keep the credit link under it.