How to use it
- Choose the test and paste sample 1 (and sample 2 for a two-sample or paired test).
- For a one-sample test enter the mean to compare with.
- Pick the tail and the significance level and read t, df and p.
How it works
- One-sample: t = (mean − μ₀) / (s / √n), df = n − 1.
- Welch: t = (mean₁ − mean₂) / √(s₁²/n₁ + s₂²/n₂), with the Welch–Satterthwaite degrees of freedom.
- Pooled: the standard error uses the pooled variance and df = n₁ + n₂ − 2.
- Paired: a one-sample test on the differences.
The p-value comes from Student’s t distribution through the regularised incomplete beta function, shared with the confidence interval calculator.
Worked example
Sample 1 = 1, 2, 3, 4, 5 and sample 2 = 3, 4, 5, 6, 7. The means are 3 and 5, each variance is 2.5, so the standard error is √(0.5 + 0.5) = 1 and t = −2. With equal sizes and variances Welch and pooled both give df = 8, and the two-tailed p is about 0.0805, not significant at 0.05.
Tips
- Report the t, degrees of freedom and exact p, not only “significant”.
- Statistical significance is not the same as a large or important effect.