Most one-sample t-test questions hand you a paragraph of words and expect a number, a decision, and a sentence-long conclusion. The procedure is the same every time, but courses split it into different numbers of steps, which makes it look harder than it is. This walkthrough runs one full problem end to end so the next one you see is a fill-in-the-blanks exercise.

When the One-Sample T-Test Is the Right Tool

Use a one-sample t-test when three things line up. First, you have one sample of quantitative data and you are comparing its mean to a single claimed value, usually written as μ₀ (mu-naught). Second, the population standard deviation σ is unknown — if it were known, you would use a z-test instead. Third, either the sample is from a roughly normal population, or your sample size is large enough (n ≥ 30 is the rule of thumb) for the Central Limit Theorem to make the sampling distribution of the mean approximately normal.

If you are comparing two group means, this is not your test — that is a two-sample or paired t-test. If you are working with a proportion, you want a z-test for proportions. The one-sample t-test answers exactly one question: is the population mean likely to equal this specific number?

The Five Steps, in Order

Every one-sample t-test follows the same five steps. Write them down on every problem — it is faster than thinking from scratch each time.

  1. State the hypotheses. The null is always H₀: μ = μ₀. The alternative is H₁: μ ≠ μ₀ (two-tailed), μ > μ₀ (right-tailed), or μ < μ₀ (left-tailed). The wording of the problem tells you which.
  2. Choose a significance level α. Usually 0.05 unless the problem says otherwise.
  3. Compute the test statistic t = (x̄ − μ₀) / (s / √n), where x̄ is the sample mean, s is the sample standard deviation, and n is the sample size.
  4. Find the p-value or critical value using a t-distribution with df = n − 1 degrees of freedom.
  5. Make a decision and state the conclusion in the words of the original problem.
A t-distribution curve with a shaded tail region on lined paper
A t-distribution curve with a shaded tail beside a worked-out test statistic calculation on lined paper

The Worked Example

A nutrition label claims a granola bar contains 200 calories. A consumer group suspects the true mean is higher and samples 25 bars. The sample mean is x̄ = 207 calories with a sample standard deviation of s = 15 calories. Test at α = 0.05.

Step 1 — Hypotheses. The claim under suspicion is μ = 200, and the group thinks the true mean is higher, so this is a right-tailed test:

  • H₀: μ = 200
  • H₁: μ > 200

Step 2 — Significance level. α = 0.05, given.

Step 3 — Test statistic. Plug into the formula:

t = (207 − 200) / (15 / √25) = 7 / (15 / 5) = 7 / 3 = 2.333

The standard error in the denominator is 3 calories — that is the typical distance between a sample mean of 25 bars and the population mean if the null were true. Our sample mean is 7 calories above the claim, or 2.33 standard errors above. That is the test statistic.

Step 4 — Degrees of freedom and p-value. df = n − 1 = 24. For a right-tailed test with t = 2.333 and df = 24, the p-value is the area to the right of 2.333 under the t-distribution with 24 df. From a t-table or calculator, that area is about 0.014.

If you only have a printed t-table, look up the critical t-value for a one-tailed test at α = 0.05 with df = 24: it is t* ≈ 1.711. Compare your statistic to this cutoff instead of computing the p-value exactly.

Step 5 — Decision and conclusion. Since p = 0.014 is less than α = 0.05 (equivalently, t = 2.333 exceeds the critical value 1.711), reject H₀.

Conclusion in plain English: "There is statistically significant evidence at the 0.05 level that the mean calorie content of the granola bars is higher than the labeled 200 calories. A sample mean of 207 with this sample size would occur only about 1.4% of the time if the true mean really were 200."

That last sentence is what graders look for — it ties the math back to the original question.

Two Places Students Lose Points

The first is degrees of freedom. The denominator s / √n uses n, but the t-table lookup uses n − 1. Mixing those up gives a wrong critical value, especially with small samples where the t-distribution is far from normal. With n = 25 the difference between df = 24 and df = 25 is small, but with n = 6 the critical values are noticeably different — and that is the size of problem most exam questions use.

The second is the direction of the alternative. "Greater than" gives a one-tailed test with the rejection region in the upper tail only. "Different from" gives a two-tailed test, and the p-value is doubled (or you compare to t* with α/2 in each tail). Read the problem's wording for words like higher, lower, exceeds, at most, differs from, changed — they decide your tail.

Checking Conditions Before You Run It

The one-sample t-test relies on the sampling distribution of x̄ being approximately normal. The check has two paths:

  • Large sample (n ≥ 30). The Central Limit Theorem handles it. You can run the test even if the population itself is not normal.
  • Small sample (n < 30). You need the population to be approximately normal. In a textbook problem this is stated. With real data, look at a histogram or boxplot of the sample for strong skew or outliers — heavy outliers are the bigger threat than mild skew.

The sample also has to be a simple random sample, or at least be reasonable to treat as one. A biased sample makes any test meaningless before the formula is even applied.

Getting Help

If you are still deciding between a t-test and a z-test before you even reach this procedure, work through t-test vs. z-test first. To see how the whole hypothesis-testing framework is built — null, alternative, decision rule, conclusion — read setting up a hypothesis test.

Conclusion

A one-sample t-test walkthrough is mechanical once you have the five steps in front of you: hypotheses, alpha, test statistic, df and p-value, conclusion in context. The calorie example produced t = 2.333, df = 24, p ≈ 0.014, and a rejection of the labeled mean. The next problem you see will swap the numbers but keep the structure — write the steps in order, plug in carefully, and translate the result back into the words of the question.