0:00 / 0:00

Hypothesis Test for Matched Pairs

When a hypothesis test is performed for matched pairs, the subjects or observations are matched in pairs and then we analyze the differences.


Wize Tip
Review Hypothesis Testing if you need a refresher of the five steps. (See: Hypothesis Testing with One Sample)


Hypotheses:

Ho:D=0H_o:\overline{D}=0 (there is no difference in the population mean of the differences)
Ha:D0H_a:\overline{D}\ne0 (there is a difference in the population mean of the differences)


Wize Concept
Some textbooks use the following notations:

Ho:μd=0H_o:\mu_d=0 (there is no difference in the population mean of the differences)
Ha:μd0H_a:\mu_d\ne0 (there is a difference in the population mean of the differences)


Basically, we compute the difference between the two means and plug the value into a one-sample tt-test on the differences.
  • If the mean difference is zero, then the two means are not different.
  • If the mean difference is statistically significantly not zero, then the two means are different.

PAGE BREAK

d\overline{d} is the sample mean of the differences
d=x1ix2i=din\overline{d}=\overline{x}_{1i}-\overline{x}_{2i}=\frac{\sum_{ }^{ }d_i}{n}
sds_d is the sample standard deviation of the differences
sd=(did)2n1s_d=\sqrt{\frac{\sum_{ }^{ }\left(d_i-\overline{d}\right)^2}{n-1}}

Test-statistic:
t=dDˉsdn\displaystyle\boxed{t=\frac{\overline{d}-\bar D}{\frac{s_d}{\sqrt{n}}}}
where Dˉ=0\bar D=0 such that:

t=d0sdn\displaystyle\boxed{t=\frac{\overline{d}-0}{\frac{s_d}{\sqrt{n}}}}

Degrees of freedom:
n1n-1
where nn = number of pairs (or sample size)


Wize Concept
Some textbook uses the following notations:
t=xdμdsdn\displaystyle\boxed{t=\frac{\overline{x}_d-\mu_d}{\frac{s_d}{\sqrt{n}}}}
where μd=0\mu_d=0 such that:
t=xd0sdn\displaystyle\boxed{t=\frac{\overline{x}_d-0}{\frac{s_d}{\sqrt{n}}}}


Wize Tip
How can you tell if two mean are dependent of each other, thereby requiring you to do a matched pairs tt-test? A classic example is when you are testing the same person before and after a treatment.

PAGE BREAK
Example
Hank's Auto Mall sells used cars and got them all appraised by Auto Corp. He hired another car appraisal company, Vroom Car Appraisal, to get a second opinion on those same cars. Hank wants to see if there is a significant difference between the appraisal values for each of his cars. Is there evidence at the 5% significance level? Eight cars were randomly sampled. Values are in $,000's:

Auto CorpVroomDifferencex1x2di=x1x2CAR 151587CAR 275669CAR 3876225CAR 4705713CAR 549512CAR 6827111CAR 7604218CAR 8604713Meanx1=66.75x2=56.75d=10Standard Deviations1=14.02s2=9.74sd=10.3\begin{array}{|l|c|c|c|}\hline & \text{Auto Corp} & \text{Vroom} & \text{Difference}\\ &x_1 & x_2 & d_i=x_1-x_2\\\hline \text{CAR 1} & 51 & 58 & -7\\\hline \text{CAR 2} & 75 & 66 & 9\\\hline \text{CAR 3} & 87 & 62 & 25\\\hline \text{CAR 4} & 70 & 57 & 13\\\hline \text{CAR 5} & 49 & 51 & -2\\\hline \text{CAR 6} & 82 & 71 & 11\\\hline \text{CAR 7} & 60 & 42 & 18\\\hline \text{CAR 8} & 60 & 47 & 13\\\hline \text{Mean} & \overline{x}_1=66.75 & \overline{x}_2=56.75 & \overline{d}=10\\\hline \text{Standard Deviation} & s_1=14.02 & s_2=9.74 & s_d=10.3\\\hline \end{array}

The mean appraisal values for each company are dependent on each other because they are based on the same 8 cars - each car was measured twice. In other words, the cars sampled were not drawn from different, independent populations. Rather, they are drawn from the sample population.

Sample mean of the differences, d=10\overline{d}=10
Sample standard deviation of the differences, sd=10.3s_d= 10.3
Sample size, n=8n=8 (not 16!)

What does d\overline{d} mean in this example (in plain English)?
The mean difference in appraisal value between the two appraisers is $10,000.

Hypotheses:
Ho:Dˉ=0H_o:\bar D=0
Ha:Dˉ0H_a:\bar D\ne0 (two-tail test)


PAGE BREAK

Test-statistic:
t=d0sdn=1010.3/8=2.75t=\dfrac{\overline{d}-0}{\dfrac{s_d}{\sqrt{n}}}=\dfrac{10}{10.3/\sqrt{8}}=2.75
df=n1=81=7df=n-1=8-1=7

PAGE BREAK
P-value:



t-table: 0.02<0.02< p-value <0.05<0.05
Software: p-value = 0.0287

Since the pp-value is less than α=0.05\alpha=0.05, we have evidence that there is a difference between the two appraisal values between the two appraisers.

PAGE BREAK

What happens if we incorrectly do a two-sample test, given the paired nature of the data?


Since the variances are quite equal, suppose we incorrectly do a pooled two-sample test for independent means:

sp=12.07s_p=12.07
n1=8n_1=8
n2=8n_2=8
(Notice that now it looks like there are 16 cars being appraised, 8 each from 2 different populations!)


t=(x1x2)0sp1n1+1n2=(66.7556.75)12.0718+18=1.66t =\dfrac{(\overline{x}_1 – \overline{x}_2 )-0}{s_p \sqrt{\dfrac{1}{n_1} +\dfrac{1}{n_2} }}=\dfrac{(66.75– 56.75)}{12.07\sqrt{\dfrac{1}{8}+\dfrac{1}{8}}}=1.66


df=8+82=14df = 8 + 8 – 2 = 14
Using software: pp-value = 0.1198

In this case, the pp-value is greater than α=0.05\alpha=0.05. Doing a two-sample test (incorrectly) suggests that no evidence that the two means differ.


Watch Out!
It is important that you can tell the difference between dependent means or independent means.

0:00 / 0:00

Example: Hypothesis Test for Matched Pairs


The cabbage diet, invented by Dr. Patch, aims at helping people lose weight. According to this diet, eating lots of cabbage soup can reduce your consumption of calories. Six people are asked to track the number of calories consumed during a regular week and a week when they were on the cabbage diet. The number of calories consumed is recorded below:


(a) State the null and alternative hypotheses.

Di=D_i=Regular week - Cabbage Diet Week

Ho:Dˉ=0    Ha:Dˉ>0H_o:\bar D=0\space\space\space\space H_a:\bar D>0 (one-tail test)

or

Ho:μd=0    Ha:μd>0H_o:\mu_d=0\space\space\space\space H_a:\mu_d>0 (one-tail test)


(b) Compute the test-statistic

t=178.330193.436=2.258\displaystyle{t^{\cdot}=\frac{178.33-0}{\frac{193.43}{\sqrt{6}}}=2.258}

PAGE BREAK

(c) What the p-value?

df=61=5df = 6 -1 = 5



2.015<t<2.5712.015 < t < 2.571 so the one-sided p-value is between 0.025 and 0.05.
PAGE BREAK

(d) At the 5% significance level, is there evidence that this diet reduces the consumption of calories?

Since the p-value is between 2.5% and 5%, it is less than 5% so reject HoH_o.
Thus, there is evidence that this diet works.


(e) At the 1% significance level, is there evidence that this diet reduces the consumption of calories?

Since the p-value is between 2.5% and 5%, it is greater than 1% so we fail to reject HoH_o.
Thus, there is no strong evidence that this diet works.


Twin Pines Winery takes their visitors to the gift shop first before the wine tasting. After the wine tasting, they bring them back to the gift shop. We want to compare the difference in spending at the gift shop before vs. after visitors experience the wine tasting. On average, visitors spend $1.78 more at the gift shop after the wine tasting with a standard deviation of $7.73. This is based on a random sample of 51 visitors.
(i) What is the critical value (tt^{\cdot}) if the significance level is α=0.05\alpha=0.05?
Extra Practice