Skip to content
CALX
Appearance

Appearance

Light or dark

Colour
Accessibility

Student's t-test calculator, comparison of means

A mean against a reference value or two independent samples (Welch's t-test): t, degrees of freedom, p-value, confidence interval and conclusion.

Parameters

Separate values with spaces, line breaks or semicolons. A comma is read as a thousands separator (1,234) when unambiguous, and rejected otherwise.

Result

Awaiting the quantities required for the calculation.

Calculation, assumptions and sources

OverviewComparison of a sample mean with a reference value, or of the means of two independent samples (Welch's t-test).

Comparison of a sample mean with a reference value, or of the means of two independent samples (Welch's t-test). The test is two-tailed or one-tailed, at the chosen alpha threshold. Results: t-statistic, degrees of freedom, p-value, confidence interval and conclusion on the null hypothesis.

Method & formulast = (x̄ − μ₀) / (s / √n) (one sample, n − 1 degrees of freedom)
t = (x̄ − μ₀) / (s / √n) (one sample, n − 1 degrees of freedom)t = (x̄₁ − x̄₂) / √(s₁² / n₁ + s₂² / n₂) (two samples, Welch's test)df = (s₁² / n₁ + s₂² / n₂)² / [ (s₁² / n₁)² / (n₁ − 1) + (s₂² / n₂)² / (n₂ − 1) ]

The t-statistic is the ratio of the observed difference to its standard error. For two samples, Welch's t-test does not use the pooled standard error of the classical t-test; its degrees of freedom (Welch–Satterthwaite formula) are usually fractional.

H0
null hypothesis: the mean equals μ₀, or the two means are equal.
p-value
probability of observing, if H0 is true, a difference at least as extreme as the one measured.
Alpha threshold
decision threshold chosen before the calculation (often 0.05). H0 is rejected when the p-value is less than or equal to it.
Confidence interval
range of plausible values, at level 1 − alpha, for the mean (one sample) or the difference between means (two samples). In a one-tailed test, one bound is infinite.
Welch's t-test
two-sample t-test without the assumption of equal variances.
Validity domainThe t-test assumes approximately normal data, or a sample large enough for the central limit theorem to apply.

The t-test assumes approximately normal data, or a sample large enough for the central limit theorem to apply. With fewer than ten values and a clearly skewed distribution, the result should be treated with caution. A small sample often yields a high p-value even when a real difference exists.