Loading
Learn how to compute a test statistic and obtain a p-value to make evidence-based decisions about a population mean.
Long before modern statistical software could spit out p-values in milliseconds, researchers grappled with a fundamental question: how can we use a small sample to make a reliable claim about an entire population? The story of hypothesis testing for a population mean is rooted in the practical challenges of early 20th-century science and industry. When William Sealy Gosset, a chemist at the Guinness brewery in Dublin, needed to draw conclusions from very small batches of barley, he realized that the standard normal distribution was inadequate for small samples. His pioneering work, published under the pseudonym "Student" in 1908, introduced the t-distribution, which accounts for the extra variability introduced when the population standard deviation is estimated from the sample. This insight became one of the cornerstones of modern inferential statistics.
Today, the one-sample t-test is the workhorse procedure for testing a claim about a single population mean when the population standard deviation σ is unknown—which is nearly always the case in practice. In the AP Statistics curriculum, this topic sits at the intersection of sampling distributions, probability, and formal inference, requiring you to synthesize everything you have learned about the Central Limit Theorem, standard error, and the logic of significance testing. The central question this lesson addresses is: once you have stated hypotheses and checked conditions, how do you actually calculate the test statistic, find the p-value, and reach a conclusion?
Before diving into calculations, it is essential to anchor ourselves in the foundational ideas that make the one-sample t-test logically coherent. Every step in the testing procedure flows from a small set of core principles: the structure of the hypotheses, the role of the test statistic, the meaning of the p-value, and the decision rule that ties everything together. These ideas are not merely procedural—they reflect a deep philosophical commitment to letting data, rather than intuition, drive conclusions.
The diagram below illustrates the complete flow of carrying out a one-sample t-test. It traces the journey from raw data to a final conclusion, emphasizing the role of each computed quantity at every stage. Study the arrows carefully: the test statistic bridges the gap between the data and the t-distribution, while the p-value bridges the gap between the t-distribution and your decision.
Notice that the t-distribution curve is symmetric about zero and resembles a standard normal curve but has heavier tails. The heavier tails reflect the additional uncertainty from estimating σ with the sample standard deviation s. As the sample size n increases and the degrees of freedom grow, the t-distribution approaches the standard normal distribution. For a right-tailed test (Hₐ: μ > μ₀), the p-value is the area to the right of the observed t; for a left-tailed test (Hₐ: μ < μ₀), it is the area to the left; and for a two-tailed test (Hₐ: μ ≠ μ₀), it is the combined area in both tails beyond ±|t|.
The mathematical machinery behind the one-sample t-test is elegant in its simplicity. The test statistic measures how many estimated standard errors the sample mean falls from the hypothesized value, and the t-distribution with n − 1 degrees of freedom provides the reference distribution under the null hypothesis. Below are the key formulas you need to internalize.
T-Test under STAT → TESTS. Enter μ₀, x̄, s, n, and the direction of Hₐ. The calculator will output both the t-statistic and the p-value directly. Alternatively, after computing t by hand, use tcdf(lower, upper, df) to find tail areas. For a right-tailed test, the command is tcdf(t, 1E99, df).The decision rule is straightforward: if the p-value is less than or equal to the chosen significance level α, you reject H₀ and conclude that there is convincing statistical evidence in favor of Hₐ at the α level. If the p-value exceeds α, you fail to reject H₀ and conclude that the sample does not provide convincing evidence against the null hypothesis. It is critically important that your conclusion is stated in the context of the problem—AP readers will deduct points for generic statistical conclusions that do not reference the specific variable and population under study.
A frequent source of confusion is the distinction between one-tailed and two-tailed tests, which affects both the form of the alternative hypothesis and how the p-value is calculated. The choice of directionality must be determined before looking at the data and should be driven by the research question, not by what would produce a more significant result. The visual below compares all three scenarios side by side.
A subtle but important point: for a two-tailed test, the p-value is exactly double the one-tail area beyond |t|. This is because the two-tailed alternative considers departures in either direction to be evidence against H₀. Consequently, a two-tailed test is always less powerful than a one-tailed test (for the same α and effect size), because the rejection region is split across both tails. When you are unsure about the direction of the effect or when the research question genuinely asks whether the mean differs from μ₀ without specifying a direction, a two-tailed test is appropriate.
A nutritionist claims that the mean daily sodium intake for adults in a particular city is more than 2300 mg. A random sample of 36 adults yields a sample mean of x̄ = 2450 mg with a sample standard deviation of s = 420 mg. Carry out a significance test at the α = 0.05 level.
tcdf(2.143, 1E99, 35) ≈ 0.0196.Even students who understand the mechanics of the t-test can lose points on the AP exam through avoidable errors. The table below contrasts common mistakes with the correct approach. Reviewing these pitfalls will sharpen both your conceptual understanding and your exam performance.
| Common Pitfall | Why It's Wrong | Best Practice |
|---|---|---|
| Writing "Accept H₀" | We never "accept" the null hypothesis; the test can only fail to find evidence against it. Absence of evidence is not evidence of absence. | Write "We fail to reject H₀" or "We do not have convincing evidence that…" |
| Omitting context in the conclusion | A conclusion must reference the specific parameter, variable, and population. Generic statements lose credit on AP rubrics. | "There is convincing evidence that the mean [variable] of [population] is [direction] [value]." |
| Using z instead of t when σ is unknown | When the population standard deviation σ is unknown (almost always), the z-test is inappropriate. Using s as a plug-in for σ requires the t-distribution. | Default to the t-test. Only use z when σ is explicitly given, which is extremely rare in practice. |
| Choosing the tail direction after seeing the data | Selecting a one-tailed test based on observed data inflates the Type I error rate. The alternative hypothesis must be specified before data collection. | Base the direction of Hₐ on the research question or claim being investigated, not on the sample results. |
| Confusing statistical and practical significance | A small p-value indicates the effect is unlikely due to chance, but it does not mean the effect is large or meaningful in a real-world sense. | After rejecting H₀, consider the effect size (how far x̄ is from μ₀) to assess practical importance. |
The one-sample t-test for a population mean is a gateway to a family of more sophisticated inference procedures. Understanding how it relates to its extensions will deepen your appreciation for the underlying logic and prepare you for more advanced coursework in statistics.
| Feature | One-Sample t-Test (This Lesson) | Advanced Extensions |
|---|---|---|
| Number of groups | One sample compared to a hypothesized value μ₀ | Two-sample t-test compares means of two groups; ANOVA compares three or more |
| Paired data | Can be applied to differences in paired data (treated as a single sample of differences) | Matched pairs t-test is structurally identical; uses d̄ and s_d instead of x̄ and s |
| Normality assumption | Requires approximately normal population or n ≥ 30 (CLT) | Nonparametric alternatives (Wilcoxon signed-rank) relax normality; bootstrap methods provide distribution-free inference |
| Effect size reporting | Not formally part of the AP curriculum but valuable for interpretation | Cohen's d = (x̄ − μ₀)/s is commonly reported alongside p-values in research publications |
| Confidence interval duality | Rejecting H₀ at level α is equivalent to μ₀ not falling in the (1 − α) confidence interval | This duality extends to all parametric tests and is the basis for inverting test statistics to create CIs |
One particularly elegant connection worth noting is the duality between hypothesis tests and confidence intervals. If you construct a (1 − α) × 100% confidence interval for μ and the hypothesized value μ₀ falls outside that interval, you would reject H₀ at the α significance level in a two-tailed test—and vice versa. This means that every confidence interval implicitly encodes the results of infinitely many hypothesis tests (one for each possible value of μ₀), which is why many statisticians advocate reporting confidence intervals alongside p-values for richer inference.
Carrying out a test for a population mean involves computing a t-test statistic using the formula t = (x̄ − μ₀) / (s / √n), where the denominator is the standard error of the sample mean. This statistic follows a t-distribution with df = n − 1 under the null hypothesis. The p-value is the tail area (or areas, for a two-tailed test) beyond the observed t, representing the probability of seeing results at least as extreme as yours if H₀ is true.
Compare the p-value to the pre-set significance level α: if p ≤ α, reject H₀ and conclude there is convincing evidence for Hₐ; if p > α, fail to reject H₀. Always state your conclusion in the context of the problem, referencing the specific parameter, variable, and population. Remember: never say "accept H₀," never choose the tail direction after seeing data, and always distinguish statistical significance from practical significance.
Keep learning with more lessons from the same subject.