![Page 1: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/1.jpg)
Building Conceptual Understanding of Statistical
Inference with Lock5
Dr. Kari Lock MorganDepartment of Statistical Science
Duke University
Wake ForestNovember, 2013
![Page 2: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/2.jpg)
The Lock5 Team
DennisIowa State
KariHarvard/Duke
EricUNC/Duke
Robin & PattiSt. Lawrence
![Page 3: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/3.jpg)
Advantages of Lock5
1. All examples and exercises based on real data – chosen to be interesting to students (and instructors!)
Just open to any exercise set!
2. Lots of resources to help instructors (all created by us, the Locks)
![Page 4: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/4.jpg)
Instructor ResourcesInstructor’s manual including sample syllabi, teaching tips, and recommended class examples, activities, and assignments for each section
Powerpoint slides (with or without clicker questions)
Videos to instructors for each chapter and section
Handouts for class activities and examples
Full instructor solutions manual
![Page 5: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/5.jpg)
Big Advantages of Lock5
1. All examples and exercises based on real data – chosen to be interesting to students (and instructors!)
2. Lots of resources to help instructors (all created by us, the Locks)
3. Use of simulation methods (bootstrap intervals and randomization tests) to introduce inference
![Page 6: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/6.jpg)
New Simulation Methods
“The Next Big Thing”
United States Conference on Teaching Statistics, May 2011
Common Core State Standards in Mathematics
Increasingly used in the disciplines
![Page 7: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/7.jpg)
New Simulation Methods
Increasingly important in DOING statistics
Outstanding for use in TEACHING statistics
Help students understand the key ideas of statistical inference
![Page 8: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/8.jpg)
“New” Simulation Methods?
"Actually, the statistician does not carry out this very simple and very tedious process, but his conclusions have no justification beyond the fact that they agree with those which could have been arrived at by thiselementary method."
-- Sir R. A. Fisher, 1936
![Page 9: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/9.jpg)
Bootstrap Confidence Intervals
and
Randomization Hypothesis Tests
![Page 10: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/10.jpg)
First: Bootstrap Confidence Intervals
![Page 11: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/11.jpg)
Example 1: What is the average price of a used Mustang car?
Select a random sample of n=25 Mustangs from a website (autotrader.com) and record the price (in $1,000’s) for each car.
![Page 12: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/12.jpg)
Sample of Mustangs:
Our best estimate for the average price of used Mustangs is $15,980, but how accurate is that estimate?
Price0 5 10 15 20 25 30 35 40 45
MustangPrice Dot Plot
![Page 13: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/13.jpg)
Our best estimate for the average price of used Mustangs is $15,980, but how accurate is that estimate?
We would like some kind of margin of error or a confidence interval.
Key concept: How much can we expect the sample means to vary just by random chance?
![Page 14: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/14.jpg)
Traditional Inference2. Which formula?
3. Calculate summary stats
6. Plug and chug
4. Find t* 5. df?
df=251=24 t*=2.064
15.98±2 .064 ∙ 11.11√2515.98±4.59=(11.39 ,20.57)
7. Interpret in context
CI for a mean
1. Check conditions
Price0 5 10 15 20 25 30 35 40 45
MustangPrice Dot Plot
![Page 15: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/15.jpg)
“We are 95% confident that the mean price of all used Mustang cars is between $11,390 and $20,570.”
Answer is good, but the process is not very helpful at building understanding.
Our students are often great visual learners but get nervous about formulas and algebra. Can we find a way to use their visual intuition?
![Page 16: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/16.jpg)
Bootstrapping
Brad Efron Stanford University
Key Idea: Assume the “population” is many, many copies of the original sample.
“Let your data be your guide.”
![Page 17: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/17.jpg)
Suppose we have a random sample of 6 people:
![Page 18: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/18.jpg)
Original Sample
A simulated “population” to sample from
![Page 19: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/19.jpg)
Bootstrap Sample: Sample with replacement from the original sample, using the same sample size.
Original Sample Bootstrap Sample
![Page 20: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/20.jpg)
Original Sample Bootstrap Sample
![Page 21: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/21.jpg)
Original Sample
BootstrapSample
BootstrapSample
BootstrapSample
●●●
Bootstrap Statistic
Sample Statistic
Bootstrap Statistic
Bootstrap Statistic
●●●
Bootstrap Distribution
![Page 22: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/22.jpg)
We need technology!
StatKeywww.lock5stat.com
(Free, easy-to-use, works on all platforms)
![Page 23: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/23.jpg)
StatKey
Standard Error
95% CI: statistic ± 2SE = 15.98 ± 2(2.178) = (11.624, 20.336)
![Page 24: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/24.jpg)
Using the Bootstrap Distribution to Get a Confidence Interval
Keep 95% in middle
Chop 2.5% in each tail
Chop 2.5% in each tail
We are 95% sure that the mean price for Mustangs is between $11,930 and $20,238
![Page 25: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/25.jpg)
BootstrappingKey ideas: • Sample with replacement from the original
sample using the same sample size. • Compute the sample statistic.• Collect lots of such bootstrap statistics.• Use the distribution of bootstrap statistics to
assess the sampling variability of the statistic.
Why does this work?
![Page 26: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/26.jpg)
Sampling Distribution
Population
µ
BUT, in practice we don’t see the “tree” or all of the “seeds” – we only have ONE seed
![Page 27: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/27.jpg)
Bootstrap Distribution
Bootstrap“Population”
What can we do with just one seed?
Grow a NEW tree!
µ
Estimate the variability (SE) from the bootstrap statistics
![Page 28: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/28.jpg)
Example 2: What yes/no question do you want to ask the sample of people in this audience?
Raise your hand if your answer to the question is YES.
Example #2 : Find a 90% confidence interval for the proportion who answer “yes” to this question.
![Page 29: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/29.jpg)
Example 3: Diet Cola and Calcium What is the difference in mean amount of calcium excreted between people who drink diet cola and people who drink water?Find a 95% confidence interval for the difference in means.
![Page 30: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/30.jpg)
What About Hypothesis Tests?
![Page 31: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/31.jpg)
P-value: The probability of seeing results as extreme as, or more extreme than, the sample results, if the null hypothesis is true.
Say what????
![Page 32: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/32.jpg)
Example 1: Beer and Mosquitoes
Does consuming beer attract mosquitoes? Experiment: 25 volunteers drank a liter of beer,18 volunteers drank a liter of waterRandomly assigned!Mosquitoes were caught in traps as they approached the volunteers.1
1 Lefvre, T., et. al., “Beer Consumption Increases Human Attractiveness to Malaria Mosquitoes, ” PLoS ONE, 2010; 5(3): e9546.
![Page 33: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/33.jpg)
Beer and Mosquitoes
Beer mean = 23.6
Water mean = 19.22
Does drinking beer actually attract mosquitoes, or is the difference just due to random chance?
Beer mean – Water mean = 4.38
Number of Mosquitoes Beer Water 27 21 20 22 21 15 26 12 27 21 31 16 24 19 19 15 23 24 24 19 28 23 19 13 24 22 29 20 20 24 17 18 31 20 20 22 25 28 21 27 21 18 20
![Page 34: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/34.jpg)
Traditional Inference2. Which formula?
3. Calculate numbers and plug into formula
4. Plug into calculator
5. Which theoretical distribution?
6. df?
7. find p-value
0.0005 < p-value < 0.001
187.3
251.4
22.196.2322
68.3
1. Check conditions
![Page 35: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/35.jpg)
Simulation Approach
Beer mean = 23.6
Water mean = 19.22
Does drinking beer actually attract mosquitoes, or is the difference just due to random chance?
Beer mean – Water mean = 4.38
Number of Mosquitoes Beer Water 27 21 20 22 21 15 26 12 27 21 31 16 24 19 19 15 23 24 24 19 28 23 19 13 24 22 29 20 20 24 17 18 31 20 20 22 25 28 21 27 21 18 20
![Page 36: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/36.jpg)
Simulation ApproachNumber of Mosquitoes Beer Water 27 21 20 22 21 15 26 12 27 21 31 16 24 19 19 15 23 24 24 19 28 23 19 13 24 22 29 20 20 24 17 18 31 20 20 22 25 28 21 27 21 18 20
Find out how extreme these results would be, if there were no difference between beer and water.
What kinds of results would we see, just by random chance?
![Page 37: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/37.jpg)
Simulation ApproachNumber of Mosquitoes Beer Water 27 21 20 22 21 15 26 12 27 21 31 16 24 19 19 15 23 24 24 19 28 23 19 13 24 22 29 20 20 24 17 18 31 20 20 22 25 28 21 27 21 18 20
Find out how extreme these results would be, if there were no difference between beer and water.
What kinds of results would we see, just by random chance?
Number of Mosquitoes Beverage 27 21 20 22 21 15 26 12 27 21 31 16 24 19 19 15 23 24 24 19 28 23 19 13 24 22 29 20 20 24 17 18 31 20 20 22 25 28 21 27 21 18 20
![Page 38: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/38.jpg)
Simulation ApproachBeer Water
Find out how extreme these results would be, if there were no difference between beer and water.
What kinds of results would we see, just by random chance?
Number of Mosquitoes Beverage 20 22 21 15 26 12 27 21 31 16 24 19 19 15 23 24 24 19 28 23 19 13 24 22 29 20 20 24 17 18 31 20 20 22 25 28 21 27 21 18 20
27 212127241923243113182425211812191828221927202322
2026311923152212242920272917252028
![Page 40: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/40.jpg)
Traditional Inference
1 22 21 2
1 2
s sn n
X X
1. Which formula?
2. Calculate numbers and plug into formula
3. Plug into calculator
4. Which theoretical distribution?
5. df?
6. find p-value
0.0005 < p-value < 0.001
187.3
251.4
22.196.2322
68.3
![Page 41: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/41.jpg)
Beer and MosquitoesThe Conclusion!
The results seen in the experiment are very unlikely to happen just by random chance (just 1 out of 1000!)
We have strong evidence that drinking beer does attract mosquitoes!
![Page 42: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/42.jpg)
“Randomization” Samples
Key idea: Generate samples that are(a) based on the original sample AND(b) consistent with some null hypothesis.
![Page 43: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/43.jpg)
Example 2: Malevolent Uniforms
Do sports teams with more “malevolent” uniforms get penalized more often?
![Page 44: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/44.jpg)
Example 2: Malevolent Uniforms
Sample Correlation = 0.43
Do teams with more malevolent uniforms commit more penalties, or is the relationship just due to random chance?
![Page 45: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/45.jpg)
Simulation Approach
Find out how extreme this correlation would be, if there is no relationship between uniform malevolence and penalties.
What kinds of results would we see, just by random chance?
Sample Correlation = 0.43
![Page 46: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/46.jpg)
Randomization by ScramblingOriginal sample
MalevolentUniformsNFLNFLTeam NFL_Ma... ZPenYds <new>
1234567891011121314151617181920212223
LA Raiders 5.1 1.19
Pittsburgh 5 0.48
Cincinnati 4.97 0.27
New Orl... 4.83 0.1
Chicago 4.68 0.29
Kansas ... 4.58 -0.19
Washing... 4.4 -0.07
St. Louis 4.27 -0.01
NY Jets 4.12 0.01
LA Rams 4.1 -0.09
Cleveland 4.05 0.44
San Diego 4.05 0.27
Green Bay 4 -0.73
Philadel... 3.97 -0.49
Minnesota 3.9 -0.81
Atlanta 3.87 0.3
Indianap... 3.83 -0.19
San Fra... 3.83 0.09
Seattle 3.82 0.02
Denver 3.8 0.24
Tampa B... 3.77 -0.41
New Eng... 3.6 -0.18
Buffalo 3.53 0.63
Scrambled MalevolentUniformsNFLNFLTeam NFL_Ma... ZPenYds <new>
1234567891011121314151617181920212223
LA Raiders 5.1 0.44
Pittsburgh 5 -0.81
Cincinnati 4.97 0.38
New Orl... 4.83 0.1
Chicago 4.68 0.63
Kansas ... 4.58 0.3
Washing... 4.4 -0.41
St. Louis 4.27 -1.6
NY Jets 4.12 -0.07
LA Rams 4.1 -0.18
Cleveland 4.05 0.01
San Diego 4.05 1.19
Green Bay 4 -0.19
Philadel... 3.97 0.27
Minnesota 3.9 -0.01
Atlanta 3.87 0.02
Indianap... 3.83 0.23
San Fra... 3.83 0.04
Seattle 3.82 -0.09
Denver 3.8 -0.49
Tampa B... 3.77 -0.19
New Eng... 3.6 -0.73
Buffalo 3.53 0.09
Scrambled sample
![Page 48: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/48.jpg)
Malevolent UniformsThe Conclusion!
The results seen in the study are unlikely to happen just by random chance (just about 1 out of 100).
We have some evidence that teams with more malevolent uniforms get more penalties.
![Page 49: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/49.jpg)
P-value: The probability of seeing results as extreme as, or more extreme than, the sample results, if the null hypothesis is true.
Yeah – that makes sense!
![Page 50: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/50.jpg)
Example 3: Light at Night and Weight Gain
Does leaving a light on at night affect weight gain? In particular, do mice with a light on at night gain more weight than mice with a normal light/dark cycle?Find the p-value and use it to make a conclusion.
![Page 51: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/51.jpg)
Simulation Methods• These randomization-based methods tie directly to the key ideas of statistical inference.
• They are ideal for building conceptual understanding of the key ideas.
• Not only are these methods great for teaching statistics, but they are increasingly being used for doing statistics.
![Page 52: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/52.jpg)
How does everything fit together?• We use these methods to build understanding of the key ideas.
• We then cover traditional normal and t-tests as “short-cut formulas”.
• Students continue to see all the standard methods but with a deeper understanding of the meaning.
![Page 53: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/53.jpg)
It is the way of the past…
"Actually, the statistician does not carry out this very simple and very tedious process, but his conclusions have no justification beyond the fact that they agree with those which could have been arrived at by this elementary method."
-- Sir R. A. Fisher, 1936
![Page 54: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/54.jpg)
… and the way of the future“... the consensus curriculum is still an unwitting prisoner of history. What we teach is largely the technical machinery of numerical approximations based on the normal distribution and its many subsidiary cogs. This machinery was once necessary, because the conceptually simpler alternative based on permutations was computationally beyond our reach. Before computers statisticians had no choice. These days we have no excuse. Randomization-based inference makes a direct connection between data production and the logic of inference that deserves to be at the core of every introductory course.”
-- Professor George Cobb, 2007
![Page 55: Building Conceptual Understanding of Statistical Inference with Lock 5](https://reader036.vdocument.in/reader036/viewer/2022070421/56816043550346895dcf64d3/html5/thumbnails/55.jpg)
Thanks for listening!
www.lock5stat.com