ANOVA II 3/30 Review • • • • Which is more reliable (bigger F, smaller p)? Greater between-groups variability Smaller within-groups variability Larger sample sizes Mi: X1 X2 X3 X4 X5 82 97 88 86 79 95 79 93 81 74 77 84 79 94 78 81 83 75 99 92 90 92 80 85 87 85 87 83 89 82 Mi: Mi: X1 X2 X3 X4 X5 82 X1 95 68 83 97 X2 79 97 88 88 X3 93 83 81 86 X4 81 86 88 79 X5 74 59 80 77 81 85 81 63 84 84 79 87 83 84 86 79 88 83 75 74 85 94 81 87 99 94 91 78 54 83 92 58 84 90 67 86 82 76 87 92 83 85 97 92 89 80 70 84 88 75 82 85 99 89 86 85 90 87 72 82 79 67 81 95 71 85 77 79 87 84 93 78 83 79 81 89 94 74 62 82 78 81 83 75 99 92 90 92 80 85 87 85 87 83 89 82 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 • SStotal – Sum of squares for all data, treated as a single sample – Based on differences from grand mean, M SStotal = å (X - M) 2 all groups • SSresidual (SSwithin) – Variability within groups, just like with independent-samples t-test – Not explainable by group differences æ ö 2 2 2 SSresidual = å çç å ( X i - M i ) ÷÷ = å ( X 1 - M 1) +… + å ( X k - M k ) i=1 to k è group i group 1 group k ø • SStreatment (SSbetween) – Variability explainable by difference among groups – Treat each datum as its group mean and take difference from grand mean æ 2ö SStreatment = å ç ni × ( M i - M ) ÷ è ø i=1 to k Magic of Squares SStotal = SStreatment + SSresidual M1 ×5 M ×6 M2 SStotal = S(X – M)2 ×5 ×4 M3 SSresidual = Si(S(Xi – Mi)2) M4 SStreatment = Si(ni(Mi – M)2) 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: MStreatment • H0: MStreatment ≈ s2 • Estimate s2 using MSresidual = MStreatment • Test statistic: F = MSresidual SStreatment = df treatment SSresidual df residual 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: s2/22 – Var(M) vs. s2/22, or 22*var(M) vs. s2 • Mean Square for treatment 22 MStreatment = mean(M) åi n`i ( M i - M ) 2 = 22× var( M ) 5 -1 22× ( 76.6 - 81.0) + 22× ( 82.5 - 81.0) + 22× ( 83.7 - 81.0) + 22× (79.5 - 81.0) + 22× (82.9 - 81.0) 2 = F= 191.1 191.1 = = .96 MSresidual 199.1 2 2 4 2 2 = 191.1 Two Views of ANOVA s2 0.8 • Simple: Equal sample sizes var(M) s 2 = n×var(M) 0.4 F= s2 0.0 p n n -4 -2 n×var(M) = MSresidual m 0 2 4 z M1 M3 M2 Mk • General: Using sums of squares F= MStreatment MSresidual MStreatment If sample sizes equal: SStreatment åi ni ( M i - M ) = = df treatment k -1 2 åi ( M i - M ) 2 MStreatment = n× k -1 = n×var(M) Degrees of Freedom SStreatment = var(M) dftreatment = k – 1 SStotal = å( X - M ) 2 dftotal = Sni – 1 SSresidual = å var(X i ) i dfresidual = S(ni – 1) = Sni – k .
© Copyright 2026 Paperzz