C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means...

26
CHAPTER 8 Matched Pairs

Transcript of C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means...

Page 1: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

CHAPTER 8Matched Pairs

Page 2: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

INTRODUCTION

In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample had no relationship (or were independent from) to any measures from the other sample.

Suppose we wanted to see if people lose weight on a new diet. We have pre-weights and post-weights. Are any measures from one of these samples related to a measure from the other?

Page 3: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

PAIRED VS. UNPAIRED DATA (1) Unpaired data: How much warmer are

females than males, on average? Independent samples (No reason to

match up a specific female temperature with a specific male temperature.)

Paired data: How much faster do people’s hearts beat before and after doing 30 jumping jacks? Dependent samples (We will look at the

differences in peoples heart rates before and after exercising.)

Page 4: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

PAIRED VS. UNPAIRED DATA (2)

For unpaired data: Use the two sample t-test. We cannot use a paired samples test. It

would make no sense to pair data arbitrarily.

When we are able to pair up data, we take quite a bit of variability out of the picture.

Think of pre-weight and post-weight. The variability in people’s initial weights is removed.

Page 5: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

MANY NAMES FOR THE SAME THING

All of these mean the same:Paired DataDependent SamplesMatched Pairs

Page 6: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

COMPARING PAIRED SAMPLES

In Section 8.1 we will use simulation-based techniques. We used coin flipping and an applet to

conduct the simulations. In Section 8.2 we will use theory-based

techniques. We will use Fathom to examine the data

and determine the p-value.

Page 7: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXAMPLE 8.1: SWIMMING IN SYRUP?

Page 8: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXAMPLE 8.1: SWIMMING IN SYRUP?

Researches thought that swimming in something thicker than water would be slower because of added resistance.

However, the swimmers should be able to generate more force with each stroke thus adding to their speed.

Null: The average swimming speed in water and guar do not differ.

Alternative: The average swimming speed in water and guar do differ.

Page 9: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXAMPLE 8.1: SWIMMING IN SYRUP?

Swimmer ID 1 2 3 4 5Speed in guar (cm/s)

99.4 98.8 123.9 122.5 129.5

Speed in water (cm/s)

91.5 103.5

118.5 125.0 127.0

Results With five swimmers being tested,

The average speed in guar was 114.82 cm/sec

The average speed in water was 113.10 cm/sec

Page 10: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXAMPLE 8.1: SWIMMING IN SYRUP?

Swimmer ID 1 2 3 4 5

Speed in guar (cm/s)

99.4 98.8 123.9

122.5

129.5

Speed in water (cm/s)

91.5 103.5

118.5

125.0

127.0

Diff in speed = guar - water

7.9 -4.7 5.4 -2.5 2.5

Since these are dependent samples, we need to pair the data and find the differences and use these as our data set.

The average difference in speed (guar – water) is 1.72 cm/sec

Page 11: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXAMPLE 8.1: SWIMMING IN SYRUP?

Let’s revisit our hypotheses and focus on the mean difference.

Null: The average swimming speed in water and guar do not differ.The mean difference is zero.

Alternative: The average swimming speed in water and guar do differ.The mean difference is not zero.

Remember our sample mean difference is 1.72 cm/sec

Page 12: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXAMPLE 8.1: SWIMMING IN SYRUP?

Is it possible to see such a difference in swimming speeds due to chance alone, even if swimming speeds in guar and water are the same, on average?

Is it unlikely? The null hypothesis basically says the

medium in which they are swimming doesn’t matter. How can we model this?

Page 13: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXAMPLE 8.1: SWIMMING IN SYRUP?

If swimming in guar or water does not matter than we can randomly choose swimmers (by flipping a coin) and switch their times.

I did this once and got a mean difference of 1.44

Swimmer ID 1 2 3 4 5Speed in guar (cm/s)

91.5 103.5

123.9

125.0

129.5

Speed in water (cm/s)

99.4 98.8 118.5

122.5

127.0

Diff in speed = guar - water

-7.9 4.7 5.4 2.5 2.5

H = switch H H T H T

Page 14: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXAMPLE 8.1: SWIMMING IN SYRUP?

I will repeat the process many, many times and create a null distribution with my simulated mean differences. (Notice the center)

Page 15: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXAMPLE 8.1: SWIMMING IN SYRUP?

Our original mean difference was 1.72, so I need to count the number of mean differences above 1.72 and below -1.72 (remember this is a two-sided test).

In doing so, I get a p-value of 0.528

Page 16: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXAMPLE 8.1: SWIMMING IN SYRUP?

So what’s our conclusion? We cannot conclude the average swimming

speed in guar and water differ. Our sample showed that swimming in guar

was faster, but the results aren’t significant. It is tough to show significance with a sample of just five. It would be nice to have a larger data set.

Page 17: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXPLORATION 8.2: DOES STANDING RAISE YOUR HEART RATE?

Page 18: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

SECTION 8.2: THEORY-BASED APPROACH TO ANALYZING DATA FROM PAIRED SAMPLES

In the last section, our null distributions were centered at zero. Why?

The heart rate null distribution was fairly normal shaped.

The swimming in syrup one was not. (The sample size was very small.)

Page 19: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXAMPLE 8.2: HOW MANY M&MS WOULD YOU LIKE?

Does bowl or plate size effect how much you eat? To test this, researchers randomly assigned either

a small bowl or a large bowl to student subjects. They were told to take as many M&Ms as they

wanted to eat for the day. The number of M&Ms they took were counted. During the next session, bowl sizes were

switched. (Those that had large bowls now received small bowls and vice versa.)

The number of M&M’s they took were again counted.

Why are these samples dependent?

Page 20: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXAMPLE 8.2: HOW MANY M&MS WOULD YOU LIKE?

Null hypothesis: There is no association between bowl size and how much we eat, as measured by number of M&Ms taken.The mean difference is zero.

Alternative hypothesis: There is an association between bowl size and how much we eat, as measured by number of M&Ms taken.The mean difference is not zero.

Page 21: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXAMPLE 8.2: HOW MANY M&MS WOULD YOU LIKE?

Bowl size

M&Ms count

Small 33 24 35 24 40 33 88 36 65 38 28 50 26 34 51 25 26

Large 41 92 61 19 21 35 42 50 11 104 97 36 43 62 33 62 32

Results

Page 22: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXAMPLE 8.2: HOW MANY M&MS WOULD YOU LIKE?

Bowl size Sample size Sample average

Small 17 38.59Large 17 49.47Difference = Small - Large

17 -10.88

Page 23: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXAMPLE 8.2: HOW MANY M&MS WOULD YOU LIKE?

Null distribution assuming bowl makes no difference.

Page 24: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXAMPLE 8.2: HOW MANY M&MS WOULD YOU LIKE?

We got a p-value of 0.252, so we cannot conclude that bowl size has an effect on how many M&Ms are taken.

Page 25: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXAMPLE 8.2: HOW MANY M&MS WOULD YOU LIKE?

Our null distribution appeared fairly normal so it would seem that a theory-based test would work.

For small sample sizes (less than 20) we should not have highly skewed data or large outliers.

Our results aren’t the greatest, but should be okay.

Let’s run a theory-based test (as well as find a confidence interval) for this in Fathom.

Page 26: C HAPTER 8 Matched Pairs. I NTRODUCTION In the last two chapter, we looked at comparing two means taken from independent samples. Measures from one sample.

EXPLORATION 8.2: BUYING BESTSELLERS FOR BETTER PRICES