Broadly speaking, there are three types of t-tests:

- One sample t-test
- Two sample t-test
- Paired samples t-test

This tutorial provides examples of how to perform each of these tests in Google Sheets.

**Example: One Sample t-Test**

**Definition: **A one sample t-test is used to test whether or not the mean of a population is equal to some value.

**Example: **A botanist wants to know if the mean height of a certain species of plant is equal to 15 inches. She collects a random sample of 12 plants and records each of their heights in inches.

The following screenshot shows how to perform a one sample t-test to determine if the true population mean height is equal to 15 inches:

The two hypotheses for this particular one sample t test are as follows:

**H0: **µ = 15 (the mean height for this species of plant is 15 inches)

**HA: **µ ≠15 (the mean height is not 15 inches)

Because the p-value of our test** (0.120145) **is greater than alpha = 0.05, we fail to reject the null hypothesis of the test. We do not have sufficient evidence to say that the mean height for this particular species of plant is different from 15 inches.

**Example: Two Sample t-Test**

**Definition: **A two sample t-test is used to test whether or not the means of two populations are equal.

**Example: **Researchers want to know whether or not two different species of plants in a particular country have the same mean height. They collect a random sample of 20 plants from each species and record each plant height in inches.

The following screenshot shows how to perform a two sample t-test using the **T.TEST()** function to determine if the two population mean heights are equal:

**Note: **It’s also possible to perform a one-tailed two sample t-test with or without the assumption that both samples have the same variance. Refer to the T.TEST documentation to see how to adjust the assumptions for the test.

The two hypotheses for this two sample t test are as follows:

**H0:** μ1 = μ2 (the two population means are equal)

**H1: **μ**1** ≠ μ2 (the two population means are not equal)

Because the p-value of our test** (0.530047) **is greater than alpha = 0.05, we fail to reject the null hypothesis of the test. We do not have sufficient evidence to say that the mean height for this particular species of plant is different from 15 inches.

**Example: Paired Samples t-Test**

**Definition: **A paired samples t-test is used to compare the means of two samples when each observation in one sample can be paired with an observation in the other sample.

**Example: **We want to know whether a study program significantly impacts student performance on a particular exam. To test this, we have 20 students in a class take a pre-test. Then, we have each of the students participate in the study program for two weeks. Then, the students retake a test of similar difficulty.

The following screenshot shows how to perform a paired sample t-test to compare the difference between the mean scores on the first and second test:

**Note: **It’s also possible to perform a one-tailed two sample t-test with or without the assumption that both samples have the same variance. Refer to the T.TEST documentation to see how to adjust the assumptions for the test.

The two hypotheses for this paired samples t test are as follows:

**H0:** μ1 = μ2 (the two population means are equal)

**H1: **μ**1** ≠ μ2 (the two population means are not equal)

Because the p-value of our test** (0.011907) **is less than alpha = 0.05, we reject the null hypothesis of the test. We have sufficient evidence to say that there is a statistically significant difference between the mean pre-test and post-test score.