1 of 37

Jill VanderStoep�Hope College – Holland, MI�

EAPOST Workshop: Comparing Two Means

2 of 37

Overview

  • Information on our curriculum
  • How I run my class
  • Comparing Two Means: Simulation-Based Approach Exploration
  • Questions

3 of 37

Information on our Curriculum

  • Created to follow GAISE
  • Begins with 4 pillars of inference:
    • Significance
    • Estimation
    • Generalization
    • Causation
  • Features a spiral approach using the 6 steps of statistical investigation
  • Utilizes simulation to actively understand the investigation process

4 of 37

Information on our Curriculum

  • The 6 steps of statistical investigation
    1. Ask a research question
    2. Design a study and collect data
    3. Explore the data
    4. Draw inferences beyond the data (Logic of inference: Significance and estimation)
    5. Formulate conclusions (Scope of inference: Generalization and causation)
    6. Look back and ahead

5 of 37

How I Run my Class

  • 15 weeks instruction/1 week final exams
  • First 5 weeks, cover the 4 pillars: significance, estimation, generalization, causation.
  • Second 5 weeks, explore inference comparing two groups (including matched pairs)
  • Third 5 weeks, explore inference comparing multiple groups as well as regression

6 of 37

How I Run my Class

  • Students read or watch videos on the upcoming class content through an example.
  • They take a reading/video quiz before class on that content
  • Ideally they start the HW
  • In class we recap the content from the example
  • In class we go through an exploration of a different content
  • After class they complete HW

7 of 37

How I Run my Class

  • Comparing two means is typically week 8

8 of 37

Comparing Two Means: Simulation-Based Approach Exploration

9 of 37

Dung Beetles

10 of 37

Dung Beetles

  • Some species of dung beetles, known as “rollers,” find a pile of dung (that will be used as a food source) which they form into a ball, and then immediately roll away from the source in order to prevent other beetles from stealing it.
  • The goal is for the beetles to move the ball away as fast as possible.
  • The nocturnal African dung beetle uses the moon to help move along straighter (quicker) paths.
  • But what if the moon isn’t out, do the beetles navigate by the stars?

11 of 37

Dung Beetles

  • In “Dung Beetles Use the Milky Way for Orientation,” Current Biology, 2013), researchers report on several experiments they conducted to document whether these dung beetles use stars to navigate.
  • STEP 1: Ask a research question
  • On a dark night (no moon) are dung beetles able to navigate using stars?
  • Let’s take a closer look at their study

12 of 37

Dung Beetles

  • STEP 2: Design a study and collect data
  • 18 nocturnal African dung beetles were placed on top of a dung ball at the center of a circular wooden platform (10 cm in diameter)
  • The researchers timed how many seconds it took each beetle to reach the edge of the platform during a clear and moonless night.
  • Some of the beetles were given a small, black cardboard “cap” which obscured their view of the sky but not of the edge of the platform
  • Others were given a clear transparent cap.

13 of 37

Dung Beetles

  • The researchers do not explicitly state that this was a randomized experiment, but because there is no reason to suspect that the beetles who received the clear cap were in any way systematically different from those who received the black cap.
  • Why did the control group of beetles wear clear caps?
  • So that each beetle would experience the same conditions, in this case the wearing of a cap.

14 of 37

Dung Beetles

  • What are the experimental units?
  • The experimental units are the 18 dung beetles.
  • What is the explanatory variable?
  • The explanatory variable is the type of cap (clear or black) and it is categorical.
  • What is the response variable?
  • The response variable is the number of seconds it took the beetle to roll the dung ball off the platform (quantitative).

15 of 37

Dung Beetles

  • A Sources of Variation Diagram helps us think about the study in terms of the variation we expect to see in the different beetle’s rolling times. Fill in the diagram below with what you already know about the study including discussion of any “controls” used in the study to minimize unexplained variation.

Observed Variation in:

Sources of explained variation

Sources of unexplained variation

 Rolling time to edge of platform (seconds)

  •  
  •  

Inclusion criteria

Nocturnal African beetles 

Design

10 cm diameter platform

 

Cap type

Age

Unknown

Sex

.

.

16 of 37

Hypotheses

  • State the null and alternative hypotheses
    • Null hypothesis: The long run mean time for the black-capped beetles to roll the dung ball to the edge of the platform is the same as the long run mean time for the clear-capped beetles
    • Alternative hypothesis: The long run mean time for the black-capped beetles to roll the dung ball to the edge of the platform is higher than the long run mean time for the clear-capped beetles

17 of 37

Parameters

  • We can also use symbols for unknown parameters we are trying to estimate.
  • The parameters of interest are: 
    • µblack = the long-run mean time for the beetles with black caps to roll the dung ball off the platform
    • µclear = the long-run mean time for the beetles with the clear caps to roll the dung ball off the platform

18 of 37

Hypotheses

  • Mu (µ) is the parameter for population mean time and the subscripts tell us the group.
  • Using these symbols we can rewrite the hypotheses as follows: 

H0: µblack = µclearblack – µclear = 0)

Ha: µblack > µclearblack – µclear > 0)

19 of 37

Hypotheses

Remember

  • The hypotheses are about the association between type of cap used and time to roll the dung ball to the edge in the long run, not just for these 18 beetles.
  • Hypotheses are always about populations or processes, not the sample data.

20 of 37

Step 3: Explore the data

Cap type

Sample size

Mean

SD

Min.

First Quart.

Med.

Third Quart.

Max.

Black

9

126.55

22.19

84.18

113.54

123.61

145.99

156.99

Clear

9

42.78

15.52

16.17

35.53

38.46

53.82

70.70

21 of 37

Results

  • The sample mean was larger 83.77 seconds for those wearing black caps (so were the min, max, quartiles, SD).
  • What are two possible explanations for why we observed the two groups to have different sample mean number of seconds?
  • #1 The beetles really are using the stars to navigate and that is why it took less time for the clear cap beetles to reach the edge of the platform.
  • #2 By random chance through the random assignment beetles with better navigational skills were assigned to the clear cap group.

22 of 37

Step 4: Draw inferences beyond the data

  • Is it possible to get a difference of 83.77 seconds if the time isn’t affected by the cap?
  • Yes, it’s possible, how likely though?
  • A p-value will tell how likely it is to get a difference so big.
  • Let’s use our 3S strategy

23 of 37

Statistic

  •  

24 of 37

Simulation

  • We can simulate this study with cards.
    • Write all 18 times on 18 cards.
  • Shuffle all 18 cards and randomly redistribute into two stacks:
    • One with 9 cards (representing the times that could have happened for the black-capped beetles)
    • Another 9 cards (representing the times that could have happened for the clear-capped beetles)

25 of 37

Simulation

  • Shuffling assumes the null hypothesis of no association between cap type and time it takes the to roll the dung ball off the platform
  • After shuffling we calculate the difference in the mean times between the two stacks of cards.
  • Repeat this many times to develop a null distribution
  • Let’s see what this looks like

26 of 37

Black Cap Clear Cap

mean = 42.78 sec

mean = 126.55 sec

139.77

156.99

131.54

34.2

114.29

152.21

123.61

112.78

84.18

43.77

123.56

37.23

16.17

49.5

58.13

70.7

36.86

38.46

mean =74.33 sec

mean = 94.99 sec

74.33 – 94.99 = -20.66 sec

Shuffled Differences in Means

27 of 37

Black Cap Clear Cap

139.77

156.99

131.54

34.2

114.29

152.21

123.61

112.78

84.18

43.77

123.56

37.23

16.17

49.5

58.13

70.7

36.86

38.46

mean =97.38 sec

mean = 71.95 sec

97.38 – 71.95 = 25.42 sec

Shuffled Differences in Means

28 of 37

Black Cap Clear Cap

139.77

156.99

131.54

34.2

114.29

152.21

123.61

112.78

84.18

43.77

123.56

37.23

16.17

49.5

58.13

70.7

36.86

38.46

mean =84.48 sec

mean = 84.85 sec

84.48 – 84.45 = -0.37 sec

Shuffled Differences in Means

29 of 37

More Simulations

20.1

-18.6

-5.6

-15.2

30.0

0.5

4.6

-2.3

-2.0

-4.7

.6.9

-6.7

-10.2

-6.7

-1.2

-9.9

5.6

-1.9

12.9

1.6

1.3

4.3

2.0

10.0

0.2

3.3

6.9

Out of 30 simulated statistics, there aren’t any that are as large or larger than our observed difference in means of 83.77, hence our p-value for this null distribution is 0/30 = 0.

Shuffled Differences in Means

30 of 37

Multiple means applet

  • Let’s see how this process is done with the Multiple Means applet.
  • We will use the Dung Beetles data in the pull down menu for data.

31 of 37

P-value

  • We should have obtained a null distribution like the one shown.
  • We can see that our observed statistic of 83.77 sec (or larger) didn’t even occur once in 1,000 shuffles.
  • Therefore, our p-value is less than 1/1,000 or approximately 0.

32 of 37

P-value

  • What does this p-value mean?
  • Assuming that the underlying long-run mean rolling times for the two cap types are the same, if we were to repeat the random assignment of the black cap to 9 beetles and the clear cap to 9 other beetles, we would find the sample mean rolling times to differ by 83.77 seconds or even more in about 0 of the re-randomizations.
  • Therefore, we have very strong evidence that when the beetles wear black caps, it will take them longer on average to push dung balls to the edge of the platform

33 of 37

Confidence Interval

  •  

34 of 37

Step 5: Formulate �Conclusions

Was the sample randomly selected from a larger population?

  • No, the sample was not randomly sampled from a population of nocturnal African dung beetles thus we need to generalize with caution. However, there is little reason to think that these 18 beetles are all that different from other nocturnal African beetles. So we can generalize to all nocturnal African beetles.

Were the observational units randomly assigned to treatments?

  • Yes, the observational units were presumably randomly assigned to the treatments. Therefore, because the p-value was small we can make a cause effect conclusion (namely, that the black cap is causing the increase in the rolling times).

35 of 37

Conclusions

  • While we have strong evidence that there is a difference, is the difference in these times impressive?
  • The difference of 83.77 seconds is not only statistically significant, but it represents the beetles rolling nearly three times more quickly when wearing the clear cap as compared to the black cap (126.55 vs. 42.78 seconds).
  • It does seem that not only do these kinds of beetles use the stars for navigation, but it also seems to greatly help speed them along.

36 of 37

Step 6: Look back and �ahead

  • Looking back: Did anything about the design and conclusions of this study concern you? In particular, are there things that could have been done to give a better chance finding strong evidence of a true difference between the two groups?
    • Always nice to have a larger sample size. A random sample. Researchers should try to replicate their results. Could brainstorm other ways besides affixing caps to the beetles to occlude their upper eyes.
  • Looking ahead: What should the researchers’ next steps be to fix the limitations or build on this knowledge?
    • See if these results hold with other nocturnal beetles in other regions of the world. Extend study from beetles to see if other nocturnal animals use the stars to navigate.

37 of 37

Questions

  • Recording will be sent out by Allan as well as posted on our Website for EAPOST
  • Please join our slack channel if you haven’t already. This is a place where we build community through sharing of resources and discussions
  • Please come back next week Friday to hear Soma Roy talk about regression, and the following Friday to hear Beth Chance talk about how she introduces probability.
  • THANK YOU!