Ask Mallard
Analysis method

One-sample t-test

5 min read

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

Before you start

What you need

Decide these first
  1. The sample count, mean and standard deviationUse one independent value per person. Keep the outcome units consistent.
  2. The fixed target and subtraction orderDefine the mean difference as sample mean minus target. Explain why the target has no sampling uncertainty.
  3. The significance level and sidednessChoose the test before inspecting the outcome. The worked example uses a two-sided test.
It rests on these
  1. The observed values are independent.How to check: Check for repeated measurements and shared clinics or families.
  2. 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.
  3. 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.

The t test

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.

Report the mean gap

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.

What the sources show

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.

The method at a glance
One-sample t-test: Independent sample and fixed target. Then Mean gap divided by its standard error. Then t test and interval for the mean gap.One-sample t-testIndependent sample andfixed targetMean gap divided by itsstandard errort test and interval forthe mean gapA nonsignificant result does not show equivalence to the target. Treating an estimated historical mean asfixed omits its uncertainty. Dependence and severe small-sample skew can invalidate ordinary t inference.
Conceptual diagram. It shows the structure of the idea, not data from any study.

Worked example

A worked example

Invented for illustration
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

Searching PubMed…

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.

No Mallard code example points to this page.
Atlas node analysis.one_sample_t_test, the id a plan cue records.

Related Learn pages

Related designs and methods

Evidence

Sources & further reading

  1. 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
  2. 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
Prepared with AI assistance. PubMed records checked on 2026-11-06 by title, authors, year and DOI: record verified, confirm it supports this use. No independent professional or methodological approval is claimed. The sources provide context for mean inference and sample-size planning. The worked figures come from Mallard’s engine, not a table copied from a source.
Last source review: 2026-11-06
AI-generated educational content
Mallard uses reputable methodological and reporting sources, but this material may contain errors or omit important context. Verify important methodological decisions with the cited sources and, when appropriate, a qualified research methodologist or statistician.