AP Statistics · Topic 4.5 · Unit 4

AP Stats 4.5: Carrying Out a t-Test for a Mean

By Jude Wallis · Published

Topic 4.5 carries out the one-sample t-test: t equals x-bar minus mu-naught, divided by s over the square root of n, with n minus 1 degrees of freedom. Find the p-value from the t-distribution, then reject the null if the p-value is at most alpha, and state the conclusion in context.

AP Statistics: Unit 4 (topics 4.5). Topic 4.5 (Carrying Out a Test for a Population Mean or Population Mean Difference) in the Fall 2026 AP Statistics course.

What topic 4.5 covers

Topic 4.5 finishes the test you set up in topic 4.4. You calculate the test statistic and p-value, interpret the p-value, and use it to justify a conclusion about the population mean μ\mu (mu). This is the computational and reasoning core of one-sample inference for a mean, and it is fair game on free-response question 3.

The same procedure works on a sample of paired differences to test a population mean difference μd\mu_d.

The test statistic and p-value

The one-sample t-statistic measures how many standard errors the sample mean sits from the null value μ0\mu_0:

t=xˉμ0s/n,t = \frac{\bar{x} - \mu_0}{s / \sqrt{n}},

with degrees of freedom df=n1df = n - 1. Here xˉ\bar{x} (x-bar) is the sample mean, ss is the sample standard deviation, and s/ns/\sqrt{n} is the standard error. When the null hypothesis is true, this statistic follows a t-distribution with n1n - 1 degrees of freedom.

Find the p-value from that t-distribution using the t-table or technology, matching the tail direction to the alternative. A two-sided alternative doubles the one-tail area. The one-sample t-test calculator and the p-value calculator confirm the result.

Interpreting the p-value and concluding

The p-value is the probability of getting a test statistic as extreme or more extreme than the one observed, in the direction of the alternative, assuming the null hypothesis is true. A correct interpretation states that it is computed by assuming the population mean equals the null value in context. For more on this, read what does a p-value mean.

Make a formal decision by comparing the p-value to the significance level α\alpha (alpha). If the p-value α\le \alpha, reject H0H_0; if the p-value >α> \alpha, fail to reject H0H_0. Write the conclusion in context, in terms of the alternative, using non-definitive language such as convincing evidence, and refer to the parameter and population. You never accept or prove the null hypothesis.

A test and a confidence interval answer related questions. A two-sided test that rejects H0H_0 at level α\alpha corresponds to a 100(1α)%100(1-\alpha)\% confidence interval that excludes the null value μ0\mu_0, so the two procedures agree. When a problem asks only whether there is convincing evidence, a test is the direct tool; when it asks for a range of plausible values for the mean, an interval is the better fit.

One-sample t-test for a mean

A bus company advertises a mean commute of 30 minutes. A rider group records a random sample of 16 trips with sample mean xˉ=33\bar{x} = 33 minutes and sample standard deviation s=6s = 6 minutes; the data show no strong skew or outliers. Test H0:μ=30H_0: \mu = 30 against Ha:μ>30H_a: \mu > 30 at α=0.05\alpha = 0.05.

  1. Standard error: SE=sn=616=64=1.5SE = \frac{s}{\sqrt{n}} = \frac{6}{\sqrt{16}} = \frac{6}{4} = 1.5 minutes.

  2. Test statistic: t=xˉμ0SE=33301.5=31.5=2.0t = \frac{\bar{x} - \mu_0}{SE} = \frac{33 - 30}{1.5} = \frac{3}{1.5} = 2.0.

  3. Degrees of freedom: df=161=15df = 16 - 1 = 15.

  4. The alternative is one-sided (greater than), so the p-value is the upper-tail area P(T>2.0)P(T > 2.0) for df=15df = 15, which technology gives as about 0.032.

  5. Compare to α\alpha: 0.0320.050.032 \le 0.05, so reject H0H_0.

Because the p-value of about 0.032 is at most 0.05, reject H0H_0. There is convincing evidence that the true mean commute time on this route is longer than 30 minutes.

Frequently asked questions

How do I turn a one-sided p-value into a two-sided one?

The t-distribution is symmetric, so a two-sided p-value is twice the one-tail area beyond the absolute value of your test statistic. Find the upper-tail probability for the size of your t-statistic, then double it. Match the tail to the alternative: a not-equal-to alternative is two-sided, while greater-than or less-than alternatives are one-sided.

What does it mean to fail to reject the null hypothesis?

It means the data did not give convincing evidence for the alternative, so you do not have grounds to reject the null value. It does not prove the null hypothesis is true. Report it with non-definitive language, such as there is not convincing evidence that the mean differs from the stated value, in context.