ANALYSIS OF VARIANCE (ANOVA) In spite of its name it serves for comparing means, not for comparing variances. ANOVA1
Remember: Two-sample t test Two independent samples Assuming the equality of variance for the two populations: ANOVA1
One-way ANOVA Several independent samples of size ANOVA1
The sample means are different, even if there is no difference between groups ANOVA1
The sample means are more different. Is the difference significant? group ANOVA1
order of experiments is important Example 51 (Box-Hunter-Hunter: Statistics for Experimenters, J. Wiley, 1978, p. 165) Blood coagulation times (seconds) with four different diets order of experiments is important ANOVA1
ANOVA1
ANOVA1
Open Data Table: blood.xls Analyze>Fit Y by X Y: CTIME X: DIET click on the red triangle, choose Display options error bar ANOVA1
The variance within the i-th group (deviations from the group mean) The pooled within-groups variance (if constant across groups): ANOVA1
Variance of the group mean, if there is no real difference (H0) but sampling fluctuation repetitions as it is estimated from the group means (if p=const) more generally (if pconst) ANOVA1
if there exists real difference (H1) (between) (within) if there exists real difference (H1) ANOVA1
The ANOVA Table Effect of factor A is significant (H0 hypothesis is rejected) if ANOVA1
Balanced design: p1=p2=...=pr=p ANOVA1
Click on the red triangle, choose Means/Anova Example (cont.) Click on the red triangle, choose Means/Anova F0 between p within decision? ANOVA1
Minitab>Stat>ANOVA>One-Way between within decision? ANOVA1
pi different ANOVA1
Statistics>Advanced Linear/Nonlinear Models> >General Linear Models>One-way ANOVA ANOVA1
Summary tab: Descriptive cell statistics Summary tab: Test all effects between within ANOVA1
Assumptions expected value of the ij experimental errors is zero the ij experimental errors are independent both within groups (across j) and between groups (across i) the variance of experimental errors is constant the ij experimental errors follow normal distribution to be checked! In order to avoid misunderstanding for error variance will be used ANOVA1
experimental error (not just measurement error) i-th level of the factor (i-th diet) j-th repetition in the i-th group Model experimental error (not just measurement error) measured value true value expected value ANOVA1
i effect of the i-th level (i-th diet) means model i effect of the i-th level (i-th diet) is a common value; r+1 parameters i=1,…,r sum to zero set to zero effects model ANOVA1
effect, only r-1 independent Estimates grand mean effect, only r-1 independent group mean ANOVA1
Estimation =0 grand mean ANOVA1
effect, only r-1 of them are independentfüggetlen mean of the i-th group ANOVA1
Fisher-Cochran-theorem all ANOVA1
Summary tab: Coefficients sum to zero sigma-restricted set to zero ANOVA1
Summary tab: Coefficients sigma-restricted set to zero ANOVA1
Confidence interval for the expected value of group means Point estimator: Interval estimator : degrees of freedom: Confidence interval for thee expected value of the i-th group: ANOVA1
ANOVA1
All of them are different? rejected All of them are different? Comparisons: planned, post hoc ANOVA1
df would be only n2+n3-2=6+6-2=10 and pooling df for is LSD test (Least Significant Difference) ANOVA1
cik contrast coefficients Generalisation: (kth null hypothesis) cik contrast coefficients contrast c11=0, c21=1, c31=-1, c41=0 ANOVA1
orthogonal contrasts if kl independent comparisons ANOVA1
? ANOVA1
for a comparison α* (e.g. 0.05) (individual error rate) comparisons (1-2, 1-3, 1-4, 2-3, 2-4, 3-4) for a comparison α* (e.g. 0.05) (individual error rate) not committing type I error: 1- α* not committing type I error at any of r independent comparisons: committing type I error at some comparison: (family error rate) e.g. ANOVA1
In case of non-independent comparisons Bonferroni inequality e.g. for 6 non-independent comparisons 60.05=0.3 ANOVA1
Post hoc comparisons ANOVA1
B-A C-A D-A C-B D-B D-C ANOVA1
B-A C-A D-A C-B D-B D-C Minitab12
Post-hoc tab: Bonferroni Post hoc comparisons Post-hoc tab: LSD Post-hoc tab: Bonferroni 0.003803·6=0.022815 ANOVA1
Planned comparisons Planned comps tab: Specify contrasts ANOVA1
ANOVA1
Calculate the effect estimates: ANOVA1
ANOVA1
is rejected None of them are equal? further questions: ANOVA1
Click on the red triangle next to Oneway analysis, choose Compare Means, Each Pair, Student’s t threshold in t (LSD) significant: C-A, C-D,... C and B are connected by A ANOVA1
Click on the red triangle next to Oneway analysis, choose Compare Means, All Pairs, Tukey HSD more conservative (less easily states significance) ANOVA1
Power: probability of detecting an existing difference Click on the red triangle next to Oneway analysis, choose Power If =2.5, with 20 experiments (5 for each diet) we will be able to detect Delta as large as 3 with 98.6% probability ANOVA1
E.g. if 1=-3, 2=3, 3= 4=0 ANOVA1
The size of detectable difference Statistics>Power Analysis>Several Means, ANOVA 1-Way ANOVA1
E.g. if 1=-3, 2=3, 3= 4=0 ANOVA1
The size of detectable difference Minitab>Power and Sample Size>One-Way ANOVA ANOVA1
Required sample size for detecting difference of 5 units ANOVA1
Checking the assumption on homogeneity of variances click on the red triangle, choose Unequal Variances p ANOVA1
Contrast analysis click LSMeans Contrast ANOVA1
A+, B+, C-, D- ANOVA1
Homogeneity of (within-group) variance Minitab>Stat>ANOVA>Homogeneity of variance sensitive to the normaality assumption ANOVA1
Homogeneity of (within-group) variance Minitab>Stat>ANOVA>Homogeneity of variance sensitive to the normality assumption ANOVA ANOVA
Checking residuals (Graphs) ANOVA ANOVA
ANOVA ANOVA
ANOVA ANOVA
ANOVA ANOVA
Homogeneity of variance ? More results>Assumptions tab: Homogeneity of variances ... Bartlett test sensitive to normality Levene test ANOVA1
Checking assumptions by examining the residuals Residuals 1 tab Normality Pred & resids Predicted results (histogram) ANOVA1
Residuals 2 tab X: Order Y: Resids ANOVA1
Checking residuals Graphs>Four in One ANOVA1
Two-way ANOVA All levels of the first factor are combined with all levels of the second factor equal number of repetitions in each cell (balanced design). The structure of the design ensures the orthogonality. ANOVA1
Survival time of animals Example 52 (Box-Hunter-Hunter: Statistics for Experimenters, J. Wiley, 1978, p. 228) Survival time of animals ANOVA1
ANOVA1
ANOVA1
poison (i) treatment (j) i=1,…,r; j=1,…,q, k=1,…,p Model repetition (k) poison (i) treatment (j) means model (all are equal) ANOVA1
effect of the i-th poison j-th treatment interaction Model effect of the i-th poison j-th treatment interaction effects model ANOVA1
The ANOVA Table 34(4-1)=36 ANOVA1
Open Data Table: poison.xls, (poison, treatment Nominal) Analyze>Fit Model Y: survival Add: poison, treatment (Macros, Full factorial) Emphasis: Minimal Report N! ANOVA1
Click on the red triangle next to Response SURVIVAL, choose Factor Profiling, Profiler and Interaction Plots ANOVA1
34(4-1)=36 ANOVA1
(r-1)(q-1)=(3-1)(4-1)=6 independent r-1=3-1=2 independent q-1=4-1=3 independent (r-1)(q-1)=(3-1)(4-1)=6 independent ANOVA1
Minitab>Stat>ANOVA>Two-Way poison.mtw Minitab>Stat>ANOVA>Two-Way ANOVA1
Minitab>Stat>ANOVA>Main Effects Plot
Minitab>Stat>ANOVA>Interactions Plot
Advanced Linear/Nonlinear Models> Statistics> Advanced Linear/Nonlinear Models> >General Linear Models>Factorial ANOVA> Means tab: Observed, unweighted, Plot Summary tab: All effects ANOVA1
Checking the assumptions by plotting residuals Click on the red triangle next to Response SURVIVAL, choose Row Diagnostics, Plot Residual by Predicted is not justified ANOVA1
Box-Cox transformation Click on the red triangle next to Response SURVIVAL, choose Factor Profiling, Box-Cox Y transformation variance stabilising transformation ANOVA1
Homogeneity of variance ? More results>Assumptions tab: Homogeneity of variances sensitive to normality ANOVA1
Checking the assumptions by plotting residuals Residuals1 tab: Pred. & resid. is not justified ANOVA1
Checking the assumptions by plotting residuals satisfied? ANOVA1
ANOVA1
Box-Cox transformation File>Open: (Program Files>StatSoft>Statistica8>Examples>Macros> >Analysis Examples>BoxCox) variance stabilising transformation ANOVA1
ANOVA1
if ANOVA1
straight line is fitted ANOVA1
ANOVA1
New column: recsurv=1/survival Repeat the analysis not transformed ANOVA1
Click on the red triangle next to Response SURVIVAL, choose Save Columns, Residuals Analyze: Distributions, Normal Quantile Plot random fluctuation around the line: Normal ANOVA1
Minitab>Stat>Basic Statistics>Store Descriptive Statistics Mean, Standard Deviation ANOVA1
ANOVA1
Minitab>Stat>Regression ANOVA1
Box-Cox transformation Minitab>Control Charts>Box-Cox transformation ANOVA1
ANOVA1
ANOVA1
ANOVA1
The effects are more convincing (F values are larger), p for interaction is 0.112 → 0.387 ANOVA1
The residuals ANOVA1
Minitab>Stat>ANOVA>Interactions Plot y to 1/y Minitab>Calc Minitab>Stat>ANOVA>Interactions Plot ANOVA1
ANOVA1
Minitab>Stat>ANOVA>Two-Way
Checking residuals Graphs>Four in One ANOVA1
Comparisons Do Poisons 1 and 2 differ? Planned comparisons fülön Compute ANOVA1
estimated effect ANOVA1