ANALYSIS OF VARIANCE (ANOVA)

Slides:



Advertisements
Similar presentations
Week 2 – PART III POST-HOC TESTS. POST HOC TESTS When we get a significant F test result in an ANOVA test for a main effect of a factor with more than.
Advertisements

Test of (µ 1 – µ 2 ),  1 =  2, Populations Normal Test Statistic and df = n 1 + n 2 – 2 2– )1– 2 ( 2 1 )1– 1 ( 2 where ] 2 – 1 [–
What is Chi-Square? Used to examine differences in the distributions of nominal data A mathematical comparison between expected frequencies and observed.
1 Chapter 4 Experiments with Blocking Factors The Randomized Complete Block Design Nuisance factor: a design factor that probably has an effect.
Chapter 4 Randomized Blocks, Latin Squares, and Related Designs
Analysis of variance (ANOVA)-the General Linear Model (GLM)
Model Adequacy Checking in the ANOVA Text reference, Section 3-4, pg
N-way ANOVA. Two-factor ANOVA with equal replications Experimental design: 2  2 (or 2 2 ) factorial with n = 5 replicate Total number of observations:
Analysis of variance (ANOVA)-the General Linear Model (GLM)
MARE 250 Dr. Jason Turner Hypothesis Testing II. To ASSUME is to make an… Four assumptions for t-test hypothesis testing:
Comparing Means.
Chapter 3 Experiments with a Single Factor: The Analysis of Variance
Experimental Design Terminology  An Experimental Unit is the entity on which measurement or an observation is made. For example, subjects are experimental.
Lecture 24: Thurs. Dec. 4 Extra sum of squares F-tests (10.3) R-squared statistic (10.4.1) Residual plots (11.2) Influential observations (11.3,
Lecture 9: One Way ANOVA Between Subjects
Statistics for the Social Sciences Psychology 340 Fall 2013 Thursday, November 21 Review for Exam #4.
Inferential Statistics: SPSS
Introduction to Linear Regression and Correlation Analysis
QNT 531 Advanced Problems in Statistics and Research Methods
- Interfering factors in the comparison of two sample means using unpaired samples may inflate the pooled estimate of variance of test results. - It is.
Design and Analysis of Experiments Dr. Tai-Yue Wang Department of Industrial and Information Management National Cheng Kung University Tainan, TAIWAN,
Psychology 301 Chapters & Differences Between Two Means Introduction to Analysis of Variance Multiple Comparisons.
GENERAL LINEAR MODELS Oneway ANOVA, GLM Univariate (n-way ANOVA, ANCOVA)
Inferential Statistics
Multiple Regression Petter Mostad Review: Simple linear regression We define a model where are independent (normally distributed) with equal.
Orthogonal Linear Contrasts This is a technique for partitioning ANOVA sum of squares into individual degrees of freedom.
Analysis of Variance 1 Dr. Mohammed Alahmed Ph.D. in BioStatistics (011)
Social Science Research Design and Statistics, 2/e Alfred P. Rovai, Jason D. Baker, and Michael K. Ponton Within Subjects Analysis of Variance PowerPoint.
ANOVA Assumptions 1.Normality (sampling distribution of the mean) 2.Homogeneity of Variance 3.Independence of Observations - reason for random assignment.
ANOVA: Analysis of Variance.
1 ANALYSIS OF VARIANCE (ANOVA) Heibatollah Baghi, and Mastee Badii.
Two-Way (Independent) ANOVA. PSYC 6130A, PROF. J. ELDER 2 Two-Way ANOVA “Two-Way” means groups are defined by 2 independent variables. These IVs are typically.
- We have samples for each of two conditions. We provide an answer for “Are the two sample means significantly different from each other, or could both.
Introduction to ANOVA Research Designs for ANOVAs Type I Error and Multiple Hypothesis Tests The Logic of ANOVA ANOVA vocabulary, notation, and formulas.
Analysis of Variance STAT E-150 Statistical Methods.
Model adequacy checking in the ANOVA Checking assumptions is important –Normality –Constant variance –Independence –Have we fit the right model? Later.
ENGR 610 Applied Statistics Fall Week 8 Marshall University CITE Jack Smith.
Analyze Of VAriance. Application fields ◦ Comparing means for more than two independent samples = examining relationship between categorical->metric variables.
Six Easy Steps for an ANOVA 1) State the hypothesis 2) Find the F-critical value 3) Calculate the F-value 4) Decision 5) Create the summary table 6) Put.
ANOVA2484 ANALYSIS OF VARIANCE (ANOVA) considering random factors Variance component analysis.
Analysis of Variance l Chapter 8 l 8.1 One way ANOVA
I. ANOVA revisited & reviewed
Step 1: Specify a null hypothesis
Design and Analysis of Experiments
Two-Sample Hypothesis Testing
Week 2 – PART III POST-HOC TESTS.
Statistics for Managers Using Microsoft Excel 3rd Edition
Why is this important? Requirement Understand research articles
Factorial Experiments
ANOVA Econ201 HSTS212.
Statistical Quality Control, 7th Edition by Douglas C. Montgomery.
Statistical Data Analysis - Lecture /04/03
Comparing Three or More Means
Hypothesis testing using contrasts
Post Hoc Tests on One-Way ANOVA
Planned Comparisons & Post Hoc Tests
Differences Among Group Means: One-Way Analysis of Variance
Comparing k Populations
Comparing Several Means: ANOVA
Chapter 11 Analysis of Variance
Single-Factor Studies
Single-Factor Studies
Chapter 11: The ANalysis Of Variance (ANOVA)
1-Way Analysis of Variance - Completely Randomized Design
I. Statistical Tests: Why do we use them? What do they involve?
Comparing Means.
1-Way Analysis of Variance - Completely Randomized Design
Design and Analysis of Experiments
Exercise 1 Use Transform  Compute variable to calculate weight lost by each person Calculate the overall mean weight lost Calculate the means and standard.
STATISTICS INFORMED DECISIONS USING DATA
Presentation transcript:

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 pconst) 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 kl 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 60.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 34(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

34(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