Hypothesis Testing for Matched Pairs and Dependent Samples

UPI Study › Courses › Marketing Research › Free lessons › Lesson 11.9 Free lesson

Hypothesis Testing for Matched Pairs and Dependent Samples

Marketing Research · Chapter 11: Hypothesis Testing and Inferential StatisticsSection 11.9 · lesson 83 of 10111 min · free to watch

← Hypothesis Testing for Differences Between Two ProportionsNext lesson: Interpreting the Correlation Coefficient →

Earn 3 college credits for Marketing ResearchRecommended for credit by NCCRS · Marketing 300 · self-paced · one payment, lifetime access

In this lesson

Test before-and-after changes on the same people with paired t.

  • Tell dependent samples from independent samples by how the data were collected
  • Compute a paired t statistic from the within-pair differences
  • Explain why pairing removes person-to-person noise and adds power
  • Recognize design problems, such as order effects, that pairing cannot fix

Free study notes

Get this lesson's notes by email

The key points and 4 practice questions with answers, in your inbox. One email, free.

One email. Unsubscribe in one click.

Transcript

Everything said in the video, section by section (1,517 words). Read along, or search it.

Opening Question

Generous Raters and Tough Critics

Imagine a taste test. Ten people each try the old Fernway pack, and the new one. And they rate both. Fernway Snacks is a composite case built for teaching.

Now, people rate differently. Leo always gives high scores. He is generous with everything. Victor is a tough critic. He always gives low ones. So their numbers start in very different places.

Suppose you pile all the old ratings in one bucket, and all the new ratings in another. Their personal styles make both buckets look noisy. A high score might mean the pack is good. Or it might just mean that person gives generous scores.

But look at each person's own change instead. Did Leo rate the new pack higher than the old one? Did Victor? Then the noise from "who is generous" melts away. That is the trick behind matched pairs.

Learning Goals

Before and After on the Same People

By the end of this lesson, you will recognize matched-pairs data, also called dependent samples, such as before and after measures on the same people. You will run a paired t-test on the differences, and read the result. And you will explain how this differs from independent-sample tests, and why it can be more powerful.

Linked Samples

One Difference per Shopper

First: when the two samples are not independent. In lesson 11.2, the two groups were different people. Nothing linked one rating to another. An online shopper's score had nothing to do with a grocery shopper's score.

Here, Grace has matched pairs. That means two measurements on the same shopper. Or two measurements on two people, matched on something important, such as age or income.

Why does that matter? Because the two ratings of one shopper are linked. The same person produced both. A generous shopper is generous on both packs. A tough critic is tough on both. Treating those ratings as unrelated would waste that link. It would throw away useful information.

So the fix is simple. Subtract, to get one difference per shopper. New rating, minus old rating. Then do a one-sample t-test on those differences, just like the one in lesson 11.2. Two columns of ratings become one column of changes.

Picturing Pairs

Lines From Old Pack to New Pack

Picture the data as lines. On the left, each shopper's rating of the old pack. On the right, the same shopper's rating of the new pack. A connecting line links the two ratings. Green lines mean the shopper rated the new pack higher. Grey lines mean the rating stayed the same.

Most lines slope upward. And that is true, even though the shoppers start at very different levels. Some begin at a four. Some begin at a seven. The pairing keeps each person's own baseline out of the comparison. Only the slope of each line counts.

Here are the actual ratings, on a scale from 1 to 10. The data are invented, for teaching. Shopper one rated the old pack a 5, and the new pack a 6. Shopper two went from 6 to 7. Shopper three stayed at 4. Shopper four went from 7 to 8.

Differences

Ones, Twos and Zeros

And the rest follow the same pattern. Look at the last row of the table. It holds the differences, new minus old. The values are ones, twos, and zeros. Not one shopper rated the new pack lower. And those ten differences are all the test uses. The original ratings have done their job.

Hypotheses

H0 and the Paired Formula

Next: the paired t-test. The hypotheses, in words. The null: on average, the new pack gets the same rating as the old. In other words, the mean difference is zero. The alternative: the average rating changed.

In symbols, the null says mu d equals zero. The alternative says mu d is not equal to zero. Here, mu d is the true mean of the differences, new minus old, over all shoppers. Alpha is 0.05, and the test is two-tailed.

Now the formula, in words. t is the mean of the differences, divided by the standard error of the differences. And that standard error is the standard deviation of the differences, divided by the square root of the number of pairs.

Let us name every symbol. D bar is the mean difference. S d is the sample standard deviation of the differences. And n is the number of pairs. So t equals d bar, over s d divided by the square root of n.

Degrees of Freedom

Count Pairs, Not Ratings

The degrees of freedom are n minus one. But careful. The letter n counts pairs, not ratings. Ten shoppers give twenty ratings. But they give only ten pairs. So the degrees of freedom here are 9.

There is also a condition. The differences should be roughly bell-shaped. Or n should not be tiny. If neither holds, use the Wilcoxon signed-rank test instead. That is the rank-based partner of this test, from lesson 11.5.

Now picture the differences as dots on a line. One dot per shopper. Zero means no change. That is where the null hypothesis lives. Seven of the ten differences are a gain of one or more. And none is negative. So the mean difference, at 0.90, sits well to the right of zero.

Now, by hand. The differences add up to 9. So d bar is 9 over 10. That is 0.90.

The standard deviation of the differences is 0.7379. So the standard error is 0.7379, over the square root of 10. That is 0.2333.

Decision

Almost Four Standard Errors Above Zero

Then t is 0.90, over 0.2333. That gives 3.857. The mean difference sits almost four standard errors above zero. That is a long way out.

Where does that land on the t curve? With 9 degrees of freedom, the two-tailed cutoff is 2.262. Our t, at 3.86, is far beyond it.

The decision. The p-value is 0.0039. That is well below 0.05. And 3.86 is beyond 2.262. Both checks agree. So we reject the null hypothesis.

What about the size of the rise? The ninety-five percent interval for the mean rise runs from 0.37 to 1.43 points. It sits entirely above zero. That matches the test.

For Fernway, shoppers rate the new pack about 0.9 points higher. And the interval shows the rise is probably real. The rise could be as small as 0.4, or as large as 1.4, measured in rating points. On a ten-point scale, even the low end is a gain. The high end would be a clear win.

Why Pairing Pays

Same Data, Different Conclusion

Next: why pairing pays off, and what it cannot fix. The last line of the output tries an experiment. It treats the same 20 numbers as if they came from different people. In other words, it runs the independent test from lesson 11.2, on paired data.

What happens? The independent Welch test gives t equals 1.92. And p equals 0.0709. That is not significant. Same data. Different conclusion!

Why such a big gap? The independent test hears noise from how differently shoppers rate. Leo's generous scores and Victor's tough scores land in the same buckets, and they swamp the change. The paired test cancels that noise. Each shopper is compared only with himself, or herself.

So pairing linked data usually gives a more powerful test. That means fewer Type II errors. These are the misses from lesson 11.1. A real change is less likely to slip past unnoticed.

Design Limits

Order Effects Pairing Cannot Fix

But here is the rule. The choice of test must follow the design, not the p-value. You do not get to try both, and keep the one you like. You decide by asking how the data were collected.

And pairing cannot fix everything. It cannot fix design flaws. Suppose every shopper rates the old pack first. Then an order effect is mixed in. Maybe people warm up. Maybe the second snack simply tastes better, because they are hungrier, or more relaxed. Lesson 6.5 covered designs like this.

Back at the office, Victor ran the test with ten shoppers. Grace looks over his plan. "Everyone rated old first, so some of that rise may be the order. Next time we will flip the order for half of them."

Nadia agrees, and books a second round. That is a sensible move. The first result is promising. The second round will show how much of the rise belongs to the pack, and how much belonged to the order.

Common Mistake

The Design Picks the Test

Here is a common mistake. Someone runs the independent test first. It fails. So they choose the paired test, hoping for a better p-value. That is backwards. The design decides. Same people twice means paired. Different people means independent.

A pro tip, for spreadsheets. Excel calls this the paired t-test function. Give it the old ratings, the new ratings, then a two, and a one. The two means two tails. The one means paired.

Key Takeaways

Subtract Within Each Pair

Key takeaways. For matched pairs, subtract within each pair. Then run a one-sample t-test on the differences. T equals d bar, over s d divided by the square root of n, with n minus one degrees of freedom, where n counts pairs. Pairing removes person-to-person noise. And it is usually more powerful than an independent test. But it cannot fix order effects.

Next, in lesson 12.1, you will measure how strongly two numeric variables move together, with the correlation coefficient. This lesson was made by UPI Study.

About Marketing Research at UPI Study

Marketing Research (Marketing 300) is a self-paced online course of 101 video lessons in 13 chapters, from consumer behavior, segmentation and the research process to qualitative methods, surveys and sampling, measurement, experiments, secondary and syndicated data, descriptive statistics, hypothesis tests, correlation and regression, research ethics and reports. It carries a NCCRS credit recommendation for 3 semester credits.

Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Compare: Principles of Marketing vs Marketing Research

Why take it here

Why students take Marketing Research with UPI Study

Turn customer questions into evidenceMarketing Research teaches how companies find out what customers want: defining the problem, interviews and focus groups, survey design and sampling, measurement scales, experiments, secondary and syndicated data, and data analysis from descriptive statistics to hypothesis tests, cross-tabs and regression, ending with the research report. It suits marketing and business degrees.
Credit at a fraction of the priceThe same 3 credits can cost $750 or more at a US college. Here it is one payment, self-paced, with lifetime access.
Finish your degree soonerTransfer credits reduce the courses you still owe, so you can graduate earlier or lighten a heavy semester.
Strengthen an applicationA completed college-level course on an official transcript shows admissions and scholarship committees you can do the work.
Study on your own scheduleNo start dates, no deadlines. Watch the lessons, practice, and take the final when you are ready.
130,000+students helped with college creditsACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Where the credit goes

Universities that work with NCCRS

Marketing Research carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.

FAQ

Questions students ask us

About Hypothesis Testing for Matched Pairs and Dependent Samples

What is a paired t-test?
A paired t-test checks whether the average change within matched pairs differs from zero, such as the same shoppers rating an old and a new pack. Subtract within each pair, then run a one-sample t-test on those differences: the mean difference divided by the standard deviation of the differences over the square root of the number of pairs.
What is the difference between dependent and independent samples?
Samples are dependent when each value in one group is linked to a specific value in the other, such as the same person measured twice or matched twins. They are independent when the groups contain different, unrelated people. The way the data were collected decides which applies, and so decides whether a paired or an independent-samples test is correct.
Why is a paired t-test often more powerful than an independent t-test?
Pairing usually adds power because it removes differences between people, such as generous raters versus tough critics, from the noise, leaving only the change itself. In one example of ten shoppers, the paired test gives t of about 3.86 and a p-value of 0.0039, while treating the same ratings as two independent groups gives t of 1.92 and p of 0.0709, which is not significant.
How many degrees of freedom does a paired t-test have?
It has the number of pairs minus 1, because the test runs on one difference per pair. Ten shoppers rating two packs give 10 differences and 9 degrees of freedom, not 18, and the two-tailed 0.05 cutoff is about 2.262. If the differences are badly skewed in a small sample, the Wilcoxon signed-rank test is the rank-based alternative.

About the Marketing Research course

How many college credits is Marketing Research?
Marketing Research (Marketing 300) carries a NCCRS credit recommendation for 3 semester credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
How much does Marketing Research cost and what is included?
$250, paid once, with lifetime access: all 101 video lessons, a practice quiz after each, the graded work and final exam, and an official transcript when you finish. Students who want several courses choose UPI Study PRO instead.
Which universities accept UPI Study credits?
UPI Study has signed partner agreements with universities such as Thomas Edison State University, University of the People and Charter Oak State College, and works with universities such as Penn State, SNHU and SUNY. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities. Use "Find my college" on this page to check yours.
How long does Marketing Research take?
It is self-paced with no deadlines. The 101 lessons total about 19 hours of video; most students add reading and practice time and finish in a few weeks to a few months, on their own schedule.
How are the exams done?
Quizzes and assignments are online in the course. The final exam is taken online with proctoring; a person on the UPI Study team checks assignments, usually within two days.
How do my credits reach my college?
When the course shows 100% complete, request the official transcript from your dashboard. It is sent to the college you name, and you can send it to more than one. Check your college first with "Find my college" on this page, or ask Athena.

Ready for the full course? Earn 3 credits in Marketing Research.

101 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.

Updated

Marketing Research
3 credits · NCCRS
Enroll →