Analysis of Variance Compare k Quant Populations k ≥ 2 Case I: Case II: 1 2 3 1 2 3 + + + + + + + + + + + + + + + + + + + + + + + +
k – Treatment Groups k ≥ 2 nj = # obs in the jth group X11 X12 X13 …. X1k X21 X22 X23 …. X2k N = ∑nj …. Treatment Xn11 Xn22 Xn33 …. Xnkk Total T1 T2 T3 …. Tk Xj = ∑Xij/nj Mean X1 X2 X3 …. Xk Model: Xij = µj + eij Random Error - E(eij) = 0 V(eij) = σ2 Overall Mean - µ = ∑µj/k All Means Equal: Treatment Effect – τj = (µj - µ) Means Differ:
Error – eij = (Xij - µj) Grand Mean – X is estimator for µ Xj is estimator for µj Consider the Total Variation of X: Total Variation = Within Group + Between Groups Total = Error + Treatments Total = Residual + Model TSS = SSE + SST
Analysis of Variance (ANOVA) Table Source df SS MS Expected Treatments k-1 MST = SST/k-1 σ2 + V(τ) Error N-k MSE = SSE/N-k σ2 Total N-1 F Ratio - F = MST/MSE Means Equal : F = 1 Means Differ : F >> 1 H0: All Means Equal HA: Not All Equal R: F > Fα(k-1,N-k) F = MST/MSE
Example 1: 1 2 3 50 67 50 48 72 44 53 71 43 48 74 45 51 66 43
Machine Formulas: Example 2: 1 2 16 24 20 21 18 22 14 25
Multiple Comparisons - Determine which Means Differ A) Group Mean Interval Estimate 1) 2) 3)
B) Difference of Two Means (µ2 - µ1) (µ1 - µ3) (µ2 - µ3)
d - e ≤ D ≤ d + e Note: If d > e then A Diff; If d ≤ e then No Diff Fisher LSD Method (Least Significant Difference) Groups Contrast LSD Decision
Tukey HSD Method (Honestly Significant Difference) Groups Contrast HSD Decision
Example 3: Unequal Group Size 1 2 3 24 27 18 20 21 12 19 20 12 21 26
Multiple Comparisons LSD Method: Groups d LSD Decision Tukey - HSD Method: Groups d HSD Decision
2-Way ANOVA - Complete Randomized Block Design k Column Groups (Treatments) b Row Groups (Blocks) 1 2 3 … k Sum Ave 1 X11 X12 X13 … X1k B1 R1 2 X21 X22 X23 … X2k B2 R2 . . . . . . . . b Xb1 Xb2 Xb3 … Xbk Bk Rk Sum T1 T2 T3 … Tk Ave C1 C2 C3 … Ck X
Partition the Total Variation of X Total = Error + Blocks + Treatments TSS = SSE + SSB + SST
2-Way ANOVA Table: Source df Sum of Squares Mean Square Treatments k-1 MST = SST/k-1 Blocks b-1 MSB = SSB/b-1 Error N-k-b+1 MSE = SSE/N-k-b+1 Total N-1 There are Two Hypothesis Tests: 1) Equal Column (Treatment) Means FTreat = MST/MSE 2) Equal Row (Block) Means FBlock = MSB/MSE
Example 4: 2-Way Example Package Ad A B C TV 39 29 31 News 31 23 27
Multiple Comparisons:
Machine Formulas:
Example 5: 2-Way is an Extension of Matched Pair Data Child Before After A 96 104 B 102 112 C 108 112 D 89 93 E 85 89
Multiple Comparisons:
Example 6: Interaction Effect Temp A B C Hot 57 55 68 Warm 49 53 63 Cold 53 42 64
Multiple Comparisons:
Example 7: Interaction Example Child Placebo Ritalin Hyper 71.25 52.75 Normal 50.50 62.50