One-sample t-test
A one-sample t-test asks whether a population mean differs from a fixed target, using the sample spread to estimate uncertainty.
Fit
When to use it, and when not to
Use it when
- You have one independent sample with a continuous outcome and a fixed comparison value.
- The target is the population mean, rather than a median or a proportion.
Not when
- The reference mean is estimated from another independent sample. Use a two-sample t-test. Read: Two-sample t-test
- The observations are before-after pairs. Use a paired t-test on their differences. Read: Paired t-test: testing a mean change
- You want evidence that the mean lies within a margin. Plan equivalence inference. Read: Equivalence analysis: two one-sided tests
Before you start
What you need
- The sample count, mean and standard deviationUse one independent value per person. Keep the outcome units consistent.
- The fixed target and subtraction orderDefine the mean difference as sample mean minus target. Explain why the target has no sampling uncertainty.
- The significance level and sidednessChoose the test before inspecting the outcome. The worked example uses a two-sided test.
- The observed values are independent.How to check: Check for repeated measurements and shared clinics or families.
- Normal outcomes give exact small-sample t inference.How to check: Plot the data and assess skew and extreme values. Passing a normality pretest does not establish valid inference.
- The observed sample can answer the intended population question.How to check: Describe selection and missingness. An observed mean does not by itself identify a causal effect.
Plain language
How it works
Subtract the fixed target from the sample mean. Divide that gap by the standard error, which is the sample SD divided by the square root of N.
Compare the resulting t statistic with a t distribution on N minus one degrees of freedom. A two-sided test considers gaps in either direction.
An interval for the population mean difference uses that same standard error and a t critical value. Report the difference and interval alongside the p-value.
Cressie and colleagues discuss practical limits of one-sample and paired tests. Rochon and Kieser show how preliminary normality screening can alter error rates. Choosing a sample-size method helps plan a study before testing its mean.
Worked example
A worked example
- Setting
- A service measures blood pressure in an independent sample.
- Question
- Does the population mean differ from a fixed benchmark?
- Approach
- Use n = 25; mean = 126; sd = 10; target = 120; alpha = 0.05. Blood pressure is in mmHg.
- Result
- The mean exceeds the target by 6.00 mmHg; t = 3.00, df = 24, p = 0.006. The 95% interval for the difference is 1.87 to 10.13 mmHg.
- What it means
- The interval describes the population mean difference under the model. It is not an interval for an individual patient or evidence of a treatment effect.
In practice
Recent studies PubMed search · not vetted
Watch out
Common mistakes
The one to remember
A nonsignificant result does not show equivalence to the target. Treating an estimated historical mean as fixed omits its uncertainty. Dependence and severe small-sample skew can invalidate ordinary t inference.
- Interpreting a large p-value as proof that the target has been met.Instead: Report the mean difference and interval. Use a margin-based design when equivalence is the question.
- Choosing the test only after a normality pretest.Instead: Prespecify the analysis from the target, sampling structure and plausible distribution. Inspect the data without treating a pretest as a guarantee.
Inside Mallard
How Mallard uses this
Mallard provides this teaching article for browsing and Atlas. The sizing engine plans one-mean power; the app has no dedicated one-sample t-test analysis calculator.
analysis.one_sample_t_test, the id a plan cue records.Related Learn pages
Related designs and methods
Evidence
Sources & further reading
- Use of the one sample t-test in the real world. (opens in a new tab) · J Chronic Dis · doi 10.1016/0021-9681(84)90052-3
- A closer look at the effect of preliminary goodness-of-fit testing for normality for the one-sample t-test. (opens in a new tab) · Br J Math Stat Psychol · doi 10.1348/2044-8317.002003