1 ANALYSIS OF VARIANCE (ANOVA) Heibatollah Baghi, and Mastee Badii.

Slides:



Advertisements
Similar presentations
Lecture 2 ANALYSIS OF VARIANCE: AN INTRODUCTION
Advertisements

Statistics Review – Part II Topics: – Hypothesis Testing – Paired Tests – Tests of variability 1.
Independent t -test Features: One Independent Variable Two Groups, or Levels of the Independent Variable Independent Samples (Between-Groups): the two.
PSY 307 – Statistics for the Behavioral Sciences
Independent Sample T-test Formula
Introduction to Analysis of Variance CJ 526 Statistical Analysis in Criminal Justice.
Introduction to Analysis of Variance CJ 526 Statistical Analysis in Criminal Justice.
ANOVA Analysis of Variance: Why do these Sample Means differ as much as they do (Variance)? Standard Error of the Mean (“variance” of means) depends upon.
Chapter 3 Analysis of Variance
Intro to Statistics for the Behavioral Sciences PSYC 1900 Lecture 17: Repeated-Measures ANOVA.
PSY 307 – Statistics for the Behavioral Sciences
Independent t-Test CJ 526 Statistical Analysis in Criminal Justice.
Lecture 9: One Way ANOVA Between Subjects
Two Groups Too Many? Try Analysis of Variance (ANOVA)
One-way Between Groups Analysis of Variance
Analysis of Variance & Multivariate Analysis of Variance
Independent Sample T-test Classical design used in psychology/medicine N subjects are randomly assigned to two groups (Control * Treatment). After treatment,
Statistical Methods in Computer Science Hypothesis Testing II: Single-Factor Experiments Ido Dagan.
Introduction to Analysis of Variance (ANOVA)
Go to Table of ContentTable of Content Analysis of Variance: Randomized Blocks Farrokh Alemi Ph.D. Kashif Haqqi M.D.
Statistical Analysis. Purpose of Statistical Analysis Determines whether the results found in an experiment are meaningful. Answers the question: –Does.
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.
Estimation and Hypothesis Testing Faculty of Information Technology King Mongkut’s University of Technology North Bangkok 1.
Statistical Analysis Statistical Analysis
ANOVA Analysis of Variance.  Basics of parametric statistics  ANOVA – Analysis of Variance  T-Test and ANOVA in SPSS  Lunch  T-test in SPSS  ANOVA.
QNT 531 Advanced Problems in Statistics and Research Methods
ANOVA Greg C Elvers.
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.
1 Level of Significance α is a predetermined value by convention usually 0.05 α = 0.05 corresponds to the 95% confidence level We are accepting the risk.
© 2003 Prentice-Hall, Inc.Chap 11-1 Analysis of Variance IE 340/440 PROCESS IMPROVEMENT THROUGH PLANNED EXPERIMENTATION Dr. Xueping Li University of Tennessee.
One-Way Analysis of Variance Comparing means of more than 2 independent samples 1.
1 Testing Statistical Hypothesis for Dependent Samples.
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-TEST Statistics The t test is used to compare to groups to answer the differential research questions. Its values determines the difference by comparing.
PSY 307 – Statistics for the Behavioral Sciences Chapter 16 – One-Factor Analysis of Variance (ANOVA)
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:
1 Testing Statistical Hypothesis Independent Sample t-Test Heibatollah Baghi, and Mastee Badii.
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.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 10-1 Chapter 10 Analysis of Variance Statistics for Managers Using Microsoft.
Chapter 10: Analyzing Experimental Data Inferential statistics are used to determine whether the independent variable had an effect on the dependent variance.
1 Review of ANOVA & Inferences About The Pearson Correlation Coefficient Heibatollah Baghi, and Mastee Badii.
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 =
Essential Question:  How do scientists use statistical analyses to draw meaningful conclusions from experimental results?
Independent t-Test CJ 526 Statistical Analysis in Criminal Justice.
ANOVA: 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.
Previous Lecture: Phylogenetics. Analysis of Variance This Lecture Judy Zhong Ph.D.
Copyright © Cengage Learning. All rights reserved. 12 Analysis of Variance.
Hypothesis test flow chart frequency data Measurement scale number of variables 1 basic χ 2 test (19.5) Table I χ 2 test for independence (19.9) Table.
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.
The p-value approach to Hypothesis Testing
1 Testing Statistical Hypothesis The One Sample t-Test Heibatollah Baghi, and Mastee Badii.
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.
HYPOTHESIS TESTING FOR DIFFERENCES BETWEEN MEANS AND BETWEEN PROPORTIONS.
1/54 Statistics Analysis of Variance. 2/54 Statistics in practice Introduction to Analysis of Variance Analysis of Variance: Testing for the Equality.
©2013, The McGraw-Hill Companies, Inc. All Rights Reserved Chapter 4 Investigating the Difference in Scores.
 List the characteristics of the F distribution.  Conduct a test of hypothesis to determine whether the variances of two populations are equal.  Discuss.
Oneway ANOVA comparing 3 or more means. Overall Purpose A Oneway ANOVA is used to compare three or more average scores. A Oneway ANOVA is used to compare.
Chapter 15 Analysis of Variance. The article “Could Mean Platelet Volume be a Predictive Marker for Acute Myocardial Infarction?” (Medical Science Monitor,
Chapter 10 Two-Sample Tests and One-Way ANOVA.
Factorial Experiments
Math 4030 – 10b Inferences Concerning Variances: Hypothesis Testing
i) Two way ANOVA without replication
Statistics for Business and Economics (13e)
Chapter 11 Analysis of Variance
One way ANALYSIS OF VARIANCE (ANOVA)
Statistics for the Social Sciences
Presentation transcript:

1 ANALYSIS OF VARIANCE (ANOVA) Heibatollah Baghi, and Mastee Badii

2 Purpose of ANOVA Use one-way Analysis of Variance to test when the mean of a variable (Dependent variable) differs among three or more groups –For example, compare whether systolic blood pressure differs between a control group and two treatment groups

3 Purpose of ANOVA One-way ANOVA compares three or more groups defined by a single factor. –For example, you might compare control, with drug treatment with drug treatment plus antagonist. Or might compare control with five different treatments. Some experiments involve more than one factor. These data need to be analyzed by two-way ANOVA or Factorial ANOVA. –For example, you might compare the effects of three different drugs administered at two times. There are two factors in that experiment: Drug treatment and time.

4 Why not do repeated t-tests? Rather than using one-way ANOVA, you might be tempted to use a series of t tests, comparing two groups each time. Don’t do it. Repeated t-test increase the chances of type I error or multiple comparison problem If you are making comparison between 5 groups, you will need 10 comparison of means When the null hypothesis is true the probability that at least 1 of the 10 observed significance levels is less than 0.05 is about 0.29

5 Why not do repeated t-tests? With 10 means (45 comparisons), the probability of finding at least one significant difference is about 0.63 In other words, when level of significance is.05, there is a 1 in 20 chance that one t-test will yield a significant result even when the null hypothesis is true. The more t-test the more that probability will increase

6 What Does ANOVA Do? ANOVA involves the partitioning of variance of the dependent variable into different components: –A. Between Group Variability –B. Within Group Variability More Specifically, The Analysis of Variance is a method for partitioning the Total Sum of Squares into two Additive and independent parts.

7 Definition of Total Sum of Squares or Variance Case Group 1 Group 2… Group p 1X 11 X 21 …X p1 2X 12 X 22 …X p2 3X 13 X 23 …X p3 ……….. nX 1n X 2n..X pn Summed across all n times p observations Grand average

8.j Definition of Between Sum of Squares Case Group 1 Group 2… Group p 1X 11 X 21 …X p1 2X 12 X 22 …X p2 3X 13 X 23 …X p3 ……….. nX 1n X 2n..X pn Average of group j Grand average Sum of squared differences of group means from the grand mean is SS B

9 Definition of Within Sum of Squares Case Group 1 Group 2… Group p 1X 11 X 21 …X p1 2X 12 X 22 …X p2 3X 13 X 23 …X p3 ……….. nX 1n X 2n..X pn Sum of squared difference of observations from group means Observations Group mean

10 Partitioning of Variance into Different Components Total sum of squares Between groups sum of squares Within groups sum of squares

11 Test Statistic in ANOVA Test statistic for ANOVA is based on between & within groups SS

12 Test Statistic in ANOVA F = Between group variability / Within group variability –The source of Within group variability is the individual differences. –The source of Between group variability is effect of independent or grouping variables. –Within group variability is sampling error across the cases –Between group variability is effect of independent groups or variables

13 Steps in Test of Hypothesis 1.Determine the appropriate test 2.Establish the level of significance:α 3.Determine whether to use a one tail or two tail test 4.Calculate the test statistic 5.Determine the degree of freedom 6.Compare computed test statistic against a tabled/critical value Same as Before

14 1. Determine the Appropriate Test Independent random samples have been taken from each population Dependent variable population are normally distributed (ANOVA is robust with regards to this assumption) Population variances are equal (ANOVA is robust with regards to this assumption) Subjects in each group have been independently sampled

15 2. Establish Level of Significance α is a predetermined value The convention α =.05 α =.01 α =.001

16 3. Use a Two Tailed Test H o :  1 =  2 =  3 =  4 Where  1 = population mean for group 1  2 = population mean for group 2  3 = population mean for group 3  4 = population mean for group 4 H 1 = not H o

17 3. Use a Two Tailed Test H a = not H o The alternative hypothesis does not specify whether –  1   2 or –  2   3 or –  1   3

18 4. Calculating Test Statistics F = (SS b / df B ) / (SS w / df w ) Sum of square between Degrees of freedom between Sum of square within Degrees of freedom within

19 4. Calculating Test Statistics By dividing the sum of the squared deviations by degrees of freedom, we are essentially computing an “average” (or mean) amount of variation The specific name for the numerator of the F statistic is the mean square between (the average amount of between-group variation The specific name for the denominator of the F statistic is the mean square within (the average amount of within- group variation)

20 5. Determine Degrees of Freedom Degrees of freedom between –df B = k – 1 –K = number of groups Degrees of freedom within –df w = N – k –N = total number of subjects in the study

21 6. Compare the Computed Test Statistic Against a Tabled Value α =.05 If F c > F α Reject H 0 If F c > F α Can not Reject H 0

22 Example Suppose we had patients with myocardial infarction in the following groups: –Group 1: A music therapy group –Group 2: A relaxation therapy group –Group 3: A control group 15 patients are randomly assigned to the 3 groups and then their stress levels are measured to determine if the interventions were effective in minimizing stress.

23 Example Dependent Variable – The stress scores. The ranges are from zero (no stress) to 10 (extreme stress) Independent Variable or Factor – Treatment Conditions(3 levels)

24 Observations

25 Sum of Squares for Each Group Group 1 0 Group 2 1 Group SS 1 = 20SS 2 = 10 SS 3 = 16 n1=5n2= 5n3 = 5

26 SS Within

27 Number of cases SS Between Group 2 average Group 1 average Group 3 average Grand average

28 Sum of Squares Total

29 Components of Variance SS Total = SS Between + SS Within 116 =

30 Degrees of Freedom Df between = 3 -1 Df within = df B = k – 1 df w = N – k

31 Test Statistic MS Between = 70 / 2 = 35 MS Within = 46 / 12 = 3.83 F c = MS Between / MS Within F c = 35 / 3.83 = 9.13

32 Lookup Critical Value F α = 3.88

33 Conclusions F c = 9.13 > F α = 3.88 F c > F α Therefore Reject H 0

34 One-way ANOVA Summary SourceSSDFMSFcFc FαFα Between Within Total11614

35 Multiple Comparison Groups F test does not tell which pair are not equal Additional analysis is necessary to answer which pair are not equal

36 Fisher’s LSD Test These are the null and alternative hypothesis being tested –H o1 : µ1 = µ2H a1 : µ1  µ2 –H o2 : µ1 = µ3 Ha2 : µ1  µ3 –H o3 : µ2 = µ3H a3 : µ2  µ3

37 Fisher’s LSD Test Known as the protected t-test The least difference between means needed for significance Df = N – K Use the following formula:

38 Calculation of LSD All pairs for means differing by at least 2.70 points on the stress scale would be significantly different from on another.

39 Application to Three Samples Mean 1 – Mean 2 = 1 Mean 3 – Mean 1 = 4 Mean 3 – Mean 2 = 5 Alternative Hypotheses: H o1 :µ1 = µ2 Not Rejected H o2 :µ1 = µ3 Rejected H o3 :µ2 = µ3 Rejected

40 Use of SPSS in ANOVA

41 Data in SPSS Input Format Stress ScoreGroups

42 SPSS Output for ANOVA Descriptives Stress Levels Music Therapy Relaxation Therapy Control Group NMeanStd. DeviationStd. Error 95% Confidence Interval for MeanMinimumMaximum Lower Bound Upper Bound Total

43 SPSS Output for ANOVA Test of Homogeneity of Variances Stress Levels. Levene Statisticdf1df2 Sig level or p- value Stress Levels Between Groups Within Groups Sum of Squaresdf Mean SquareF Sig.level or p- value Total P<.05, therefore, we reject the Null Hypothesis and continue with Multiple Comparison Table P >.05, therefore, th assumption of Homogeneity of Variance is met. ANOVA

44 SPSS Output for ANOVA Multiple Comparisons Dependent Variable: Stress Levels LSD Music TherapyRelaxation Therapy Control Group (*) Relaxation Therapy Music Therapy Control Group (*) Control GroupMusic Therapy 4.000(*) Relaxation Therapy 5.000(*) (I) Groups(J) Groups Mean Difference (I-J)Std. Error Sig. Level95% Confidence Interval * The mean difference is significant at the.05 level.

45 Take home lesson How to compare means of three or more samples