The t-test is used to determine if means of two data sets differ significantly. This calculator performs one sample and two samples t-test and generates an explanation with all steps.
We use the t-test to compare the mean values of two datasets. Of course, the means of two groups will always differ by some amount; what matters is whether the difference is statistically significant or not.
There are three types of t-test.
A two-sample t-test compares means of two datasets.
One sample t-test checks if the mean of a sample is equal to a target value.
A paired t-test is used when we measure the same subject two times, for example, before and after the treatment.
In order to use a t-test, the data have to be normally distributed.
The two-sample t-test is most common. In the following example we will perform a t-test for two groups of unequal sizes.
Suppose we have the following data.
Group 1: 8 12 9 10 11 16 5 17
Group 2: 3 5 12 10 4 2
We want to compare the means of these two groups.
Step 1: Compute sample size, mean and st. deviation.
For group 1 we have
Size n1 = 8
Mean μ1 = 11
Standard deviation s1 = 3.7417
For group 2 we have
Size n2 = 6
Mean μ2 = 6
Standard deviation s2 = 3.6969
Step 2: Calculate the test statistics t
sp = √((n11-1)s12+(n2-1)s22)/(n1+n2-2)
=
sp = 3.7231
t = (μ1 - μ2)/sp√1/n1 + 1/n2) = 2.4867
Step 3: Calculate the p value
Degrees of freedom = n1+n2-2 = 12
p12,0.05 = 2.179
The means are significantly different because the calculated t exceeds the critical value.
1. T Test - in-depth tutorial for beginners
2. Standard deviation calculator - with all steps
3. Step-by-step solution - using Microsoft Excel.
Twelve younger adults and twelve older adults conducted a life satisfaction test. The data arepresented in the table below. Compute the appropriate t-test.
$$\begin{array}{c|cccccccccc} \text{older} & 12 & 16 & 10 & 19 & 20 & 11 & 14 & 25 & 16 & 12 \\ \text{younger} & 10 & 9 & 12 & 15 & 14 & 15 & 13 & 12 & 21 & 15 \end{array}$$Are the means between two data sets are significantly different at level α < 0.05.
$$ \begin{array}{c|cccccccccc} \text{group 1} & 5.1 & 4.3 & 3.1 & 4.6 & 3.9 & 4.3 & 4.7 & 3.8 & 4.1 & 5.0 \\ \text{group 2} & 2.1 & 3.4 & 1.8 & 3.5 & 4.0 & 2.5 & 2.1 & 3.5 & 2.8 & 1.9 \end{array}$$