t statistic, degrees of freedom, p-value and critical value from summary statistics
Updated October 2026
The calculator works from summary statistics, so you need each group’s mean, sample standard deviation (the n − 1 version, STDEV.S in a spreadsheet) and count. For a one-sample test, enter only sample 1 and the value you are testing against. α is the false-positive rate you accept; 0.05 is conventional. The output gives t, the degrees of freedom, two- and one-tailed p-values, the critical t for your α, a decision and an interval for the difference.
| Test | Standard error | Degrees of freedom |
|---|---|---|
| Pooled two-sample | sₚ √(1/n₁ + 1/n₂), with sₚ² = [(n₁−1)s₁² + (n₂−1)s₂²] ÷ (n₁+n₂−2) | n₁ + n₂ − 2 |
| Welch two-sample | √(s₁²/n₁ + s₂²/n₂) | Welch–Satterthwaite approximation |
| One-sample | s ÷ √n | n − 1 |
Penn State’s STAT 500 course suggests pooling only when you are reasonably sure the variances are nearly equal, with an informal check that the ratio of the two standard deviations falls between 0.5 and 2. Welch’s version is more reliable when the standard deviations and sample sizes both differ. For paired data (before and after on the same subjects), compute each pair’s difference and run a one-sample test on the differences against 0.
The pooled variance is [(249 − 1) × 6.4147² + (79 − 1) × 6.10771²] ÷ 326 = 40.2286, so sₚ = 6.34260. The standard error is 6.34260 × √(1/249 + 1/79) = 0.81901. The difference in means is 20.14458 − 30.48101 = −10.33643, and t = −10.33643 ÷ 0.81901 = −12.62059 with 326 degrees of freedom. The critical value for α = 0.05 two-tailed is 1.9673; |t| is far beyond it, and the p-value is 5.273e-30.
| Case | t | df | p (two-tailed) | Significant at 0.05? |
|---|---|---|---|---|
| NIST car data, pooled (default) | -12.6206 | 326 | 5.273e-30 | Yes |
| NIST car data, Welch | -12.9463 | 136.87 | 1.571e-25 | Yes |
| Same means and SDs, only 10 cars per group | -3.6903 | 18 | 0.0017 | Yes |
| Means 20.14 vs 23.00, 20 per group | -1.4417 | 38 | 0.1576 | No |
| Means 50 vs 55, SD 5 (n 30) vs SD 15 (n 10), pooled | -1.6096 | 38 | 0.1158 | No |
| Same data, Welch | -1.0351 | 9.67 | 0.3258 | No |
The same 10-mpg gap is still significant with only 10 cars per group, but a 3-mpg gap with 20 per group is not. The last two rows show why the choice of test matters: when the smaller group has the larger spread, the pooled test understates the uncertainty and its p-value is about a third of Welch’s.
The p-value is the probability of a t at least this extreme if the population means were equal. If it is below α, the difference is statistically significant. A tiny p-value says the difference is unlikely to be chance, not that it is large or important; report the difference and its interval too. Use the one-tailed p only if you chose the direction before seeing the data.
Treating paired data as two independent samples. Before-and-after measurements on the same people are correlated; the two-sample test throws that information away and usually loses power.
Entering the standard error instead of the standard deviation. Some reports give mean ± SE. Multiply the SE by √n to get the SD.
Running many t-tests on several groups. Comparing three or more groups pair by pair inflates the false-positive rate; analysis of variance (ANOVA) is the usual tool.
Ignoring the assumptions. Observations must be independent, and each group should be roughly normal or large (STAT 500 uses n > 30 as a guide for the paired case). Heavily skewed small samples call for a nonparametric test.