Skip to main content

Ttest Calculator

Our free statistics calculator solves ttest problems. Get worked examples, visual aids, and downloadable results. Enter your values for instant results.

Reviewed by Manoj Kumar, Mathematics Educator

Reviewed by Manoj Kumar, Mathematics Educator

Formula

t = (x1 - x2) / sqrt(s1^2/n1 + s2^2/n2)

Where x1 and x2 are sample means, s1 and s2 are sample standard deviations, and n1 and n2 are sample sizes. This is the Welch t-test formula that does not assume equal variances. The degrees of freedom are approximated using the Satterthwaite equation.

Worked Examples

Example 1: Comparing Two Teaching Methods

Problem:Test scores with Method A: 78, 82, 85, 79, 81, 83, 77, 80. Method B: 85, 88, 90, 86, 89, 91, 84, 87. Is there a significant difference at alpha = 0.05?

Solution:Mean A = 80.625, SD A = 2.615, n = 8\nMean B = 87.500, SD B = 2.449, n = 8\nMean Difference = -6.875\nWelch SE = sqrt(2.615^2/8 + 2.449^2/8) = 1.268\nt = -6.875 / 1.268 = -5.422\ndf (Welch) = 13.9\nTwo-tailed p < 0.001\nCohen d = 2.71 (large effect)

Result:t = -5.422 | p < 0.001 | Significant | Cohen d = 2.71 (Large effect)

Example 2: One-Sample Test Against Known Mean

Problem:A manufacturer claims packages weigh 500g. Sample weights: 498, 502, 497, 501, 499, 503, 496, 500. Test at alpha = 0.05.

Solution:Sample mean = 499.5, SD = 2.449, n = 8\nHypothesized mean = 500\nt = (499.5 - 500) / (2.449/sqrt(8)) = -0.577\ndf = 7\nTwo-tailed p = 0.582\nSince p > 0.05, fail to reject H0.

Result:t = -0.577 | p = 0.582 | Not significant | No evidence packages deviate from 500g

References

Reviewed by Manoj Kumar, Mathematics Educator · Editorial policy