Download presentation
Presentation is loading. Please wait.
Published byLouisa Gibson Modified over 9 years ago
1
Analysis of Variance 11/6
2
Comparing Several Groups Do the group means differ? Naive approach – Independent-samples t-tests of all pairs – Each test doesn't use all data Less power – 10 total tests Greater chance of Type I error Analysis of Variance (ANOVA) – Single test for any group differences – Null hypothesis: All means are equal – Works using variance of the sample means – Also based on separating explained and unexplained variance Section:M 8-10M 12-2T 9-11W 8-10R 9-11 Exam 1 Mean:76.6%82.5%83.7%79.5%82.9%
3
Variance of Sample Means Say we have k groups of n subjects each – Want to test whether i are all equal for i = 1,…,k Even if all population means are equal, sample means will vary – Central limit theorem tells how much: Compare actual variance of sample means to amount expected by chance – or – Estimate 2 using MS residual – Test statistic: If F is large enough – Sample means vary more than expected by chance – Reject null hypothesis M1M1 M2M2 M3M3 MkMk
4
Residual Mean Square Best estimate of population variance, 2 Based on remaining variability after removing group differences Extends MS for independent-samples t-test 2 groups: k groups:
5
Example: Lab Sections Group means: Variance of group means: Var(M) expected by chance: – Instead: Estimate of 2 : Ratio of between-group variance to amount expected by chance: F crit = 2.46 F =.96 P(F 4, 105 ) F =.96 p =.44
6
Partitioning Sum of Squares General approach to ANOVA uses sums of squares – Works with unequal sample sizes and other complications – Breaks total variability into explained and unexplained parts SS total – Sum of squares for all data, treated as a single sample – Based on differences from grand mean, SS residual (SS within ) – Variability within groups, just like with independent-samples t-test – Not explainable by group differences SS treatment (SS between ) – Variability explainable by difference among groups – Treat each datum as its group mean and take difference from grand mean
7
Magic of Squares M3M3 M2M2 M1M1 M4M4 SS total = (X – M) 2 SS residual = i ( (X i – M i ) 2 ) SS treatment = i (n i (M i – M) 2 ) M ×4×4 ×5×5 ×6×6 ×5×5
8
Test Statistic for ANOVA Goal: Determine whether group differences account for more variability than expected by chance Same approach as with regression Calculate Mean Square: H 0 : MS treatment ≈ 2 Estimate 2 using Test statistic:
9
Lab Sections Revisited Two approaches – Variance of section means – Mean Square for treatment (lab section) Variance of group means – Var(76.6 82.5 83.7 79.5 82.9) = 8.69 – Expected by chance: 2 /22 – Var(M) vs. 2 /22, or 22*var(M) vs. 2 Mean Square for treatment 22 ` mean(M)
10
Two Views of ANOVA Simple: Equal sample sizes General: Using sums of squares M1M1 M2M2 M3M3 MkMk If sample sizes equal:
11
Degrees of Freedom SS total df total n i – 1 df treatment k – 1 df residual (n i – 1) n i – k.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.