T-test 2 Independent Means Calculator

Input






Formulas and Output

\[s_p^2 = \frac{(n_1-1)s_1^2+(n_2-1)s_2^2}{n_1+n_2-2} = \frac{ (9-1)0.3403+(9-1)0.3011 }{ 9 + 9 - 2} = 0.3207\] \[t = \frac{\bar{x}_1 - \bar{x}_2 }{\sqrt{s_p^2\left(\frac{1}{n_1}+\frac{1}{n_2}\right)} } = \frac{ 97.8556 - 98.4889 }{\sqrt{ 0.3207 \left(\frac{1}{ 9 }+\frac{1}{ 9 }\right)} } = -2.3724 \]

When should you use a two sample
t-test?

The two sample t-test is a method used to test whether two population means with unknown variance are equal or not. The variance of the populations are generally unkown if the sample size is small, commonly when n < 50.

According to the central limit theorem, as n approaches infinity the sample will be normally distributed and the variance will be known, in that case you use a Z test instead. You can verify this yourself by comparing the values of a t-table and a z-table as n approaches infinity.

Example, under normal conditions, is the average body temperature the same for men and women? Medical researchers interested in this question collected data from a large number of men and women, and random sample from that data are presented in the accompanying lists. Is there sufficient evidence that mean body temperatures differ for men and women?
Body temperature (°F)
Men = [96.9 97.4 97.5 97.8 97.8 97.9 98 98.6 98.8]
Women = [97.8 98 98.2 98.2 98.2 98.6 98.8 99.2 99.4]

You want to use a two sample t-test here because the sample size is small and since the question does not give us a variance we can assume the variances are unknown.