300 likes | 424 Views
ANALYSIS OF VARIANCE. ANOVA. Testing: Ho: μ 1 = μ 2 = μ 3 …… μ k k = no. of exp. groups or samples. ANOVA. SS = sum of squared deviations, an estimate of variability, always affected by sample size Response variable = dependent variable ( y ) = variable measured by each data point
E N D
ANOVA Testing: Ho: μ1 = μ2 = μ3…… μk k = no. of exp. groups or samples
ANOVA • SS= sum of squared deviations, an estimate of variability, always affected by sample size • Response variable= dependent variable (y) = variable measured by each data point • Factor = grouping variable = categorical variable used to place each datum in a particular group. Factor is the independent variable (x) • Level = category of the factor
One-way (one-factor) ANOVA Q: Does smoking while pregnant affect birth weight? • Birth weights of babies are grouped according to smoking status of mother • Response variable – birth weight • Factor – smoking status of mother • Levels – non-smoking, 1-pack/day, 1+ pack/day
One-way (one-factor) ANOVA • 12 babies weighed for each factor
One-way (one-factor) ANOVA • Key to understanding an ANOVA is to understand the sources of variation • VARIABILITY = property of being different
One-way (one-factor) ANOVA Sources of variation in a one-way ANOVA: TOTALVARIATION = variability of all data points (from the grand mean)
One-way (one-factor) ANOVA Sources of variation in a one-way ANOVA: GROUP VARIATION= variability of group means • How different is each group mean from the grand mean? • If group means are far apart, we are more likely to reject Ho that means are equal
One-way (one-factor) ANOVA Sources of variation in a one-way ANOVA: ERROR VARIATION= variability within groups • Measures variability caused by everything else other than smoking • How accurate are our group mean estimates?
One-way (one-factor) ANOVA Partitioning of variability: so that we can test the null hypothesis TOTAL SS = GROUP SS + ERROR SS
TotalSS = (X – Xgrand)2 One-way (one-factor) ANOVA Partitioning of variability:
GroupSS = ngroup (Xgroup – Xgrand)2 One-way (one-factor) ANOVA Partitioning of variability:
ErrorSS = (Xgroup – Xgroup)2 One-way (one-factor) ANOVA Partitioning of variability:
ANOVA table: Source SS DF MS Total Groups Error 8747373 3127499 5619874 35 2 33 249924.9 1563749.5 170299.2 One-way (one-factor) ANOVA Ho: μ1 = μ2 = μ3
Total SS 8747374 Total DF 35 One-way (one-factor) ANOVA • Total SS: total number of observations • Degrees of Freedom = n-1 Total MS = 249924.9 = =
Group SS 3131556 Group MS = 1565778 = = Group DF 2 One-way (one-factor) ANOVA • Group Degrees of Freedom = k – 1
Error SS 5619878 Error MS = 170299.3 = = Error DF 33 One-way (one-factor) ANOVA • Error Degrees of Freedom = N – k
One-way (one-factor) ANOVA Ho: μ1 = μ2 = μ3 Reject HO if group means are far apart relative to the amount of error involved in estimating them Group MS – variance measuring how far apart group means are from each other Error MS – variance measuring random sampling error involved in estimating mean
REJECT THE NULL HYPOTHESIS One-way (one-factor) ANOVA IF: Group MS is significantly greater than Error MS
Group MS 1565778 F = = = 9.194 Error MS 170299.3 One-way (one-factor) ANOVA DF numerator = group DF (k-1) = 2 DF denominator = error DF (n-k) = 33 F statistic is one-tailed
One-way (one-factor) ANOVA From Table, probability of an F = 9.194 with 2 and 30 DF is 0.001>p>0.0005 Reject the Null Hypothesis Smoking does affect birth weight
Group SS 3127499 r2= = = 35.7% Total SS 8747373 One-way (one-factor) ANOVA • Coefficient of determination (r2) • Explained variation (Group SS) as a proportion of total variation (Total SS) • Smoking explains about 36% of the variation in birth weight
TotalSS = (X – Xgrand)2 GroupSS = ngroup (Xgroup – Xgrand)2 Example In a hypothetical experiment, Aspirin, Panado, and a placebo were tested to see how much pain relief each provides. Pain relief was rated on a five-point scale. Four subjects were tested per group. Is there a difference between the three groups? (Xgroup – Xgroup)2 ErrorSS =
SPSS One-Way ANOVA
Analysis of Variance • ANOVA tests for a difference in the means of 3 or more groups • Dependent variable (y): Response • Independent variable (x): Predictor • As with the independent samples t-test, the data (y) must be coded with a group variable (x)
Example A researcher has collected a species of lizard from three different island populations. Each island represents a different eco-zone. He collects 10 lizards from each island and measures their running speed Test whether lizards from the different islands differ in their running speeds
One-Way ANOVA • Use the following for a simple one-way ANOVA • From the menus choose: Analyze Compare Means One-Way ANOVA • Select one or more dependent variables • Select a single independent grouping variable (factor) • Variables must be numeric
ANOVA Results • Is there a significant difference?
Post Hoc Tests • Multiple comparison tests • Once you know that differences exist among the means, post hoc tests can determine which means differ • These test the difference between each pair of means and yield a matrix where significantly different group means are indicated
Tukey HSD • Tukey Honestly Significant Difference • In the One-Way ANOVA dialog box, click Post Hoc, and select Tukey