One-factor ANOVA by example

Similar documents
Introduction to Analysis of Variance (ANOVA) The Structural Model, The Summary Table, and the One- Way ANOVA

A few things to remember about ANOVA

Analysis of Variance. Copyright 2014 Pearson Education, Inc.

Factorial Analysis of Variance

Class 23: Chapter 14 & Nested ANOVA NOTES: NOTES: NOTES:

Stats 2002: Probabilities for Wins and Losses of Online Gambling

MGB 203B Homework # LSD = 1 1

Unit 4: Inference for numerical variables Lecture 3: ANOVA

ANOVA - Implementation.

One-way ANOVA: round, narrow, wide

PLANNED ORTHOGONAL CONTRASTS

Experimental Design and Data Analysis Part 2

Legendre et al Appendices and Supplements, p. 1

Chapter 13. Factorial ANOVA. Patrick Mair 2015 Psych Factorial ANOVA 0 / 19

Statistical Analysis of PGA Tour Skill Rankings USGA Research and Test Center June 1, 2007

Name May 3, 2007 Math Probability and Statistics

Week 7 One-way ANOVA

Factorial ANOVA Problems

Example 1: One Way ANOVA in MINITAB

Biostatistics & SAS programming

DOCUMENT RESUME. A Comparison of Type I Error Rates of Alpha-Max with Established Multiple Comparison Procedures. PUB DATE NOTE

Announcements. Lecture 19: Inference for SLR & Transformations. Online quiz 7 - commonly missed questions

Case Processing Summary. Cases Valid Missing Total N Percent N Percent N Percent % 0 0.0% % % 0 0.0%

Stat 139 Homework 3 Solutions, Spring 2015

Chapter 2: ANOVA and regression. Caroline Verhoeven

Navigate to the golf data folder and make it your working directory. Load the data by typing

Multilevel Models for Other Non-Normal Outcomes in Mplus v. 7.11

Data Set 7: Bioerosion by Parrotfish Background volume of bites The question:

Setting up group models Part 1 NITP, 2011

N Length (μm) % with eyespots Pilot ± ± ± ± ± ± ± ± 16 70

Safety at Intersections in Oregon A Preliminary Update of Statewide Intersection Crash Rates

Unit4: Inferencefornumericaldata 4. ANOVA. Sta Spring Duke University, Department of Statistical Science

Select Boxplot -> Multiple Y's (simple) and select all variable names.

One Way ANOVA (Analysis of Variance)

Running head: DATA ANALYSIS AND INTERPRETATION 1

CHAPTER ANALYSIS AND INTERPRETATION Average total number of collisions for a try to be scored

Comparison of recruitment tile materials for monitoring coralline algae responses to a changing climate

Chapter 12 Practice Test

Driv e accu racy. Green s in regul ation

CPUE standardization of black marlin (Makaira indica) caught by Taiwanese large scale longline fishery in the Indian Ocean

Session 2: Introduction to Multilevel Modeling Using SPSS

Addendum to SEDAR16-DW-22

Lab 11: Introduction to Linear Regression

y ) s x x )(y i (x i r = 1 n 1 s y Statistics Lecture 7 Exploring Data , y 2 ,y n (x 1 ),,(x n ),(x 2 ,y 1 How two variables vary together

INFORMATIONAL LEAFLET NO. 2. Length-Width Relationships of Carapace. Measurements of the King Crab

Confidence Interval Notes Calculating Confidence Intervals

Guide to Computing Minitab commands used in labs (mtbcode.out)

Empirical Example II of Chapter 7

ASTERISK OR EXCLAMATION POINT?: Power Hitting in Major League Baseball from 1950 Through the Steroid Era. Gary Evans Stat 201B Winter, 2010

Economic Value of Celebrity Endorsements:

Prokopios Chatzakis, National and Kapodistrian University of Athens, Faculty of Physical Education and Sport Science 1

Pressured Applied by the Emergency/Israeli Bandage

Guidelines for Applying Multilevel Modeling to the NSCAW Data

Supplementary Online Content

Section I: Multiple Choice Select the best answer for each problem.

BBS Fall Conference, 16 September Use of modeling & simulation to support the design and analysis of a new dose and regimen finding study

THE DEVELOPMENTOF A PREDICTION MODEL OF THE PASSENGER CAR EQUIVALENT VALUES AT DIFFERENT LOCATIONS

Puyallup Tribe of Indians Shellfish Department

United States Commercial Vertical Line Vessel Standardized Catch Rates of Red Grouper in the US South Atlantic,

Reported walking time and measured distances to water sources: Implications for measuring Basic Service

1. In a hypothesis test involving two-samples, the hypothesized difference in means must be 0. True. False

Major League Baseball Offensive Production in the Designated Hitter Era (1973 Present)

DISMAS Evaluation: Dr. Elizabeth C. McMullan. Grambling State University

WATER OIL RELATIVE PERMEABILITY COMPARATIVE STUDY: STEADY VERSUS UNSTEADY STATE

Daftar Perusahaan Otomotif yang Terdatar di Bursa Efek Indonesia(Periode )

MJA Rev 10/17/2011 1:53:00 PM

APPENDIX A COMPUTATIONALLY GENERATED RANDOM DIGITS 748 APPENDIX C CHI-SQUARE RIGHT-HAND TAIL PROBABILITIES 754

Math SL Internal Assessment What is the relationship between free throw shooting percentage and 3 point shooting percentages?

Water Quality Monitoring of Maryland s Tidal Waterways

Announcements. % College graduate vs. % Hispanic in LA. % College educated vs. % Hispanic in LA. Problem Set 10 Due Wednesday.

Design of Experiments Example: A Two-Way Split-Plot Experiment

ANALYZE OF RESULTS OF THE KOSOVO SWIMMERS ALONG EIGHT YEAR PERIOD, BREASTSTROKE TECHNIQUE AT DISCIPLINES 50 AND 200 METERS

STANDARDIZED CATCH RATES OF BLUEFIN TUNA, THUNNUS THYNNUS, FROM THE ROD AND REEL/HANDLINE FISHERY OFF THE NORTHEAST UNITED STATES DURING

Navel orangeworm biology, monitoring, and management

Midterm Exam 1, section 2. Thursday, September hour, 15 minutes

The Simple Linear Regression Model ECONOMETRICS (ECON 360) BEN VAN KAMMEN, PHD

Taking Your Class for a Walk, Randomly

PERFORMANCE OF LIGHT WEIGHT STOCKER CALVES GRAZING SUMMER NATIVE RANGE WITH 25 OR 40% PROTEIN SUPPLEMENTS

An Empirical Comparison of Regression Analysis Strategies with Discrete Ordinal Variables

Research Method Validation

Nonlife Actuarial Models. Chapter 7 Bühlmann Credibility

Confidence Intervals with proportions

GLMM standardisation of the commercial abalone CPUE for Zones A-D over the period

Policy Management: How data and information impacts the ability to make policy decisions:

Real-Time Electricity Pricing

PradiptaArdiPrastowo Sport Science. SebelasMaret University. Indonesia

NCSS Statistical Software

A Combined Recruitment Index for Demersal Juvenile Cod in NAFO Divisions 3K and 3L

ITS Animated LED Signals. Alert Drivers to Pedestrian Threats

Remote Towers: Videopanorama Framerate Requirements Derived from Visual Discrimination of Deceleration During Simulated Aircraft Landing

Preliminary statistical analysis of. the international eventing. results 2013

Table 4.1: Descriptive Statistics for FAAM 26-Item ADL Subscale

Sport statistics: how to assemble your team elivian.nl high quality, poorly written update history current(v2.1):7-oct-16, original(v1):13-sep-14

Lesson 14: Modeling Relationships with a Line

USING DELTA-GAMMA GENERALIZED LINEAR MODELS TO STANDARDIZE CATCH RATES OF YELLOWFIN TUNA CAUGHT BY BRAZILIAN BAIT-BOATS

Lampiran 1. Surat Uji Coba Penelitian dari Fakultas. Lampiran 2. Expert Judgement

Robert Jones Bandage Report

Competition Jumping Horses: Effects of Age, Sex and Breed on the Fei/Wbfsh World Ranking

Universitas Sumatera Utara

LAMPIRAN A UJI VALIDITAS DAN RELIABILITAS

Transcription:

ANOVA

One-factor ANOVA by example 2

One-factor ANOVA by visual inspection 3

4 One-factor ANOVA H 0 H 0 : µ 1 = µ 2 = µ 3 = H A : not all means are equal

5 One-factor ANOVA but why not t-tests t-tests? 3+2+1 tests -> multiple comparisons The variance is not correctly estimated We need a method that uses the full dataset

6 One-factor ANOVA the cook book I Find the Within groups SS Fx: SS1 = x i x 2 i = 8.2 6 2 + 8.2 7 2 + 8.2 8 2 + 8.2 8 2 + 8.2 9 2 + 8.2 11 2 = 14.4 Sum the sum of squares from each group: SS1+SS2+SS3+SS4 = 14.4+8.8+20.8+13.3 =57.8 df = 20 Within group variance (residual variance) within group SS = = 57.8 = 2.9 df 20 Assumptions: Data is normal distributed and the variance is equal in the groups

7 One-factor ANOVA the cook book II Find the total SS SStot = x i x 2 df = 23 i = 140.0 Find the between group SS (group mean) SSbetween = n x x 2 df = 3 s 2 = m = 6( 8.2 7.5 2 + 5.8 7.5 2 + 10.2 7.5 2 + 5.7 7.5 2 ) = 82.1 between group SS df = 82.1 3 = 27.4

8 The ANOVA table Outcome Sum of Squares ANOVA df Mean Square F Sig. Between Groups 82,125 3 27,375 9,467,0004 Within Groups 57,833 20 2,892 Total 139,958 23 Variance aka mean square aka s 2 is simply SS/df F is the Between SS divided by the Within SS

9 Assumptions The data needs to be normal distributed in the groups The variance needs to be equal in all groups: homoscedasticity The groups needs to be independent

10 Multiple comparisons procedures aka post hoc analysis Rejecting H 0 only states that one or more pairs of means are different, but not which. Tukeys multiple comparisons test as an example.

11 Tukeys multiple comparisons Rank the sample means: Rank 1 2 3 4 Group 3 1 2 4 µ 10.2 8.2 5.8 5.7 SE = s2 n = 2,892 = 0,67 6 pair difference q H 0 3vs4 4.5 6,7 reject 3vs2 4,4 6,6 reject 3vs1 2 3,0 Do not reject 1vs4 2,5 3,7 Do not reject 1vs2 Don not test Do not reject 2vs4 Don not test Do not reject q = X 4 X 3 SE > 3,958? Outcome Sum of Squares ANOVA df Mean Square F Sig. Between Groups 82,125 3 27,375 9,467,000 Within Groups 57,833 20 2,892 Total 139,958 23

Tukeys multiple comparisons 12

1-way ANOVA in SPSS 13

14 Exercise Is there i difference in the group mean? Group 1 Group 2 Group 3 28,00 34,00 33,00 20,00 30,00 38,00 27,00 41,00 27,00 29,00 17,00 36,00 36,00 28,00 25,00

15 Comparison between several medians Kruskal-Wallis test H 0 : The distribution of the groups are equal 1-Way ANOVA for non-normal data

16 Kruskal-Wallis test A few definitions: k is the number of groups n i: : the numner of observations in the i th group. N : total numner of observations R i : the sum of ranks in the i th group How to: Rank all observations Calculate the rank sum for each group Calculate H H is chi-square distributed with k-1 degrees of redom Look up the p-value in a table H 12 2 Ti ni 3 N N 1 N 1

Kruskal-Wallis test An example 17

18 Kruskal-Wallis test An example The data is ranked

19 Kruskal-Wallis test An example The data is ranked H is calculated 12 H 42 2 53 2 36 12 2422 321 69,2 63 6,2 2021 2 20 20 1 79 2 5 3 20 1

20 Kruskal-Wallis test An example The data is ranked H = 6,2 # d.f. = k-1 = 3

Kruskal-Wallis test in SPSS table7-1 21

Kruskal-Wallis test i SPSS 22

23 Kruskal-Wallis test i SPSS Ranks group N Mean Rank count 1,00 5 8,40 2,00 5 10,60 3,00 5 7,20 4,00 5 15,80 Total 20 Test Statistics a,b count Chi-Square 6,205 df 3 Asymp. Sig.,102 a. Kruskal Wallis Test b. Grouping Variable: group

24 Two-factor ANOVA with equal replications Experimental design: 2 2 (or 2 2 ) factorial with n = 5 replicate Total number of observations: N = 2 2 5 = 20 Equal replications also termed orthogonality

25 The hypothesis H 0 : There is on effect of hormone treatment on the mean plasma concentration H 0 : There is on difference in mean plasma concentration between sexes H 0 : There is on interaction of sex and hormone treatment on the mean plasma concentration Why not just use one-way ANOVA with for levels?

26 How to do a 2-way ANOVA with equal replications Calculating means Calculate cell means: n Calculate the total mean (grand mean) Calculating treatment means 5 5 X 16,3 20,4 12,4 15,8 9,5 n l1 abl l1 11l X ab eg X X i n X a b i1 j1 l1 b N n j1 l1 bn X n ijl X ijl egx 21,825 1 13,5 14,88

27 How to do a 2-way ANOVA with equal replications Calculating general Sum of Squares Calculate total SS: totalss totaldf N a b i1 j1 l1 1 19 n X ijl X 2 1762,7175 Calculate the cell SS cells SS a n i 1 j 1 cells DF ab 1 3 b X ij X 2 1461,3255 Calculating within-cells error SS within - cells (error)ss n within - cells (error) DF ab a b i1 j1 l1 n 1 16 n X ijl X ij 2 301,3920

28 How to do a 2-way ANOVA with equal replications Calculating factor Sum of Squares Calculating factor A SS: factor A SS factor A DF a 1 1 a bn X i i 1 X 2 1386,1125 Calculating factor B SS factor BSS factor B DF b 1 1 b 1 an X j j X 2 70,3125 Calculating A B interaction SS A B interaction SS = cell SS factor A SS factor B SS = 4,9005 A B DF = cell DF factor A DF factor B DF = 1

How to do a 2-way ANOVA with equal replications Summary of calculations 29

30 How to do a 2-way ANOVA with equal replications Hypothesis test H 0 : There is on effect of hormone treatment on the mean plasma concentration F = hormone MS/within-cell MS = 1386,1125/18,8370 = 73,6 F 0,05(1),1,16 = 4,49 H 0 : There is on difference in mean plasma concentration between sexes F = sex MS/within-cell MS = 3,73 F 0,05(1),1,16 = 4,49 H 0 : There is on interaction of sex and hormone treatment on the mean plasma concentration F = A B MS/within-cell MS = 0,260 F 0,05(1),1,16 = 4,49

31 Visualizing 2-way ANOVA Table 12.2 and Figure 12.1

2-way ANOVA in SPSS 32

33 2-way ANOVA in SPSS Click Add

Visualizing 2-way ANOVA without interaction 34

Visualizing 2-way ANOVA with interaction 35

36 2-way ANOVA Random or fixed factor Random factor: Levels are selected at random Fixed factor: The value of each levels are of interest and selected on purpose.

37 2-way ANOVA Assumptions Independent levels of the each factor Normal distributed numbers in each cell Equal variance in each cell Bartletts homogenicity test (Section 10.7) s 2 ~ within cell MS; ~ within cell DF The ANOVA test is robust to small violations of the assumptions Data transformation is always an option (see chpter 13) There are no non-parametric alternative to the 2-way ANOVA

38 2-way ANOVA Multiple Comparisons Multiple comparisons tests ~ post hoc tests can be used as in one-way ANOVA Should only be performed if there is a main effect of the factor and no interaction

39 2-way ANOVA Confidence limits for means 95 % confidence limits for calcium concentrations on in birds without hormone treatment 2 s 95 % CI X1 t0,05(2), bn within cell DF;s 2 within cell MS

40 2-way ANOVA With proportional but unequal replications Proportional replications: n ij #row i# col j N

41 2-way ANOVA With disproportional replications Statistical packges as SPSS has porcedures for estimating missing values and correcting unballanced designs, eg using harmonic means Values should not be estimated by simple cell means Single values can be estimated, but remember to decrease the DF a b nij aai bb j ˆ i1 j1l 1 ijl X N 1 a b X ijl

42 2-way ANOVA With one replication Get more data!

2-way ANOVA Randomized block design 43

44 2-way ANOVA Repeated measures Repeating measurements in the same subject, like a paired t-test An additional assumption is that the correlation between pairs of groups is equal: compound symmetry if this is not the case, try multivariate ANOVA or linear mixed model