The one-sample t-test checks whether the average in your sample differs from a known or expected value. This guide explains when to use it, how to read the confidence interval, and how to run it in AnalyZ Solutions.
Sometimes the comparison you care about is not between two groups but between your sample and a benchmark. Is the average satisfaction score different from the neutral midpoint of 3? Is the mean age of participants different from the national average? Is the average birth weight in the clinic below the recommended threshold? The one-sample t-test answers these by checking whether your sample average is far enough from the target that sampling variation alone would be an unlikely explanation.
Use it when you have one numeric variable, one group, and a specific value to compare against. The value must come from outside your data: a policy target, a national statistic, a scale midpoint, or a previous study. It should be chosen before you look at your results. With two separate groups, use the independent t-test instead. With two measurements on the same people, use the paired t-test.
A worked example: a service helpline aims for an average caller satisfaction of at least 4.0 on a 5-point scale. A survey of 150 callers gives an average of 4.2 with a standard deviation of 0.9. The test asks whether 4.2 is really different from 4.0, or whether a sample of 150 could easily produce 4.2 when the true average is 4.0.
The observations should be independent, and the variable should be roughly normally distributed. With a sample above about 30 the normality assumption matters much less. With smaller samples or heavily skewed data, interpret the result with caution. A transformation such as the logarithm often helps with skewed measures like income.
The most useful part of the output is the 95% confidence interval for the mean. It gives a range that is likely to contain the true population average. If your test value falls outside the interval, the sample average differs significantly from it at the 5% level. If the test value falls inside, the data is compatible with the target.
In the helpline example, an interval of 4.05 to 4.35 would sit entirely above 4.0. That tells you the result is significant and also how far above the target the true average probably is.
The interpretation states whether the sample average is significantly different from the test value, and at what level. Size matters here as much as significance. A difference of 0.05 points on a 5-point scale can be significant in a very large sample and still be irrelevant in practice.
Open Inferential Analysis, choose Compare Means, then One-sample t-test.
Running a one-sample t-test in AnalyZ Solutions.
The figures below are invented to show the steps, and they follow the results tables in AnalyZ Solutions, with a few columns left out to save space. Suppose a service helpline aims for an average caller satisfaction of at least 4.0 out of 5, and a survey of 150 callers gives the results below.
| N | Mean | SD | SE | Test value | t | df | p-value | Sig | 95% CI lower | 95% CI upper |
|---|---|---|---|---|---|---|---|---|---|---|
| 150 | 4.2 | 0.9 | 0.073 | 4.0 | 2.7217 | 149 | 0.0073 | ** | 4.055 | 4.345 |
Average caller satisfaction was 4.2, above the target of 4.0. The difference is significant at the 1% level, and the true average is likely to lie between about 4.05 and 4.35. The service is meeting its target, though only by a small margin.
Comparing against a value taken from the same data. The test value must be independent of the sample, not the sample median or a cut-off derived from the same respondents.
Using it for a proportion. If your outcome is a percentage of people who did something, use the z-test for proportions instead.
Forgetting the direction of the scale. A significantly lower score can be good news or bad news depending on what the scale measures. Read the interpretation against the direction of your variable.
Open Compare Means in AnalyZ Solutions. Free to sign up, free to analyze.
Get started