11. Analysis of Variance (ANOVA). Analysis of Variance Review of T-Test ✔ The basic ANOVA situation How ANOVA works One factor ANOVA model ANCOVA and.

Slides:



Advertisements
Similar presentations
BPS - 5th Ed. Chapter 241 One-Way Analysis of Variance: Comparing Several Means.
Advertisements

ANOVA (Analysis of Variance)
Design of Experiments and Analysis of Variance
ANOVA: Analysis of Variation
© 2010 Pearson Prentice Hall. All rights reserved Single Factor ANOVA.
1 1 Slide © 2009, Econ-2030 Applied Statistics-Dr Tadesse Chapter 10: Comparisons Involving Means n Introduction to Analysis of Variance n Analysis of.
Copyright ©2011 Brooks/Cole, Cengage Learning Analysis of Variance Chapter 16 1.
Part I – MULTIVARIATE ANALYSIS
Statistics 303 Chapter 12 ANalysis Of VAriance. ANOVA: Comparing Several Means The statistical methodology for comparing several means is called analysis.
Copyright © 2006 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide Are the Means of Several Groups Equal? Ho:Ha: Consider the following.
Lecture 12 One-way Analysis of Variance (Chapter 15.2)
Chapter 12: Analysis of Variance
F-Test ( ANOVA ) & Two-Way ANOVA
STAT 3130 Statistical Methods I Session 2 One Way Analysis of Variance (ANOVA)
1 1 Slide © 2006 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 1 Slide © 2005 Thomson/South-Western Chapter 13, Part A Analysis of Variance and Experimental Design n Introduction to Analysis of Variance n Analysis.
STA291 Statistical Methods Lecture 31. Analyzing a Design in One Factor – The One-Way Analysis of Variance Consider an experiment with a single factor.
1 1 Slide Analysis of Variance Chapter 13 BA 303.
12-1 Chapter Twelve McGraw-Hill/Irwin © 2006 The McGraw-Hill Companies, Inc., All Rights Reserved.
 The idea of ANOVA  Comparing several means  The problem of multiple comparisons  The ANOVA F test 1.
Lecture Presentation Slides SEVENTH EDITION STATISTICS Moore / McCabe / Craig Introduction to the Practice of Chapter 12 One-Way Analysis of Variance.
ANOVA One Way Analysis of Variance. ANOVA Purpose: To assess whether there are differences between means of multiple groups. ANOVA provides evidence.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Experimental Design and Analysis of Variance Chapter 10.
One-way ANOVA: - Inference for one-way ANOVA IPS chapter 12.1 © 2006 W.H. Freeman and Company.
ANOVA (Analysis of Variance) by Aziza Munir
Psychology 301 Chapters & Differences Between Two Means Introduction to Analysis of Variance Multiple Comparisons.
1 Chapter 13 Analysis of Variance. 2 Chapter Outline  An introduction to experimental design and analysis of variance  Analysis of Variance and the.
Testing Hypotheses about Differences among Several Means.
INTRODUCTION TO ANALYSIS OF VARIANCE (ANOVA). COURSE CONTENT WHAT IS ANOVA DIFFERENT TYPES OF ANOVA ANOVA THEORY WORKED EXAMPLE IN EXCEL –GENERATING THE.
Chapter 19 Analysis of Variance (ANOVA). ANOVA How to test a null hypothesis that the means of more than two populations are equal. H 0 :  1 =  2 =
One-Way Analysis of Variance
Comparing Three or More Means ANOVA (One-Way Analysis of Variance)
Analysis of Variance 1 Dr. Mohammed Alahmed Ph.D. in BioStatistics (011)
ANOVA: Analysis of Variance. The basic ANOVA situation Two variables: 1 Nominal, 1 Quantitative Main Question: Do the (means of) the quantitative variables.
Dr. Omar Al Jadaan Assistant Professor – Computer Science & Mathematics ANalysis Of VAriance: ANOVA.
Analysis of Variance (ANOVA) Brian Healy, PhD BIO203.
Lecture 9-1 Analysis of Variance
Analysis of Variance (One Factor). ANOVA Analysis of Variance Tests whether differences exist among population means categorized by only one factor or.
1 ANALYSIS OF VARIANCE (ANOVA) Heibatollah Baghi, and Mastee Badii.
The Analysis of Variance. One-Way ANOVA  We use ANOVA when we want to look at statistical relationships (difference in means for example) between more.
AP Statistics: ANOVA Section 1. In section 13.1 A, we used a t-test to compare the means between two groups. An ANOVA (ANalysis Of VAriance) test is used.
12-1 Chapter Twelve McGraw-Hill/Irwin © 2006 The McGraw-Hill Companies, Inc., All Rights Reserved.
Chapter 4 Analysis of Variance
Econ 3790: Business and Economic Statistics Instructor: Yogesh Uppal
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.
Formula for Linear Regression y = bx + a Y variable plotted on vertical axis. X variable plotted on horizontal axis. Slope or the change in y for every.
1/54 Statistics Analysis of Variance. 2/54 Statistics in practice Introduction to Analysis of Variance Analysis of Variance: Testing for the Equality.
McGraw-Hill/IrwinCopyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Experimental Design and Analysis of Variance Chapter 11.
The basic ANOVA situation Two variables: 1 Categorical, other variable interval or ratio Main Question: Do the (means of) the quantitative variables depend.
 List the characteristics of the F distribution.  Conduct a test of hypothesis to determine whether the variances of two populations are equal.  Discuss.
The 2 nd to last topic this year!!.  ANOVA Testing is similar to a “two sample t- test except” that it compares more than two samples to one another.
Chapter 15 Analysis of Variance. The article “Could Mean Platelet Volume be a Predictive Marker for Acute Myocardial Infarction?” (Medical Science Monitor,
Lecture notes 13: ANOVA (a.k.a. Analysis of Variance)
ANOVA: Analysis of Variation
ANOVA: Analysis of Variation
ANOVA: Analysis of Variation
Copyright © 2008 by Hawkes Learning Systems/Quant Systems, Inc.
Chapter 10 Two-Sample Tests and One-Way ANOVA.
ANOVA: Analysis of Variation
Basic Practice of Statistics - 5th Edition
Statistics Analysis of Variance.
Statistics for Business and Economics (13e)
Econ 3790: Business and Economic Statistics
Chapter 11 Analysis of Variance
Chapter 10 – Part II Analysis of Variance
ANOVA: Analysis of Variance
Week ANOVA Four.
Presentation transcript:

11. Analysis of Variance (ANOVA)

Analysis of Variance Review of T-Test ✔ The basic ANOVA situation How ANOVA works One factor ANOVA model ANCOVA and MANOVA

回顾 : T 检验

Analysis of Variance Review of T-Test ✔ The basic ANOVA situation ✔ How ANOVA works One factor ANOVA model ANCOVA and MANOVA

The basic ANOVA situation Two variables: 1 Categorical, 1 Quantitative Main Question: Do the (means of) the quantitative variables depend on which group (given by categorical variable) the individual is in? If categorical variable has only 2 values: 2-sample t-test ANOVA allows for 3 or more groups

An example ANOVA situation Subjects: 25 patients with blisters Treatments: Treatment A, Treatment B, Placebo Measurement: # of days until blisters heal Data [and means]: A: 5,6,6,7,7,8,9,10 [7.25] B: 7,7,8,9,9,10,10,11 [8.875] P: 7,9,9,10,10,10,11,12,13 [10.11] Are these differences significant?

Informal Investigation Graphical investigation: side-by-side box plots multiple histograms Whether the differences between the groups are significant depends on the difference in the means the standard deviations of each group the sample sizes ANOVA determines P-value from the F statistic

Side by Side Boxplots

What does ANOVA do? At its simplest ANOVA tests the following hypotheses: H 0 : The means of all the groups are equal. H a : Not all the means are equal doesn’t say how or which ones differ. Can follow up with “multiple comparisons”

Assumptions of ANOVA  each group is approximately normal · check this by looking at histograms and/or normal quantile plots, or use assumptions · can handle some nonnormality, but not severe outliers  standard deviations of each group are approximately equal · rule of thumb: ratio of largest to smallest sample st. dev. must be less than 2:1

Normality Check We should check for normality using: assumptions about population histograms for each group normal quantile plot for each group With such small data sets, there really isn’t a really good way to check normality from data, but we make the common assumption that physical measurements of people tend to be normally distributed.

Standard Deviation Check Compare largest and smallest standard deviations: largest: smallest: x 2 = > Variable treatment N Mean StDev days A B P

Analysis of Variance Review of T-Test ✔ The basic ANOVA situation ✔ How ANOVA works ✔ One factor ANOVA model ANCOVA and MANOVA

Notation for ANOVA n = number of individuals all together m = number of groups = mean for entire data set is Group j has n j = # of individuals in group j x ij = value for individual i in group j = mean for group j s j = standard deviation for group j

How ANOVA works (outline) ANOVA measures two sources of variation in the data and compares their relative sizes  variation BETWEEN groups for each data value look at the difference between its group mean and the overall mean  variation WITHIN groups for each data value we look at the difference between that value and the mean of its group

The ANOVA F-statistic A ratio of the Between Group Variation divided by the Within Group Variation: A large F is evidence against H 0, since it indicates that there is more difference between groups than within groups.

Minitab ANOVA Output Analysis of Variance for days Source DF SS MS F P treatment Error Total Df Sum Sq Mean Sq F value Pr(>F) treatment Residuals R ANOVA Output

How are these computations made? We want to measure the amount of variation due to BETWEEN group variation and WITHIN group variation For each data value, we calculate its contribution to: BETWEEN group variation: WITHIN group variation:

An even smaller example Suppose we have three groups Group 1: 5.3, 6.0, 6.7 Group 2: 5.5, 6.2, 6.4, 5.7 Group 3: 7.5, 7.2, 7.9 We get the following statistics:

Excel ANOVA Output 1 less than number of groups: m-1=2 number of data values - number of groups: n-m=7 1 less than number of individuals: n-1=9

Computing ANOVA F statistic overall mean: 6.44F = / =

The example ANOVA situation again Subjects: 25 patients with blisters Treatments: Treatment A, Treatment B, Placebo Measurement: # of days until blisters heal Data: A: 5,6,6,7,7,8,9,10 B: 7,7,8,9,9,10,10,11 P: 7,9,9,10,10,10,11,12,13

Minitab ANOVA Output 1 less than # of groups: m-1=2 # of data values - # of groups: n-m=22 1 less than # of individuals: n-1=24 Analysis of Variance for days Source DF SS MS F P treatment Error Total

Minitab ANOVA Output Analysis of Variance for days Source DF SS MS F P treatment Error Total SS stands for sum of squares MS = SS/DF

Minitab ANOVA Output MSG = SSG / DFG Analysis of Variance for days Source DF SS MS F P treatment Error Total F = MSG / MSE P-value comes from F(DFG,DFE) (P-values for the F statistic are in Table E) MSE = SSE / DFE

So How big is F? Since F is Mean Square Between / Mean Square Within = MSG / MSE A large value of F indicates relatively more difference between groups than within groups (evidence against H 0 ) To get the P-value, we compare to F(m-1,n-m)-distribution m-1 degrees of freedom in numerator (# groups -1) n-m degrees of freedom in denominator (rest of df)

Connections between SST, MST, and standard deviation So SST = (n -1) s 2, and MST = s 2. That is, SST and MST measure the TOTAL variation in the data set. If ignore the groups for a moment and just compute the standard deviation of the entire data set, we see

Connections between SSE, MSE, and standard deviation So SS[Within Group j] = (s j 2 ) (df j ) This means that we can compute SSE from the standard deviations and sizes (df) of each group: Remember:

Pooled estimate for st. dev One of the ANOVA assumptions is that all groups have the same standard deviation. so MSE is the pooled estimate of variance m=p+1

In Summary

Analysis of Variance Review of T-Test ✔ The basic ANOVA situation ✔ How ANOVA works ✔ One factor ANOVA model ✔ ANCOVA and MANOVA

ANOVA 由英国统计 学家 R.A.Fisher 首创, 为纪念 Fisher ,以 F 命 名,故方差分析又称 F 检验 ( F test )。用于 推断多个总体均数有无 差异

Mechanics: One factor ANOVA model One factor ANOVA model: X ij =μ+τ j +ε ij where μ is the overall mean of the population, τ j is the treatment effect associated with level j of the experimental factor (i.e., Group j), ε ij is assumed to be distributed independently and identically with mean zero and variance σ 2.

Mechanics: One factor ANOVA model We now state the null hypothesis as follows: H 0 : τ 1 = τ 2 =…= τ p+1 =0 It can be proved that

F Statistic

F 分布曲线

F 分布曲线下面积与概率

Where’s the Difference? Analysis of Variance for days Source DF SS MS F P treatmen Error Total Individual 95% CIs For Mean Based on Pooled StDev Level N Mean StDev A ( * ) B ( * ) P (------* ) Pooled StDev = Once ANOVA indicates that the groups do not all appear to have the same means, what do we do? Clearest difference: P is worse than A (CI’s don’t overlap)

Multiple Comparisons Once ANOVA indicates that the groups do not all have the same means, we can compare them two by two using the 2-sample t test We need to adjust our p-value threshold because we are doing multiple tests with the same data. There are several methods for doing this. If we really just want to test the difference between one pair of treatments, we should set the study up that way.

Analysis of Variance Review of T-Test ✔ The basic ANOVA situation ✔ How ANOVA works ✔ One factor ANOVA model ✔ ANCOVA and MANOVA ✔

Analysis of Covariance (ANCOVA) ANCOVA allows for the introduction of other independent variables into ANOVA. Here are two reasons: 1.To introduce the precision of an experiment by removing possible sources of variance in the dependent variable that are attributed to factors not being controlled by the researcher. 2.To introduce a covariate to account for systematic differences across treatment groups that for some reason were not controlled for in the experiment design.

One factor ANCOVA model One factor ANOVA model with covariate Z: X ij =μ+τ j +βZ ij +ε ij where μ is the overall mean of the population, τ j is the treatment effect associated with level j of the experimental factor (i.e., Group j), ε ij is assumed to be distributed independently and identically with mean zero and variance σ 2. Z is a standarized variable.

Mulitiple Analysis of Variance (MANOVA) In some experiments, there are multiple dependent variables because the same measure is taken from each subject at different points in time following the treatment. For example, after administrating a new drug, it might be important to measure the incidence of side effects or complications short after the treatment and again later. This type of an experiment is known as a repeated-measures design.