Analysis of variance Petter Mostad 2005.11.07. Comparing more than two groups Up to now we have studied situations with –One observation per object One.

Slides:



Advertisements
Similar presentations
Chapter 16 Introduction to Nonparametric Statistics
Advertisements

PSY 307 – Statistics for the Behavioral Sciences Chapter 20 – Tests for Ranked Data, Choosing Statistical Tests.
ANOVA: Analysis of Variation
INTRODUCTION TO NON-PARAMETRIC ANALYSES CHI SQUARE ANALYSIS.
Nonparametric tests and ANOVAs: What you need to know.
Testing Differences Among Several Sample Means Multiple t Tests vs. Analysis of Variance.
Independent Sample T-test Formula
Sample size computations Petter Mostad
Analysis of Variance. Experimental Design u Investigator controls one or more independent variables –Called treatment variables or factors –Contain two.
Differences Between Group Means
Lesson #23 Analysis of Variance. In Analysis of Variance (ANOVA), we have: H 0 :  1 =  2 =  3 = … =  k H 1 : at least one  i does not equal the others.
Chapter 3 Analysis of Variance
Final Review Session.
Analysis of Differential Expression T-test ANOVA Non-parametric methods Correlation Regression.
Chapter 17 Analysis of Variance
One-way Between Groups Analysis of Variance
Lecture 12 One-way Analysis of Variance (Chapter 15.2)
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Statistics for Business and Economics 7 th Edition Chapter 15 Analysis of Variance.
PSY 307 – Statistics for the Behavioral Sciences Chapter 19 – Chi-Square Test for Qualitative Data Chapter 21 – Deciding Which Test to Use.
5-3 Inference on the Means of Two Populations, Variances Unknown
Summary of Quantitative Analysis Neuman and Robson Ch. 11
Nonparametrics and goodness of fit Petter Mostad
6.1 - One Sample One Sample  Mean μ, Variance σ 2, Proportion π Two Samples Two Samples  Means, Variances, Proportions μ 1 vs. μ 2.
Leedy and Ormrod Ch. 11 Gray Ch. 14
Chapter 12: Analysis of Variance
AM Recitation 2/10/11.
Estimation and Hypothesis Testing Faculty of Information Technology King Mongkut’s University of Technology North Bangkok 1.
ANALYSIS OF VARIANCE. Analysis of variance ◦ A One-way Analysis Of Variance Is A Way To Test The Equality Of Three Or More Means At One Time By Using.
Inferential Statistics: SPSS
QNT 531 Advanced Problems in Statistics and Research Methods
INFERENTIAL STATISTICS: Analysis Of Variance ANOVA
© 2003 Prentice-Hall, Inc.Chap 11-1 Analysis of Variance IE 340/440 PROCESS IMPROVEMENT THROUGH PLANNED EXPERIMENTATION Dr. Xueping Li University of Tennessee.
NONPARAMETRIC STATISTICS
Analysis of Variance ( ANOVA )
© 2002 Prentice-Hall, Inc.Chap 9-1 Statistics for Managers Using Microsoft Excel 3 rd Edition Chapter 9 Analysis of Variance.
© Copyright McGraw-Hill CHAPTER 12 Analysis of Variance (ANOVA)
Introduction to Biostatistics, Harvard Extension School, Fall, 2005 © Scott Evans, Ph.D.1 Analysis of Variance (ANOVA)
CHAPTER 12 Analysis of Variance Tests
Chapter 10 Analysis of Variance.
ANOVA (Analysis of Variance) by Aziza Munir
Testing Multiple Means and the Analysis of Variance (§8.1, 8.2, 8.6) Situations where comparing more than two means is important. The approach to testing.
Nonparametric Statistics aka, distribution-free statistics makes no assumption about the underlying distribution, other than that it is continuous the.
Copyright © 2004 Pearson Education, Inc.
Biostatistics, statistical software VII. Non-parametric tests: Wilcoxon’s signed rank test, Mann-Whitney U-test, Kruskal- Wallis test, Spearman’ rank correlation.
Inferential Statistics
Multiple Regression and Model Building Chapter 15 Copyright © 2014 by The McGraw-Hill Companies, Inc. All rights reserved.McGraw-Hill/Irwin.
Education 793 Class Notes Presentation 10 Chi-Square Tests and One-Way ANOVA.
Confidence intervals and hypothesis testing Petter Mostad
Analysis of Variance 1 Dr. Mohammed Alahmed Ph.D. in BioStatistics (011)
Analysis of Variance (ANOVA) Brian Healy, PhD BIO203.
Chapter 14 – 1 Chapter 14: Analysis of Variance Understanding Analysis of Variance The Structure of Hypothesis Testing with ANOVA Decomposition of SST.
Experimental Design and Statistics. Scientific Method
Previous Lecture: Phylogenetics. Analysis of Variance This Lecture Judy Zhong Ph.D.
Analysis of Variance. What is Variance? Think….think…
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 14 Comparing Groups: Analysis of Variance Methods Section 14.3 Two-Way ANOVA.
CD-ROM Chap 16-1 A Course In Business Statistics, 4th © 2006 Prentice-Hall, Inc. A Course In Business Statistics 4 th Edition CD-ROM Chapter 16 Introduction.
Irwin/McGraw-Hill © Andrew F. Siegel, 1997 and Methods and Applications CHAPTER 15 ANOVA : Testing for Differences among Many Samples, and Much.
NON-PARAMETRIC STATISTICS
DTC Quantitative Methods Bivariate Analysis: t-tests and Analysis of Variance (ANOVA) Thursday 14 th February 2013.
The Analysis of Variance ANOVA
The p-value approach to Hypothesis Testing
Analysis of variance Tron Anders Moger
SUMMARY EQT 271 MADAM SITI AISYAH ZAKARIA SEMESTER /2015.
Aron, Aron, & Coups, Statistics for the Behavioral and Social Sciences: A Brief Course (3e), © 2005 Prentice Hall Chapter 10 Introduction to the Analysis.
Slide Slide 1 Copyright © 2007 Pearson Education, Inc Publishing as Pearson Addison-Wesley. Lecture Slides Elementary Statistics Tenth Edition and the.
Nonparametric statistics. Four levels of measurement Nominal Ordinal Interval Ratio  Nominal: the lowest level  Ordinal  Interval  Ratio: the highest.
CHAPTER 10: ANALYSIS OF VARIANCE(ANOVA) Leon-Guerrero and Frankfort-Nachmias, Essentials of Statistics for a Diverse Society.
 List the characteristics of the F distribution.  Conduct a test of hypothesis to determine whether the variances of two populations are equal.  Discuss.
Presentation transcript:

Analysis of variance Petter Mostad

Comparing more than two groups Up to now we have studied situations with –One observation per object One group Two groups –Two or more observations per object We will now study situations with one observation per object, and three or more groups of objects The most important question is as usual: Do the numbers in the groups come from the same population, or from different populations?

ANOVA If you have three groups, could plausibly do pairwise comparisons. But if you have 10 groups? Too many pairwise comparisons: You would get too many false positives! You would really like to compare a null hypothesis of all equal, against some difference ANOVA: ANalysis Of VAriance

One-way ANOVA: Example Assume ”treatment results” from 13 patients visiting one of three doctors are given: –Doctor A: 24,26,31,27 –Doctor B: 29,31,30,36,33 –Doctor C: 29,27,34,26 H 0 : The treatment results are from the same population of results H 1 : They are from different populations

Comparing the groups Averages within groups: –Doctor A: 27 –Doctor B: 31.8 –Doctor C: 29 Total average: Variance around the mean matters for comparison. We must compare the variance within the groups to the variance between the group means.

Variance within and between groups Sum of squares within groups: Compare it with sum of squares between groups: Comparing these, we also need to take into account the number of observations and sizes of groups

Adjusting for group sizes Divide by the number of degrees of freedom Test statistic: reject H0 if this is large Both are estimates of population variance of error under H 0 n: number of observations K: number of groups

Test statistic thresholds If populations are normal, with the same variance, then we can show that under the null hypothesis, Reject at confidence level if The F distribution, with K-1 and n-K degrees of freedom Find this value in a table

Continuing example Thus we can NOT reject the null hypothesis in our case.

ANOVA table Source of variation Sum of squares Deg. of freedom Mean squares F ratio Between groups SSGK-1MSG Within groups SSWn-KMSW TotalSSTn-1 NOTE:

One-way ANOVA in SPSS Use ”Analyze => Compare Means => One-way ANOVA Last column: The p-value: The smallest value of at which the null hypothesis is rejected.

The Kruskal-Wallis test ANOVA is based on the assumption of normality There is a non-parametric alternative not relying this assumption: –Looking at all observations together, rank them –Let R 1, R 2, …,R K be the sums of ranks of each group –If some R’s are much larger than others, it indicates the numbers in different groups come from different populations

The Kruskal-Wallis test The test statistic is Under the null hypothesis, this has an approximate distribution. The approximation is OK when each group contains at least 5 observations.

Example: previous data Doctor ADoctor BDoctor C 24 (rank 1)29 (rank 6.5) 26 (rank 2.5)31 (rank 9.5)27 (rank 4.5) 31 (rank 9.5)30 (rank 8)34 (rank 12) 27 (rank 4.5)36 (rank 13)26 (rank 2.5) 33 (rank 11) R 1 =17.5R 2 =48R 3 =25.5 (We really have too few observations for this test!)

Kruskal-Wallis in SPSS Use ”Analyze=>Nonparametric tests=>K independent samples” For our data, we get

When to use what method In situations where we have one observation per object, and want to compare two or more groups: –Use non-parametric tests if you have enough data For two groups: Mann-Whitney U-test (Wilcoxon rank sum) For three or more groups use Kruskal-Wallis –If data analysis indicate assumption of normally distributed independent errors is OK For two groups use t-test (equal or unequal variances assumed) For three or more groups use ANOVA

When to use what method When you in addition to the main observation have some observations that can be used to pair or block objects, and want to compare groups, and assumption of normally distributed independent errors is OK: –For two groups, use paired-data t-test –For three or more groups, we can use two-way ANOVA

Two-way ANOVA (without interaction) In two-way ANOVA, data fall into categories in two different ways: Each observation can be placed in a table. Example: Both doctor and type of treatment should influence outcome. Sometimes we are interested in studying both categories, sometimes the second category is used only to reduce unexplained variance. Then it is called a blocking variable

Sums of squares for two-way ANOVA Assume K categories, H blocks, and assume one observation x ij for each category i and each block j block, so we have n=KH observations. –Mean for category i: –Mean for block j: –Overall mean:

Sums of squares for two-way ANOVA

ANOVA table for two-way data Source of variation Sums of squares Deg. of freedom Mean squaresF ratio Between groupsSSGK-1MSG= SSG/(K-1)MSG/MSE Between blocksSSBH-1MSB= SSB/(H-1)MSB/MSE ErrorSSE(K-1)(H-1)MSE= SSE/(K-1)(H-1) TotalSSTn-1 Test for between groups effect: compare to Test for between blocks effect: compare to

Two-way ANOVA (with interaction) The setup above assumes that the blocking variable influences outcomes in the same way in all categories (and vice versa) We can check if there is interaction between the blocking variable and the categories by extending the model with an interaction term

Sums of squares for two-way ANOVA (with interaction) Assume K categories, H blocks, and assume L observations x ij1, x ij2, …,x ijL for each category i and each block j block, so we have n=KHL observations. –Mean for category i: –Mean for block j: –Mean for cell ij: –Overall mean:

Sums of squares for two-way ANOVA (with interaction)

ANOVA table for two-way data (with interaction) Source of variation Sums of squares Deg. of freedom Mean squaresF ratio Between groupsSSGK-1MSG= SSG/(K-1)MSG/MSE Between blocksSSBH-1MSB= SSB/(H-1)MSB/MSE InteractionSSI(K-1)(H-1)MSI= SSI/(K-1)(H-1) MSI/MSE ErrorSSEKH(L-1)MSE= SSE/KH(L-1) TotalSSTn-1 Test for interaction: compare MSI/MSE with Test for block effect: compare MSB/MSE with Test for group effect: compare MSG/MSE with

Notes on ANOVA All analysis of variance (ANOVA) methods are based on the assumptions of normally distributed and independent errors The same problems can be described using the regression framework. We get exactly the same tests and results! There are many extensions beyond those mentioned