# Hypothesis Testing for a Difference in Paired Means This lesson explains how to conduct a hypothesis test for a difference between two population means where each observation in one sample can be paired with one observation in the other sample. This type of test is known as a paired t-test.

Here is an example of when we might use a paired t-test:

• 20 students in a class take a test, then study a certain guide, then retake the test. To compare the difference between the scores in the first and second test, we use a paired t-test because for each student their first test score can be paired with their second test score.

## Checking Conditions

Before we can conduct a paired t-test, we first need to make sure the following conditions are met to ensure that our hypothesis test will be valid:

• Random: A random sample or random experiment should be used to collect data for both samples.
• Paired: The test is conducted on paired data.
• Normal: The sampling distribution is normal or approximately normal.

If these conditions are met, we can then conduct a paired t-test. The following two examples show how to conduct a one-tailed paired t-test and a two-tailed paired t-test.

## Procedure for Conducting a Paired t-test

To conduct a paired t-test, we follow the five step hypothesis testing procedure:

1. State the null and alternative hypotheses.

H0: μd = 0

Ha: μd ≠ 0 (two-tailed)
Ha: μd > 0 (one-tailed)
Ha: μd < 0 (one-tailed)

2. Determine a significance level to use for the hypothesis.

Decide on a significance level. Common choices are .01, .05, and .1.

3. Find the test statistic and the corresponding p-value.

Let a = the student’s score on the first test and b = the student’s score on the second test. To test the null hypothesis that the true mean difference between the test scores is zero:

• Calculate the difference between each pair of scores (di = bi – ai)
• Calculate the mean difference (d)
• Calculate the standard deviation of the differences sd
• Calculate the t-statistic, which is T = d / (sd / √n)
• Use the T Score to P Value Calculator to find the p-value associated with this t-statistic with n-1 degrees of freedom.

4. Reject or fail to reject the null hypothesis.

Using the test statistic or the p-value, determine if you can reject or fail to reject the null hypothesis based on the significance level.

Remember the p-value tells us the strength of evidence in support of a null hypothesis. If the p-value is less than the significance level, we reject the null hypothesis.

5. Interpret the results.

Interpret the results of the hypothesis test in the context of the question being asked.

Let’s walk through an example of how to conduct a paired t-test.

## Example: Paired t-test

A teacher wants to know whether or not a certain study guide makes any difference in test scores. To test this, she has her class of 20 students all take the same test. Then, she lets them look over the study guide. Then, she gives them a second test.

The table below shows the test scores for the 20 students: Test the hypothesis that looking over the study guide has some impact on the student’s scores. Use a .05 level of significance.

Step 1. State the hypotheses.

The null hypothesis (H0): μTest1 = μTest2

The alternative hypothesis: (Ha): μTest1 ≠ μTest2

Step 2. Determine a significance level to use.

The problem tells us that we are to use a .05 level of significance.

Step 3. Find the test statistic and the corresponding p-value.

Mean difference (d) = 2.15

Standard deviation of the differences (sd) = 6.055

t-statistic (T) = d / (sd / √n) = 2.15 / (6.055 / √20) = 2.15 / (1.354) = 1.588

degrees of freedom = n-1 = 20-1 = 19

According to the T Score to P Value Calculator, a t score of 1.588 with 19 degrees of freedom has a p-value of 0.12879.

4. Reject or fail to reject the null hypothesis.

Since the p-value is not less than our significance level of .05, we fail to reject the null hypothesis.

5. Interpret the results.

Since we failed to reject the null hypothesis, we do not have sufficient evidence to say that the study guide has an impact on the student’s test scores.

## Conducting a Paired t-test in Excel

Conducting a paired t-test in Excel is simple. Just enter the observations for the first sample in one column and the observations in the second sample in another column.

Then type =T.TEST(first column range, second column range, number of tails, type of test) in any cell.

In our example we would type =T.TEST(H4:H23, I4:I23, 2, 1) since this is a two-tailed hypothesis test and the “1” in the last argument indicates that it’s a paired test: Once you hit enter, the p-value for the hypothesis test will be shown: Notice how the p-value here matches the p-value that we found in our example above.