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.

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 3.1K 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
.