A one-sample t-test checks whether the mean of a single sample differs from a specific value. That value comes from outside the data: a national norm, a manufacturer's specification, a recommended target or the midpoint of a rating scale.
Typical questions: Do our students sleep less than the recommended 8 hours? Is the average fill weight of a bottle different from the 500 ml on the label? Is mean satisfaction on a 1–5 scale above the neutral point of 3?
In this guide
When to use it
- You have one continuous variable from one group.
- You want to compare its mean with a fixed test value (μ₀) that you chose before looking at the data.
- The population standard deviation is unknown, which is almost always the case. If it were known, a z-test would apply.
The formula
t = (M − μ₀) / (SD / √n), with df = n − 1
The numerator is how far the sample mean is from the test value. The denominator, the standard error, is how much sample means typically vary by chance. A large ratio means the gap is unlikely to be sampling noise.
Assumptions
- Independent observations, for example one value per person.
- Continuous outcome (interval or ratio). Scale totals built from several Likert items are usually acceptable.
- Approximate normality of the variable, or a sample of about 30 or more, in which case the central limit theorem makes the test robust.
- No extreme outliers, which can pull the mean far from most of the data.
For a small, clearly skewed sample, the one-sample Wilcoxon signed-rank test compares the median with the test value instead.
Worked example
A health researcher asks whether university students sleep less than the recommended 8 hours. She records average nightly sleep for 36 students: M = 7.4 hours, SD = 1.2.
- Standard error = 1.2 / √36 = 0.20
- t(35) = (7.4 − 8) / 0.20 = −3.00
- Two-tailed p = .005
- 95% CI for the mean = [6.99, 7.81] hours; for the difference from 8 hours = [−1.01, −0.19]
Students slept significantly less than 8 hours, by about 36 minutes on average. The confidence interval for the shortfall runs from about 11 minutes to an hour.
Effect size
Cohen's d for a one-sample test is (M − μ₀) / SD = (7.4 − 8) / 1.2 = −0.50, a medium effect. The sign shows the direction: negative means the sample mean is below the test value.
How to report a one-sample t-test in APA 7
A one-sample t-test showed that students slept significantly less (M = 7.4 hours, SD = 1.2) than the recommended 8 hours, t(35) = −3.00, p = .005, mean difference = −0.60, 95% CI [−1.01, −0.19], d = −0.50.
One-tailed or two-tailed?
A one-tailed test is justified only if you stated the direction before collecting data and a result in the other direction would be treated the same as no effect. In most research, use the two-tailed test. The exact critical values for both are in the t table.
Common mistakes
- Choosing the test value after seeing the data, for example testing against whatever value makes the result significant.
- Using the scale midpoint as a test value without asking whether it is meaningful. A mean above 3 on a 1–5 scale says little if most comparable samples score around 3.8.
- Reporting only “p < .05″ instead of the exact p-value, the confidence interval and the effect size.
Frequently asked questions
What is the test value in a one-sample t-test?
It is the population value you compare your sample mean with, such as a norm, a specification, a target or a scale midpoint. It must be fixed in advance, not estimated from the same data.
What is the difference between a one-sample t-test and a z-test?
The z-test assumes the population standard deviation is known. The t-test estimates it from the sample, which is the realistic situation, and uses the t distribution with n − 1 degrees of freedom.
Can I use a one-sample t-test with a small sample?
Yes, if the data are roughly normal without outliers. With fewer than about 15 observations and visible skew, use the one-sample Wilcoxon test.
How do I compare a mean with the scale midpoint?
Enter the midpoint (for example 3 on a 1–5 scale, or 4 on a 1–7 scale) as the test value in a one-sample t-test.


