One-Way Analysis of Variance (ANOVA)

Slides:



Advertisements
Similar presentations
Comparing One Sample to its Population
Advertisements

Effect Size and Power.
Effect Size and Power. ► Two things mentioned previously:  P-values are heavily influenced by sample size (n)  Statistics Commandment #1: P-values are.
Smith/Davis (c) 2005 Prentice Hall Chapter Thirteen Inferential Tests of Significance II: Analyzing and Interpreting Experiments with More than Two Groups.
ANOVA: Analysis of Variance
C82MST Statistical Methods 2 - Lecture 4 1 Overview of Lecture Last Week Per comparison and familywise error Post hoc comparisons Testing the assumptions.
Analysis of Variance (ANOVA) Statistics for the Social Sciences Psychology 340 Spring 2010.
One-Way ANOVA Multiple Comparisons.
Conceptual Review Conceptual Formula, Sig Testing Calculating in SPSS
Lecture 10 PY 427 Statistics 1 Fall 2006 Kin Ching Kong, Ph.D
Part I – MULTIVARIATE ANALYSIS
Factorial ANOVA 2-Way ANOVA, 3-Way ANOVA, etc.. Factorial ANOVA One-Way ANOVA = ANOVA with one IV with 1+ levels and one DV One-Way ANOVA = ANOVA with.
Hypothesis Testing Comparisons Among Two Samples.
Exam #2 Results.
Comparing Means.
BCOR 1020 Business Statistics
Intro to Statistics for the Behavioral Sciences PSYC 1900
Lecture 9: One Way ANOVA Between Subjects
Two Groups Too Many? Try Analysis of Variance (ANOVA)
One-way Between Groups Analysis of Variance
Today Concepts underlying inferential statistics
2-Way ANOVA, 3-Way ANOVA, etc.
Basic Analysis of Variance and the General Linear Model Psy 420 Andrew Ainsworth.
Administrata New final exam schedule: Handed out Tues, Dec 3
Inferential Statistics
Analysis of Variance (ANOVA) Quantitative Methods in HPELS 440:210.
Analysis of Variance. ANOVA Probably the most popular analysis in psychology Why? Ease of implementation Allows for analysis of several groups at once.
Psy B07 Chapter 1Slide 1 ANALYSIS OF VARIANCE. Psy B07 Chapter 1Slide 2 t-test refresher  In chapter 7 we talked about analyses that could be conducted.
ANOVA Chapter 12.
ANCOVA Lecture 9 Andrew Ainsworth. What is ANCOVA?
Hypothesis Testing:.
LEARNING PROGRAMME Hypothesis testing Intermediate Training in Quantitative Analysis Bangkok November 2007.
Intermediate Applied Statistics STAT 460
ANOVA Greg C Elvers.
Stats Lunch: Day 7 One-Way ANOVA. Basic Steps of Calculating an ANOVA M = 3 M = 6 M = 10 Remember, there are 2 ways to estimate pop. variance in ANOVA:
Chapter 11 HYPOTHESIS TESTING USING THE ONE-WAY ANALYSIS OF VARIANCE.
January 31 and February 3,  Some formulae are presented in this lecture to provide the general mathematical background to the topic or to demonstrate.
t(ea) for Two: Test between the Means of Different Groups When you want to know if there is a ‘difference’ between the two groups in the mean Use “t-test”.
Sociology 5811: Lecture 14: ANOVA 2
Hypothesis Testing Using the Two-Sample t-Test
Statistics 11 Confidence Interval Suppose you have a sample from a population You know the sample mean is an unbiased estimate of population mean Question:
Chapter 13 Analysis of Variance (ANOVA) PSY Spring 2003.
One-way Analysis of Variance 1-Factor ANOVA. Previously… We learned how to determine the probability that one sample belongs to a certain population.
ANOVA (Analysis of Variance) by Aziza Munir
Psychology 301 Chapters & Differences Between Two Means Introduction to Analysis of Variance Multiple Comparisons.
Between-Groups ANOVA Chapter 12. >When to use an F distribution Working with more than two samples >ANOVA Used with two or more nominal independent variables.
Hypothesis testing Intermediate Food Security Analysis Training Rome, July 2010.
 Slide 1 Two-Way Independent ANOVA (GLM 3) Chapter 13.
Chapter 10: Analyzing Experimental Data Inferential statistics are used to determine whether the independent variable had an effect on the dependent variance.
Statistics for the Social Sciences Psychology 340 Fall 2013 Tuesday, October 15, 2013 Analysis of Variance (ANOVA)
Statistics for the Social Sciences Psychology 340 Fall 2012 Analysis of Variance (ANOVA)
DIRECTIONAL HYPOTHESIS The 1-tailed test: –Instead of dividing alpha by 2, you are looking for unlikely outcomes on only 1 side of the distribution –No.
Chapter 13 - ANOVA. ANOVA Be able to explain in general terms and using an example what a one-way ANOVA is (370). Know the purpose of the one-way ANOVA.
Marshall University School of Medicine Department of Biochemistry and Microbiology BMS 617 Lecture 13: One-way ANOVA Marshall University Genomics Core.
Chapter 13 For Explaining Psychological Statistics, 4th ed. by B. Cohen 1 Chapter 13: Multiple Comparisons Experimentwise Alpha (α EW ) –The probability.
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.
DTC Quantitative Methods Bivariate Analysis: t-tests and Analysis of Variance (ANOVA) Thursday 14 th February 2013.
Statistics for the Social Sciences Psychology 340 Spring 2009 Analysis of Variance (ANOVA)
Tests after a significant F
Introduction to ANOVA Research Designs for ANOVAs Type I Error and Multiple Hypothesis Tests The Logic of ANOVA ANOVA vocabulary, notation, and formulas.
Handout Six: Sample Size, Effect Size, Power, and Assumptions of ANOVA EPSE 592 Experimental Designs and Analysis in Educational Research Instructor: Dr.
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.
Independent Samples ANOVA. Outline of Today’s Discussion 1.Independent Samples ANOVA: A Conceptual Introduction 2.The Equal Variance Assumption 3.Cumulative.
Simple Statistical Designs One Dependent Variable.
©2013, The McGraw-Hill Companies, Inc. All Rights Reserved Chapter 4 Investigating the Difference in Scores.
Between-Groups ANOVA Chapter 12. Quick Test Reminder >One person = Z score >One sample with population standard deviation = Z test >One sample no population.
Posthoc Comparisons finding the differences. Statistical Significance What does a statistically significant F statistic, in a Oneway ANOVA, tell us? What.
Data Screening. What is it? Data screening is very important to make sure you’ve met all your assumptions, outliers, and error problems. Each type of.
Repeated-Measures ANOVA
Presentation transcript:

One-Way Analysis of Variance (ANOVA)

Aside I dislike the ANOVA chapter (11) in the book with a passion – if it were all written like this I wouldn’t use the thing Therefore, don’t worry if you don’t understand it, use my notes – Exam questions on ANOVA will come from my lectures and notes

One-Way ANOVA One-Way Analysis of Variance aka One-Way ANOVA Most widely used statistical technique in all of statistics One-Way refers to the fact that only one IV and one DV are being analyzed (like the t-test) i.e. An independent-samples t-test with treatment and control groups where the treatment (present in the tx grp and absent in the control grp) is the IV

One-Way ANOVA Unlike the t-test, the ANOVA can look at levels or subgroups of IV’s The t-test can only test if an IV is there or not, not differences between subgroups of the IV I.e. our experiment is to test the effect of hair color (our IV) on intelligence One t-test can only test if brunettes are smarter than blondes, any other comparison would involve doing another t-test A one-way ANOVA can test many subgroups or levels of our IV “hair color”, for instance blondes, brunettes, and redheads are all subtypes of hair color, can so can be tested with one one-way ANOVA

One-Way ANOVA Other examples of subgroups: If “race” is your IV, then caucasian, african-american, asian-american, hispanic (4) are all subgroups/levels If “gender” is your IV, than male and female (2) are your levels If “treatment” is your IV, then some treatment, a little treatment, and a lot of treatment (3) can be your levels

One-Way ANOVA OK, so why not just do a lot of t-tests and keep things simple? Many t-tests will inflate our Type I Error rate! This is an example of using many statistical tests to evaluate one hypothesis – see: the Bonferroni Correction It is less time consuming There is a simple way to do the same thing in ANOVA, they are called post-hoc tests, and we will go over them later on However, with only one DV and one IV (with only two levels), the ANOVA and t-test are mathematically identical, since they are essentially derived from the same source

One-Way ANOVA Therefore, the ANOVA and the t-test have similar assumptions: Assumption of Normality Like the t-test you can place fast and loose with this one, especially with large enough sample size – see: the Central Limit Theorem Assumption of Homogeneity of Variance (Homoscedasticity) Like the t-test, this isn’t problematic unless one level’s variance is much larger than one the others (~4 times as large) – the one-way ANOVA is robust to small violations of this assumption, so long as group size is roughly equal

One-Way ANOVA Independence of Observations Like the t-test, the ANOVA is very sensitive to violations of this assumption – if violated it is more appropriate to use a Repeated-Measures ANOVA

One-Way ANOVA Hypothesis testing in ANOVA: Since ANOVA tests for differences between means for multiple groups or levels of our IV, then H1 is that there is a difference somewhere between these group means H1 = μ1 ≠ μ2 ≠ μ3 ≠ μ4, etc… Ho = μ1 = μ2 = μ3 = μ4, etc… These hypothesis are called omnibus hypothesis, and tests of these hypotheses omnibus tests

One-Way ANOVA However, our F-statistic does not tell us where this difference lies If we have 4 groups, group 1 could differ from groups 2-4, groups 2 and 4 could differ from groups 1 and 3, group 1 and 2 could differ from 3, but not 4, etc. Since our hypothesis should be as precise as possible (presuming you’re researching something that isn’t completely new), you will want to determine the precise nature of these differences You can do this using multiple comparison techniques (more on this later)

One-Way ANOVA The basic logic behind the ANOVA: The ANOVA yields and F-statistic (just like the t-test gave us a t-statistic) The basic form of the F-statistic is: MStreatment/MSerror MS = mean square or the mean of squares (why it is called this will be more obvious later)

One-Way ANOVA The basic logic behind the ANOVA: MSbetween or MStreatment = average variability (variance) between the levels of our IV/groups Ideally we want to maximize MStreatment, because we’re predicting that our IV will differentially effect our groups i.e. if our IV is treatment, and the levels are no treatment vs. a lot of treatment, we would expect the treatment group mean to be very different than the no treatment mean – this results in lots of variability between these groups

One-Way ANOVA The basic logic behind the ANOVA: MSwithin or MSerror = average variance among subjects in the same group Ideally we want to minimize MSerror, because ideally our IV (treatment) influences everyone equally – everyone improves, and does so at the same rate (i.e. variability is low) If F = MStreatment/ MSerror, then making MStreatment large and MSerror small will result in a large value of F Like t, a large value corresponds to small p-values, which makes it more likely to reject Ho

One-Way ANOVA However, before we calculate MS, we need to calculate what are called sums of squares, or SS SS = the sum of squared deviations around the mean Does this sound familiar? What does this sound like? Just like MS, we have SSerror and SStreatment Unlike MS, we also have SStotal = SSerror + SStreatment

One-Way ANOVA SStotal = Σ(Xij - )2 = It’s the formula for our old friend variance, minus the n-1 denominator! Note: N = the number of subjects in all of the groups added together

One-Way ANOVA SStreatment = This means we: Subtract the grand mean, or the mean of all of the individual data points, from each group mean Square these numbers Multiply them by the number of subjects from that particular group Sum them Note: n = number of subjects per group Hint: The number of numbers that you sum should equal the number of groups

One-Way ANOVA That leaves us with SSerror = SStotal – SStreatment Remember: SStotal = SSerror + SStreatment Degrees of freedom: Just as we have SStotal,SSerror, and SStreatment, we also have dftotal, dferror, and dftreatment dftotal = N – 1 OR the total number of subjects in all groups minus 1 dftreatment = k – 1 OR the number of levels of our IV (aka groups) minus 1 dferror = N – k OR the total number of subjects minus the number of groups OR dftotal - dftreatment

One-Way ANOVA Now that we have our SS and df, we can calculate MS MStreatment = SStreatment/dftreatment MSerror = SSerror/dferror Remember: MSbetween or MStreatment = average variability (variance) between the levels of our IV/groups MSwithin or MSerror = average variance among subjects in the same group

One-Way ANOVA We then use this to calculate our F-statistic: F = MStreatment/ MSerror The p-value associated with this F-statistic is a function of both F and your df Higher F and/or df  Lower p Recall: df = n & # levels of your IV More S’s and/or fewer levels  Higher df  Lower p

One-Way ANOVA How can we change our experiment to increase the likelihood of a significant result/decrease p? Larger ES  Higher F: Increase the potency of the IV Higher df More S’s Fewer # levels of your IV Collapse across groups – Instead of looking at Kids vs. Young Adults vs. Adults, look at Children vs. Adults only Worst way to decrease p as this sacrifices how subtle-ly you can test your theory

One-Way ANOVA Example: What effect does smoking have on performance? Spilich, June, and Renner (1992) asked nonsmokers (NS), smokers who had delayed smoking for three hours (DS), and smokers who were actively smoking (AS) to perform a pattern recognition task in which they had to locate a target on a screen. The data follow:

One-Way ANOVA Example: What is the IV, number of levels, and the DV? What is H1 and Ho? What is your dftotal, dfgroups, and dferror? Non-Smokers Delayed Smokers Active Smokers 9 12 8 7 14 10 4 1 11 16 17 19 5 6 22 18

One-Way ANOVA

One-Way ANOVA Example: Based on these results, would you reject or fail to reject Ho? What conclusion(s) would you reach about the effect of the IV on the DV?

One-Way ANOVA Assumptions of ANOVA: Independence of Observations Homoscedasticity Normality Equal sample sizes – not technically an assumption, but effects the other 3 How do we know if we violate one (or more) of these? What do we do?

One-Way ANOVA Independence of Observations Equal Sample Sizes Identified methodologically Other than using repeated-measures tests (covered later), nothing you can do Equal Sample Sizes Add more S’s to the smaller group DON’T delete S’s from the larger one

One-Way ANOVA Homoscedasticity Identified using Levene’s Test or the Welch Procedure Again, don’t sweat the book, SPSS will do it for you If detected (and group sizes very unequal), use appropriate transformation

One-Way ANOVA Homoscedasticity

One-Way ANOVA Normality Can identify with histograms of DV’s (IV’s are supposed to be non-normal) More appropriate to use skewness and kurtosis statistics If detected (and sample size very small), use appropriate transformation

One-Way ANOVA Normality Divide statistic by its standard error to get z-score Calculate p-value using z-score and df = n

One-Way ANOVA Estimates of Effect Size in ANOVA: η2 (eta squared) = SSgroup/SStotal Unfortunately, this is what most statistical computer packages give you, because it is simple to calculate, but seriously overestimates the size of effect ω2 (omega squared) = Less biased than η2, but still not ideal

One-Way ANOVA Estimates of Effect Size in ANOVA: Cohen’s d = Remember: for d, .2 = small effect, .5 = medium, and .8 = large

One-Way ANOVA Multiple Comparison Techniques: Remember: ANOVA tests for differences somewhere between group means, but doesn’t say where H1 = μ1 ≠ μ2 ≠ μ3 ≠ μ4, etc… If significant, group 1 could be different from groups 2-4, groups 2 & 3 could be different from groups 1 and 4, etc. Multiple comparison techniques attempt to detect specifically where these differences lie

Multiple Comparison Techniques You could always run 2-sample t-tests on all possible 2-group combinations of your groups, although with our 4 group example this is 6 different tests Running 6 tests @ (α = .05) = (α = .05 x 6 = .3)  This would inflate what is called the familywise error rate – in our previous example, all of the 6 tests that we run are considered a family of tests, and the familywise error rate is the α for all 6 tests combined (.3) – however, we want to keep this at .05

Multiple Comparison Techniques To perform multiple comparisons with a significant omnibus F, or not to … Why would you look for a difference between two or more groups when your F said there isn’t one?

Multiple Comparison Techniques Some say this is what is called statistical fishing and is very bad – you should not be conducting statistical tests willy-nilly without just cause or a theoretical reason for doing so Think of someone fishing in a lake, you don’t know if anything is there, but you’ll keep trying until you find something – the idea is that if your hypothesis is true, you shouldn’t have to look to hard to find it, because if you look for anything hard enough you tend to find it

Multiple Comparison Techniques However, others would say that the omnibus test is underpowered, particularly with a large number of groups and if only a few significant differences are predicted among them i.e. H1 = μ1 ≠ μ2 ≠ μ3 ≠ μ4 … μ10 If you only predict groups 1 and 5 will differ, you are unlikely to get a significant omnibus F unless you have a ton of S’s I and most statisticians fall on this side of the argument – i.e. it’s OK to ignore the omnibus test if you have a theoretical reason to predict specific differences among groups

A Priori Techniques A priori techniques: Multiple t Tests Planned prior to data collection Involve specific hypotheses between group means (i.e. not just testing all group differences) Multiple t Tests As stated previously, not a good idea bc/  inflated  Involves a different formula than a traditional t test Bonferroni t (Dunn’s Test) Simply using the Bonferroni Correction on a bunch of regular t tests For 6 comparisons:  = .05/6 = .0083 Can combine the Bonferroni correction with the adjusted formula for t used above

A Priori Techniques Dunn-Šidák Test Almost identical to the Bonferroni t, but uses 1 – (1 - )1/c instead of /c, where c = # of comparisons Slightly less conservative For 6 comparisons = 1-(1-.05)1/6 = .0085

A Priori Techniques Holm Test Instead of assuming we evaluate hypotheses all at once, allows for ordering of when hypotheses are evaluated Uses most stringent  for hypothesis w/ strongest support (largest t) Adjusts  downward for next comparisons, taking into account that previous comparison was significant More powerful than Bonferroni t & Dunn-Šidák Test Calculate t tests for all comparisons Arrange t’s in decreasing order For 1st t test, use Dunn-Šidák method with normal c For 2nd t test, use c – 1 For 3rd t test, use c – 2, etc. Continue until a nonsignificant result is obtained

A Priori Techniques Linear Contrasts What if, instead of comparing group x to group y, we want to compare group x, y, & z to group a & b? Coefficients – how to tell mathematically which groups we are comparing Coefficients for the same groups have to be the same and all coefficients must add up to 0 Comparing groups 1, 2, & 3 to groups 4 & 5: Groups 1 – 3: Coefficient = 2 Groups 4 & 5: Coefficient = -3 Use Bonferroni correction to adjust  to # of contrasts 4 contrasts  use  = .05/4 = .0125

A Priori Techniques Orthogonal Contrasts What if you want to compare groups within a contrast? I.e. Group 1 vs. Groups 2 & 3 and Group 2 vs. Group 3 Assigning coefficients is the same, but calculations are different (don’t worry about how different, just focus on the linear vs. orthogonal difference)

A Priori Techniques Both the Holm Test and linear/orthogonal contrasts sound good, which do I use? If making only a few contrasts: Linear/Orthogonal If making many contrasts: Holm Test More powerful and determining coefficients is confusing with multiple contrasts

Post Hoc Techniques Post hoc techniques: Fisher’s LSD We replace in our 2-sample t-test formula with MSerror, and we get: We then test this using a critical t, using our t-table and dferror as our df You can use either a one-tailed or two-tailed test, depending on whether or not you think one mean is higher or lower (one-tailed) or possibly either (two-tailed) than the other

Post Hoc Techniques Fisher’s LSD Newman-Keuls Test However, with more than 3 groups, using Fisher’s LSD results in an inflation of  (i.e. with 4 groups α = .1) You could use the Bonferroni method to correct for this, but then why not just use it in the first place? This is why Fisher’s LSD is no longer widely used and other methods are preferred Newman-Keuls Test Like Fisher’s LSD, allows the familywise  > .05 Pretty crappy test for that reason

Post Hoc Techniques Scheffé’s Test Fishers LSD & Neuman-Keuls = not conservative enough = too easy to find significant results Scheffé’s Test = too conservative = result in a low degree of Type I Error but too high Type II Error (incorrectly rejects H1) = too hard to find significant results Tukey’s Honestly Significant Difference (HSD) test Very popular, but conservative

Post Hoc Techniques Ryan/Einot/Gabriel/Welsch (REGWQ) Procedure Like Tukey’s HSD, but adjusts  (like the Dunn-Šidák Test) to make the test less conservative Good compromise of Type I/Type II Error Dunnett’s Test Specifically designed for comparing a control group with several treatment groups Most powerful test in this case

One-Way ANOVA Reporting and Interpreting Results in ANOVA: We report our ANOVA as: F(dfgroups, dftotal) = x.xx, p = .xx, d = .xx i.e. for F(4, 299) = 1.5, p = .01, d = .01 – We have 5 groups, 300 subjects total in all of our groups put together; We can reject Ho, however our small effect size statistic informs us that it may be our large sample size that resulted in us doing so rather than a large effect of our IV