Unit 4: Inference for numerical data 2. ANOVA GOVT 3990 - Spring 2020 Cornell University Dr. Garcia-Rios Slides posted at http://garciarios.github.io/govt_3990/
Outline 1. Housekeeping 2. Main ideas 1. Comparing many means requires care difgerent groups 3. ANOVA compares between group variation to within group variation 4. To identify which means are difgerent, use t-tests and the Bonferroni correction 3. Summary 2. ANOVA tests for some difgerence in means of many
Announcements 1 ◮ Slack ◮ Class zoom link
Outline 1. Housekeeping 2. Main ideas 1. Comparing many means requires care difgerent groups 3. ANOVA compares between group variation to within group variation 4. To identify which means are difgerent, use t-tests and the Bonferroni correction 3. Summary 2. ANOVA tests for some difgerence in means of many
Outline 1. Housekeeping 2. Main ideas 1. Comparing many means requires care 2. ANOVA tests for some difgerence in means of many difgerent groups 3. ANOVA compares between group variation to within group variation 4. To identify which means are difgerent, use t-tests and the Bonferroni correction 3. Summary
NEWS FLASH! jelly beans 0 placebo jelly beans H A 0 placebo H 0 Jelly beans rumored to cause acne!!! Use an independent samples t-test: What statistical test would you use? How would you conduct your study? What would your research question be? assign an “acne score” to patients on a 0-100 scale. How would you check this rumor? Imagine that doctors can 2
NEWS FLASH! jelly beans 0 placebo jelly beans H A 0 placebo H 0 Jelly beans rumored to cause acne!!! Use an independent samples t-test: What statistical test would you use? How would you conduct your study? What would your research question be? assign an “acne score” to patients on a 0-100 scale. How would you check this rumor? Imagine that doctors can 2
NEWS FLASH! jelly beans 0 placebo jelly beans H A 0 placebo H 0 Jelly beans rumored to cause acne!!! Use an independent samples t-test: assign an “acne score” to patients on a 0-100 scale. How would you check this rumor? Imagine that doctors can 2 ◮ What would your research question be? ◮ How would you conduct your study? ◮ What statistical test would you use?
NEWS FLASH! Jelly beans rumored to cause acne!!! How would you check this rumor? Imagine that doctors can assign an “acne score” to patients on a 0-100 scale. Use an independent samples t-test: 2 ◮ What would your research question be? ◮ How would you conduct your study? ◮ What statistical test would you use? H 0 : µ jelly beans − µ placebo = 0 H A : µ jelly beans − µ placebo ̸ = 0
Your turn 1 error and rejecting a null hypothesis like when it is actually true? (a) 1% (b) 5% (c) 36% (d) 64% (e) 95% 3 Suppose α = 0 . 05 . What is the probability of making a Type H 0 : µ purple jelly bean − µ placebo = 0
Your turn 1 error and rejecting a null hypothesis like when it is actually true? (a) 1% (b) 5% (c) 36% (d) 64% (e) 95% 3 Suppose α = 0 . 05 . What is the probability of making a Type H 0 : µ purple jelly bean − µ placebo = 0
0 05 20 Your turn (b) 5% (e) 95% 1 1 (d) 64% (c) 36% (a) 1% Suppose we want to test 20 difgerent colors of jelly beans versus a making at least one Type 1 error in these 20 independent tests? placebo with hypotheses like 4 H 0 : µ purple jelly bean − µ placebo = 0 H 0 : µ brown jelly bean − µ placebo = 0 H 0 : µ peach jelly bean − µ placebo = 0 ... and we use α = 0 . 05 for each of these tests. What is the probability of
Your turn Suppose we want to test 20 difgerent colors of jelly beans versus a placebo with hypotheses like making at least one Type 1 error in these 20 independent tests? (a) 1% (b) 5% (c) 36% (e) 95% 4 H 0 : µ purple jelly bean − µ placebo = 0 H 0 : µ brown jelly bean − µ placebo = 0 H 0 : µ peach jelly bean − µ placebo = 0 ... and we use α = 0 . 05 for each of these tests. What is the probability of (d) 64% → 1 − ( 1 − 0 . 05 ) 20
Outline 1. Housekeeping 2. Main ideas 1. Comparing many means requires care 2. ANOVA tests for some difgerence in means of many difgerent groups 3. ANOVA compares between group variation to within group variation 4. To identify which means are difgerent, use t-tests and the Bonferroni correction 3. Summary
ANOVA tests for some difgerence in means of many difgerent groups Null hypothesis: Your turn Which of the following is a correct statement of the alternative hypothesis? (a) For any two groups, including the placebo group, no two group means are the same. (b) For any two groups, not including the placebo group, no two group means are the same. (c) Among the jelly bean groups, there are at least two groups that have difgerent group means from each other. (d) Amongst all groups, there are at least two groups that have difgerent group means from each other. 5 H 0 : µ placebo = µ purple = µ brown = . . . = µ peach = µ orange .
ANOVA tests for some difgerence in means of many difgerent groups Null hypothesis: Your turn Which of the following is a correct statement of the alternative hypothesis? (a) For any two groups, including the placebo group, no two group means are the same. (b) For any two groups, not including the placebo group, no two group means are the same. (c) Among the jelly bean groups, there are at least two groups that have difgerent group means from each other. (d) Amongst all groups, there are at least two groups that have difgerent group means from each other. 5 H 0 : µ placebo = µ purple = µ brown = . . . = µ peach = µ orange .
Outline 1. Housekeeping 2. Main ideas 1. Comparing many means requires care 2. ANOVA tests for some difgerence in means of many difgerent groups 3. ANOVA compares between group variation to within group variation 4. To identify which means are difgerent, use t-tests and the Bonferroni correction 3. Summary
ANOVA compares between group variation to within group variation 6 ∑ | 2 / ∑ | 2
Relatively large WITHIN group variation: little apparent difgerence 7 ∑ | 2 / ∑ | 2
Relatively large BETWEEN group variation: there may be a difger- ence 8 ∑ | 2 / ∑ | 2
For historical reasons, we use a modifjcation of this ratio called k-1 2 n-1 Total MSE 2 n-k Within groups p obs F obs MSG 2 Between groups the F -statistic: Pr( F) F value Mean Sq Sum Sq Df k : # of groups; n : # of obs. MSE MSG 9 ∑ | 2 / ( k − 1 ) ∑ | 2 / ( n − k ) F = =
For historical reasons, we use a modifjcation of this ratio called the F -statistic: n-1 Total MSE n-k Within groups p obs F obs MSG k-1 Between groups F value Mean Sq Sum Sq Df k : # of groups; n : # of obs. MSE MSG 9 ∑ | 2 / ( k − 1 ) ∑ | 2 / ( n − k ) F = = Pr( > F) ∑ | 2 ∑ | 2 ∑ ( | + | ) 2
Outline 1. Housekeeping 2. Main ideas 1. Comparing many means requires care 2. ANOVA tests for some difgerence in means of many difgerent groups 3. ANOVA compares between group variation to within group variation 4. To identify which means are difgerent, use t-tests and the Bonferroni correction 3. Summary
To identify which means are difgerent, use t-tests and the Bonferroni correction question is: “Which means are difgerent?” – with a common variance ( MSE from the ANOVA table) instead of each group’s variances in the calculation of the standard error, ANOVA table) K where K is the total number of pairwise tests 10 ◮ If the ANOVA yields a signifjcant results, next natural ◮ Use t-tests comparing each pair of means to each other, – and with a common degrees of freedom ( df E from the ◮ Compare resulting p-values to a modifjed signifjcance level α ⋆ = α
Application exercise: 4.4 ANOVA 11
Outline 1. Housekeeping 2. Main ideas 1. Comparing many means requires care difgerent groups 3. ANOVA compares between group variation to within group variation 4. To identify which means are difgerent, use t-tests and the Bonferroni correction 3. Summary 2. ANOVA tests for some difgerence in means of many
Summary of main ideas 1. ?? 2. ?? 3. ?? 4. ?? 12
Recommend
More recommend