AP-STATS-7.5-7.6

U7.5 One-Sample t-Test for a Mean

Master the one-sample t-test for a population mean: set up hypotheses, check conditions, compute the t-statistic and p-value, and conclude in context.

What you'll do in this lesson

A voice-first session with the Crimsora tutor on U7.5 One-Sample t-Test for a Mean, then targeted practice and FRQs — with the tutor adapting to where you get stuck.

What this lesson covers

You have already built a confidence interval for a mean using the tt-distribution. Now you will use that same machinery to answer a yes-or-no question: is there convincing evidence that a population mean differs from some claimed value? That is the job of the one-sample tt-test.

This lesson walks through the full four-step significance test the exam rewards: state hypotheses, check the conditions, calculate the test statistic and pp-value, and write a conclusion tied to the context. Nail these steps and you will pick up nearly all the points on any mean-testing FRQ, because the AP rubric grades the process almost as much as the final answer.

Setting Up the Hypotheses

Every significance test starts with two competing claims about a parameter, here the true population mean μ\mu. The null hypothesis always states no effect or no difference: H0:μ=μ0H_0: \mu = \mu_0, where μ0\mu_0 is the specific value from the problem (a manufacturer's claim, a historical average, a target). The alternative hypothesis expresses what you are trying to find evidence for, and it takes one of three forms:
AlternativeWhen to use itWording clue
Ha:μ>μ0H_a: \mu > \mu_0one-sided, upper"greater than," "increased"
Ha:μ<μ0H_a: \mu < \mu_0one-sided, lower"less than," "decreased"
Ha:μμ0H_a: \mu \neq \mu_0two-sided"differs," "changed"
Three rules save easy points. First, hypotheses are about the population mean μ\mu, never the sample mean xˉ\bar{x} — writing H0:xˉ=12H_0: \bar{x} = 12 loses credit. Second, define μ\mu in words in context ("μ\mu = the true mean battery life, in hours, of all batteries"). Third, decide the direction from the research question, not from your data. Choosing a one-sided alternative after seeing which way the sample came out is a serious error. If the question only asks whether the mean "differs" or "changed," use the two-sided form.

Checking the Conditions

Before you trust any tt-procedure, verify three conditions and state them explicitly with evidence from the problem.

The Random condition requires that the data come from a random sample or randomized experiment. Quote the design: "The problem states a random sample of 30 students was selected." This lets you generalize to the population.

The Independence (10% condition) requires that individual observations are independent. When sampling without replacement, check that the sample is at most 10% of the population: n0.10Nn \leq 0.10N. State it: "It is reasonable to assume there are more than 300 students in the population."

The Normal/Large Sample condition protects the sampling distribution of xˉ\bar{x}. It is met if the population is stated to be approximately normal, OR the sample size is large (n30n \geq 30) by the Central Limit Theorem, OR — for small samples — a graph of the data (dotplot, boxplot, histogram) shows no strong skew and no outliers. On the exam, if n<30n < 30 and no distribution is given, you must reference the provided graph.

A common misconception: the Normal condition is about the shape of the population or the sampling distribution, not the sample itself. Also, never skip stating conditions to save time; the FRQ rubric usually has a dedicated point for correctly verifying all three.

Computing the t-Statistic and p-Value

Because we estimate the population standard deviation with the sample standard deviation ss, we standardize using the tt-distribution rather than the normal. The test statistic measures how many standard errors the observed mean sits from the hypothesized mean:t=xˉμ0snt = \frac{\bar{x} - \mu_0}{\frac{s}{\sqrt{n}}}The quantity sn\frac{s}{\sqrt{n}} is the standard error of the mean. The relevant tt-distribution has df=n1df = n - 1 degrees of freedom. A larger t|t| means the data are farther from H0H_0 and give stronger evidence against it.

The pp-value is the probability of getting a test statistic at least as extreme as the observed tt, assuming H0H_0 is true. Find it from the tt-distribution with n1n-1 degrees of freedom:
Alternativep-value
μ>μ0\mu > \mu_0area to the right of tt
μ<μ0\mu < \mu_0area to the left of tt
μμ0\mu \neq \mu_02×2\times area beyond t|t|
On a calculator, tcdf or T-Test gives the pp-value directly. If using a table, you can only bracket the pp-value between two columns — that is acceptable for the FRQ as long as you report the interval, e.g. 0.02<p<0.050.02 < p < 0.05.

Making a Conclusion in Context

The conclusion compares your pp-value to the significance level α\alpha (use α=0.05\alpha = 0.05 unless the problem specifies otherwise) and always links back to the alternative hypothesis in context. Use a two-part template.

If pαp \leq \alpha: "Because the pp-value of ___ is less than α=\alpha = ___, we reject H0H_0. There is convincing evidence that [statement of HaH_a in context]."

If p>αp > \alpha: "Because the pp-value of ___ is greater than α=\alpha = ___, we fail to reject H0H_0. There is not convincing evidence that [statement of HaH_a in context]."

Two phrasings cost points on the exam. Never say you "accept H0H_0" — failing to reject means the data are consistent with H0H_0, not that H0H_0 is proven true. And never conclude about the sample; the conclusion is a claim about the population mean μ\mu.

Remember the interpretation of the pp-value itself, which readers frequently ask you to state: it is the probability, computed assuming H0H_0 is true, of observing a sample mean as extreme as or more extreme than the one obtained. A small pp-value means such data would be surprising if H0H_0 were true, which is why it counts as evidence against H0H_0.

Key terms

Null hypothesis (H0H_0).
The default claim of no effect, stated as μ=μ0\mu = \mu_0, that the test assumes true when computing the p-value.
Alternative hypothesis (HaH_a).
The claim you seek evidence for, written as μ>μ0\mu > \mu_0, μ<μ0\mu < \mu_0, or μμ0\mu \neq \mu_0.
Standard error of the mean.
An estimate of the variability of the sample mean, equal to sn\frac{s}{\sqrt{n}}, used in the denominator of the t-statistic.
t-statistic.
The standardized distance of xˉ\bar{x} from μ0\mu_0: t=xˉμ0s/nt = \frac{\bar{x}-\mu_0}{s/\sqrt{n}}, evaluated with n1n-1 degrees of freedom.
Degrees of freedom.
The parameter df=n1df = n - 1 that selects the specific t-distribution for a one-sample test.
p-value.
The probability, assuming H0H_0 is true, of getting a test statistic at least as extreme as the observed value.
Significance level (α\alpha).
The threshold, often 0.05, against which the p-value is compared to decide whether to reject H0H_0.

Worked example

A cereal company claims its boxes contain a mean of 18 ounces of cereal. A consumer group suspects the true mean is less. They randomly sample 25 boxes and find xˉ=17.7\bar{x} = 17.7 ounces with s=0.6s = 0.6 ounces. A dotplot of the 25 weights shows no strong skew or outliers. Test the consumer group's claim at α=0.05\alpha = 0.05.
Step 1 — Hypotheses. Let μ\mu = the true mean weight, in ounces, of all cereal boxes. Because the group suspects the mean is less than the claim, use a one-sided test: H0:μ=18H_0: \mu = 18 versus Ha:μ<18H_a: \mu < 18.

Step 2 — Conditions. Random: the 25 boxes were randomly sampled. Independence: it is reasonable that the company produces more than 10×25=25010 \times 25 = 250 boxes, so the 10% condition holds. Normal: n=25<30n = 25 < 30, but the dotplot shows no strong skew and no outliers, so the sampling distribution of xˉ\bar{x} is approximately normal. All conditions are met, so a one-sample tt-test is appropriate.

Step 3 — Test statistic and p-value. The standard error is sn=0.625=0.12\frac{s}{\sqrt{n}} = \frac{0.6}{\sqrt{25}} = 0.12. Then t=17.7180.12=0.30.12=2.5t = \frac{17.7 - 18}{0.12} = \frac{-0.3}{0.12} = -2.5 with df=251=24df = 25 - 1 = 24. For a lower-tailed test, the pp-value is the area to the left of 2.5-2.5: p0.0098p \approx 0.0098.

Step 4 — Conclusion. Because the pp-value of about 0.00980.0098 is less than α=0.05\alpha = 0.05, we reject H0H_0. There is convincing evidence that the true mean weight of the cereal boxes is less than 18 ounces.

Practice questions

A researcher runs a one-sample t-test with Ha:μ50H_a: \mu \neq 50, a sample of n=16n = 16, and computes t=2.10t = 2.10. Which of the following correctly describes how to find the p-value?
  1. Find the area to the right of t=2.10t = 2.10 using 16 degrees of freedom
  2. Find the area to the right of t=2.10t = 2.10 using 15 degrees of freedom
  3. Double the area to the right of t=2.10t = 2.10 using 15 degrees of freedom
  4. Double the area to the right of t=2.10t = 2.10 using 16 degrees of freedom

Answer: Double the area to the right of t=2.10t = 2.10 using 15 degrees of freedom

The degrees of freedom for a one-sample t-test are n1=161=15n - 1 = 16 - 1 = 15, not nn. Because the alternative is two-sided (μ50\mu \neq 50), the p-value is the combined area in both tails, which equals twice the area beyond t=2.10|t| = 2.10.
A quality inspector tests whether the mean fill volume of a bottling machine differs from the target of 500 mL. From a random sample of 40 bottles she finds xˉ=502.3\bar{x} = 502.3 mL and s=5s = 5 mL. State the hypotheses, compute the test statistic, and describe how you would reach a conclusion at α=0.05\alpha = 0.05.

Answer: H0:μ=500H_0: \mu = 500, Ha:μ500H_a: \mu \neq 500; t2.91t \approx 2.91 with 39 df; two-sided p-value 0.006\approx 0.006, so reject H0H_0.

Let μ\mu be the true mean fill volume. Since the question asks whether the mean 'differs,' the alternative is two-sided. The standard error is 5400.7906\frac{5}{\sqrt{40}} \approx 0.7906, so t=502.35000.79062.91t = \frac{502.3 - 500}{0.7906} \approx 2.91 with df=39df = 39. The two-sided p-value is about 0.0060.006, which is less than 0.050.05, so you would reject H0H_0 and conclude there is convincing evidence the mean fill volume differs from 500 mL. With n=4030n = 40 \geq 30 the Normal condition is satisfied by the Central Limit Theorem.
A test produces a p-value of 0.18 at α=0.05\alpha = 0.05. A student writes: 'Since p>αp > \alpha, we accept the null hypothesis and conclude the population mean equals μ0\mu_0.' Identify and correct the error.

Answer: You never accept H0H_0; you fail to reject it, concluding only that there is not convincing evidence for HaH_a.

Failing to reject the null does not prove it true — the data are simply consistent with it, and the true mean could still differ by an amount too small to detect. The correct wording is: 'Because p=0.18>0.05p = 0.18 > 0.05, we fail to reject H0H_0. There is not convincing evidence that the population mean differs from μ0\mu_0.'

FAQ

When do I use a t-test instead of a z-test for a mean?
Use a t-test whenever you do not know the true population standard deviation σ\sigma and must estimate it with the sample standard deviation ss — which is essentially always in AP Statistics. The z-test for a mean requires a known σ\sigma, a situation that almost never appears on the exam, so the one-sample t-test is your default procedure for a mean.
What degrees of freedom do I use for a one-sample t-test?
Use df=n1df = n - 1, where nn is the sample size. For example, a sample of 25 observations uses 24 degrees of freedom. This determines which t-distribution you use to find the p-value.
How do I decide between a one-sided and two-sided alternative?
Read the research question before looking at the data. If it asks whether the mean 'increased,' 'is greater than,' or 'is less than' a value, use a one-sided alternative in that direction. If it asks whether the mean 'differs,' 'changed,' or 'is not equal to,' use a two-sided alternative. Never pick the direction based on which way your sample happened to come out.
What exactly does the p-value mean in a t-test?
The p-value is the probability of getting a sample mean as extreme as, or more extreme than, the one you observed, assuming the null hypothesis is true. A small p-value means your data would be surprising under H0H_0, which is why it counts as evidence against the null. It is not the probability that H0H_0 is true.

Learn this with a teacher, not a page

The Crimsora tutor teaches U7.5 One-Sample t-Test for a Mean live — explaining on a whiteboard, asking you questions, and adapting to where you get stuck.