Hypothesis Tests for Differences in Matched Pairs (College Board AP® Statistics): Study Guide

Naomi C

Written by: Naomi C

Reviewed by: Dan Finlay

Updated on

Paired t-test

What is a paired t-test?

  • A paired t-test is used to test whether the mean of the differences, μd, between paired measurements is equal to 0

  • A paired t-test is easily confused with a two-sample t-test

    • but the data for a two-sample t-test must come from two independent samples

      • e.g. the mean lifespan of two different brands of battery

    • whereas the data for a paired t-test are linked and come from one population

      • e.g. the result of a blood test for a group of people before a medication is given and the result after it is given

  • To test the claim, you take two measurements on each individual in a random sample of size n from a single population and run a one-sample test on the differences between the two values

    • e.g. you take a random sample of 30 students and record their test scores in both Science and Math, then run a one-sample t-test on the differences between each data pair

What are the hypotheses for a paired t-test?

  • The null hypothesis, H0, is the assumption that mean of the differences between the two measures is 0

    • e.g. H0 : The mean of the differences between the test score for Science and the test score for Math is 0, μd=0

      • It is assumed to be correct, unless there is convincing evidence against it

  • The alternative hypothesis, Ha, is what you think the mean of the differences is relative to 0, i.e. if it is positive or negative

    • e.g. Ha: The mean of the differences between the test score for Science and the test score for Math is less than 0, μd<0

    • Remember that a t-test could be one-tailed or two-tailed

      • This will affect your alternative hypothesis

Examiner Tips and Tricks

When writing out your hypotheses, always fully define the symbol used for the population parameters in context, e.g. '... where μd is the mean of the differences between the test score for Science and the test score for Math, and d=xScience−xMath'.

What are the conditions for a paired t-test?

  • When performing a paired t-test, you must show that it meets the following conditions:

    • The two measures should come from the same items within the population

    • Items in the sample (or experiment) must satisfy the independence condition

      • by verifying that data is collected by random sampling

      • or random assignment (in an experiment)

      • and, if sampling without replacement, showing that the sample size is at most 10% of the population size

      • This is not needed when treatments are randomly assigned in an experiment

    • the sampling distribution of x¯d is approximately normal

    • This is true if any one of these holds:

      • the population of differences is approximately normal

      • the number of pairs is large, n≥30

      • the sample differences show no strong skewness and no outliers

How do I calculate the standardized test statistic (t-value)?

  • The t-value, for the paired t-test is given by:

    • t=x¯d−μdsdn

    • where x¯d is the mean of the differences in the sample, sd is the standard deviation of the differences in the sample, and n is the sample size

Examiner Tips and Tricks

The formula for the standardized test statistic is given in the exam, statistic−parameterstandard error of the statistic, along with tables of parameters and standard errors.

You will need to apply this correctly to get the t-value. In the numerator, the statistic is the mean of the pair differences in the sample and the parameter is the mean of the pair differences in the population, which is 0 for the null hypothesis.

How do I calculate the p-value?

  • Work out the t-value

  • Find the appropriate number of degrees of freedom (df)

    • For a paired t-test, df=n−1

  • Using the t-distribution table given to you:

    • find the row for the df

    • find the two values in that row that the calculated t-value lies between

    • the p-value lies between the tail probabilities at the top of those two columns

  • Note that the p-value from the t-table is for one tail

  • For a two-tail test, remember to work out the total probability across both tails

    • You can double the p-value from a one-tail test

How do I conclude a hypothesis test?

  • Conclusions to a hypothesis test need to show two things:

    • a decision about the null hypothesis

    • an interpretation of this decision in the context of the question

  • To make the decision, compare the p-value to the significance level, α

    • If p-value ≤α, reject the null hypothesis

    • If p-value >α, fail to reject the null hypothesis

Examiner Tips and Tricks

Remember that the test should be interpreted within the context of the question.

Use the same language in your conclusion that is used in the problem. E.g. 'The data provide convincing statistical evidence that the mean of the differences between the test score for Science and the test score for Math is less than 0, so on average students score higher in Math than in Science'.

What are the steps for performing a paired t-test on a calculator?

  • When using a calculator to conduct a paired t-test, you must still write down all steps of the hypothesis testing process:

    • State the null and alternative hypotheses and clearly define your parameters

    • Describe the test being used and show that the situation meets the conditions required

    • Calculate the t-value and the degrees of freedom

    • Calculate the p-value using your calculator

      • select a one-sample t-test and enter the relevant summary statistics or data to generate the p-value for the differences

    • Compare the p-value to the significance level

    • Write down the conclusion to the test and interpret it in the context of the problem

Examiner Tips and Tricks

Even if you perform the paired t-test on your calculator, it is still important to show all of your working to demonstrate full understanding. Therefore you should still show workings for calculating the t-value and the degrees of freedom.

Worked Example

A company is investigating whether a short online typing course improves the typing speed of its employees. 9 employees are selected at random from the 100 employees at one office, and their typing speed (in words per minute) is measured. They then complete the 30-minute course, and their typing speed is measured again. You may assume that the differences in typing speed (after − before) follow a normal distribution. The results are shown in the table below.

Employee

Typing speed before (wpm)

Typing speed after (wpm)

1

42

47

2

38

42

3

51

53

4

45

48

5

47

48

6

40

44

7

49

52

8

44

44

9

36

42

(a) Perform an appropriate hypothesis test at the 1% significance level. Do the data provide convincing statistical evidence that, on average, employees type faster after the course than before?

(b) Based on the design of the study, can the company conclude that the course caused the increase in mean typing speed? In addition, to what population can the results of this study be generalized? Justify your answers.

Answer:

(a)

State the type of test being used and verify the conditions for the test

The correct inference procedure is a paired t-test with α=0.01

Both measurements were taken on each employee, so the data are paired

The 9 employees were selected at random

The sample size, 9, is at most 10% of the 100 employees at the office (9 ≤ 10)

The differences in typing speed are assumed to follow a normal distribution, as stated in the question

Define the population parameter, μd

Let μd be the mean difference in typing speed (after − before) for all employees at the office, where d=speed after−speed before

Write the null and alternative hypotheses

This will be a one-tailed test: if employees type faster after the course, the differences (after − before) will be greater than 0

H0:μd=0

Ha:μd>0

Add an additional column to the table for the differences

Employee

Typing speed before (wpm)

Typing speed after (wpm)

Difference, after − before (wpm)

1

42

47

5

2

38

42

4

3

51

53

2

4

45

48

3

5

47

48

1

6

40

44

4

7

49

52

3

8

44

44

0

9

36

42

6

Use your calculator, or work by hand, to find the mean and the standard deviation of the differences

x¯d=3.11111...

sd=1.90029...

Calculate the standardized test statistic

t=x¯d−μdsdn

=3.11111...−01.90029...9

=4.911...

Calculate the number of degrees of freedom

df=9−1=8

Method 1: Using the t-table

Find the row corresponding to 8 degrees of freedom and find the two values that the calculated t-value lies between

4.911... lies between 4.501 (tail probability 0.001) and 5.041 (tail probability 0.0005)

0.0005<p-value<0.001

Compare the p-value with the significance level and state the decision

p-value<0.001<0.01, so reject H0

Method 2: Using a calculator

Enter the differences into a list in your calculator

Perform a one-sample t-test on the differences, using μ0=0 and the alternative hypothesis μd>0

p-value=0.00058...

Compare the p-value with the significance level and state the decision

0.00058...<0.01, so reject H0

Interpret the result in the context of the question

There is convincing statistical evidence that, on average, employees at the office type faster after the course than before

(b)

Address the causal claim

The study uses a before-and-after paired design with no control group

There is no comparison group of employees who did not take the course, so other factors could explain the increase in typing speed, for example practice from taking the typing test twice, or employees trying harder the second time

The company cannot conclude that the course caused the increase in mean typing speed, because the effect of the course cannot be separated from other factors without a control group

Address the scope of generalization

The 9 employees were selected at random from the 100 employees at the office

The results can be generalized to all 100 employees at the office, but not to employees at other offices or to people in general, because they were not part of the population that was sampled

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Build on this topic

Naomi C

Author: Naomi C

Expertise: Maths Content Creator

Naomi graduated from Durham University in 2007 with a Masters degree in Civil Engineering. She has taught Mathematics in the UK, Malaysia and Switzerland covering GCSE, IGCSE, A-Level and IB. She particularly enjoys applying Mathematics to real life and endeavours to bring creativity to the content she creates.

Dan Finlay

Reviewer: Dan Finlay

Expertise: Portfolio Lead

Dan graduated from the University of Oxford with a First class degree in mathematics. As well as teaching maths for over 8 years, Dan has marked a range of exams for Edexcel, tutored students and taught A Level Accounting. Dan has a keen interest in statistics and probability and their real-life applications.