One-Sample t-test

Verified

T-Tests

Independently verified. Every statistic this test reports has been re-derived against an independent reference — never the library the pipeline itself calls — the rendered output was read back in a browser, and the result is locked with a committed regression suite.

Run this test straight away on a free built-in teaching dataset — no data of your own needed — or bring your own. Either opens the guided workspace: variable setup, assumption diagnostics, results with effect sizes and confidence intervals, figures, and APA-ready reporting.

Loading teaching datasets…

Or use your own dataset

Loading your datasets…

Tests whether the mean of a continuous dependent variable in a single sample differs significantly from a pre-specified population value μ₀ (a published norm, regulatory threshold, theoretical baselin

e, or quality-control target). Reports t = (X̄ − μ₀) / (s/√n), df = n − 1, p, mean difference + 95% CI, and Cohen's d standardised effect size. Assumption diagnostics include Shapiro-Wilk for normality of the DV and outlier screening; the test is robust to mild non-normality at n ≥ 30 via the CLT but needs a Wilcoxon signed-rank or sign-test alternative for small skewed samples.

Worked example

Does a factory's mean fill volume differ from the 500 ml target?

40 bottles were sampled and their fill volume (ml) tested against the labelled 500 ml.

Result

Mean fill was 497.7 ml, below the 500 ml target, t(39) = −2.26, p = .03, Cohen's d = −0.36 — a real shortfall.

How you'd report it (APA)

A one-sample t-test showed mean fill (M = 497.7 ml) was significantly below the 500 ml target, t(39) = −2.26, p = .03, d = −0.36.

Try it yourself: Load this ready-made sample and follow the run above.

When to use it

  • Validation against a population norm
    A psychometric researcher validates a new online IQ test by administering it to 42 adults and comparing their mean score against the Wechsler population norm of μ₀ = 100.
  • Regulatory / engineering benchmark test
    A pharmaceutical QA team assays 25 tablets from a new batch and tests whether mean potency differs from the labelled μ₀ = 500 mg claim on the packaging.
  • Test against a theoretical prediction
    A physics lab class measures g (gravitational acceleration) from 30 pendulum trials and tests whether the sample mean differs from μ₀ = 9.81 m/s².

When NOT to — use instead

  • Two independent groups
    One-sample t-test only handles ONE sample against a KNOWN value.
  • Paired / repeated measurements
    When the same subjects are measured twice, use the paired t-test on difference scores instead of averaging them into a single sample.
  • No meaningful μ₀
    A one-sample t-test is only interpretable when μ₀ is externally justified.
  • Severely non-normal small sample
    One-sample t needs the CLT. Wilcoxon Signed-Rank

Hypotheses

H₀: μ = μ₀ (the population mean equals the hypothesized value)
Hₐ: μ ≠ μ₀ (the population mean differs from the hypothesized value)

Parameter tested: μ (population mean tested against the known value μ₀)

Assumptions (and what to do if they fail)

No influential outliersmedium

Check: Boxplot; identify values >1.5 IQR beyond quartiles; check for extreme z-scores (|z| > 3 using sample M and SD)

If violated: Outliers may distort the sample mean, inflating or masking the true effect

Data are approximately normally distributedmedium

Check: Q-Q plot (points should fall on diagonal line); histogram; visual inspection for severe skewness, heavy tails, or bimodality

If violated: Non-normality affects the one-sample t-test differently across regimes: at small n it threatens the CI coverage and Type-I rate; at n>30 the CLT protects the nominal rate, BUT severe non-normality combined with outliers still makes the sample mean an unreliabl

Ready to run a One-Sample t-test on your own data?

Guided setup, automatic assumption checks, effect sizes, figures and an APA write-up.

Run this test →