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.
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)
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.