Math Calculators, Lessons and Formulas

It is time to solve your math problem

mathportal.org

T-Test calculator

google play badge app store badge

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.

Result:

You entered the following data:

GROUP 1 GROUP 2
$$ \begin{array}{cccc}72&68&74&77\\82&80&75&85\\69&71&&\end{array} $$ $$ \begin{array}{cccc}79&73&82&81\\88&86&83&91\\75&78&&\end{array} $$

The means of Group 1 and Group 2 ARE significantly different at p < 0.05.

Summary
Group 1 Group 2
Mean 75.3 81.6
Variance 28.81 28.84
Stand. Dev. 5.3675 5.3703
n 10 10
t -16.7781
d.o.f 9
critical value 2.262
since | t | > criticall value => there is sig. diff.

Explanation

Step 1: Find $ t $ value and degrees of freedom

To find $ t $ value and degrees of freedom we will use following formulas:

$$ \begin{aligned} t &= \frac{ \overline{X_D} } {\frac{S_D}{\sqrt{n}}} \\ d.o.f &= n-1 \end{aligned} $$ $ \overline{X_D} $ = Mean of differences between pairs
$ S_{X_D} $ = Standard deviation of differences between pairs
$ d.o.f $ = degrees of freedom
$ n $ = Total number of values in first(second) dataset

In this example we have:

$$ \begin{aligned} \overline{X_D} &\approx -6.3 \\ S_{X_D} &= \sqrt{\frac{1}{n-1} \sum\limits_{i=1}^n \left( X_{Di} - \overline{X_D} \right)^2} \approx 1.1874 \\ \end{aligned}$$

After substituting these values into the formula for $ t $ we have:

$$ t = \frac{ \overline{X_D}} { \frac{S_D}{\sqrt{n}}} = \frac{ -6.3 } { \frac{ 1.1874 }{\sqrt{ 10 }}} \approx \color{blue}{ -16.7781 } $$

The degrees of freedom is:

$$ d.o.f = n - 1 = 9 $$

Step 2: Determine critical value for $ t $ with degrees of freedom = 9 and $ \alpha = 0.05 $.

In this example the critical value is $ \color{red}{ 2.262 } $ (see the table below).

The absolute value of the calculated $ t $ exceeds the critical value $(\color{blue}{ 16.7781 } > \color{red}{ 2.262 })$, so the means are significantly different.

Show T Table

Report an Error!

Script name : t-test-calculator

Form values: 0 , 72 68 74 77 82 80 75 85 69 71 , 79 73 82 81 88 86 83 91 75 78 , pai , ev , tt , sa , g , , , sa , tt , ,

Comment (optional)

 
close

Tutorial

What is a t test?

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.

Two-sample t-test

The two-sample t-test is most common. In the following example we will perform a t-test for two groups of unequal sizes.

Example

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)/sp1/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.

Resources
Two sample t-test calculator
One or two tails, equal or unequal variances, paired or unpaired
help ↓↓ examples ↓↓
Use data grit to input values
Paired t-tests typically consist of one group of units that has been tested twice.
Unpaired T Test (default)
Paired (Dependent) T Test
If groups have unequal variances, the Welch t-test will be applied.
Groups Have Equal Variance (default)
Groups Have Unequal Variance (Welch t-test)
Use two-tailed test if you want to decide if the first mean is different from the second mean.
Use one-tailed test if you want to decide if the first mean is larger/smaller from the second mean.
Two Tailed Test (default)
One Tailed Test
This is the probability that we wrongly report a significant difference.
0.05 (default)
0.01
0.001
Hide steps
thumb_up 4K thumb_down

Get Widget Code

One sample t-test calculator
Compare the dataset mean to some fixed value.
help ↓↓ examples ↓↓
This is the probability that we wrongly report a significant difference.
0.05 (default)
0.01
0.001
Use two-tailed test if you want to decide if the first mean is different from the second mean.
Use one-tailed test if you want to decide if the first mean is larger/smaller from the second mean.
Two Tailed Test (default)
One Tailed Test
Hide steps
Examples
ex 1:

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}$$
ex 1:

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}$$
452 861 664 solved problems
working...
×
ans:
syntax error
C
DEL
ANS
±
(
)
÷
×
7
8
9
4
5
6
+
1
2
3
=
0
.