Download presentation
Presentation is loading. Please wait.
Published byRosaline McKenzie Modified over 9 years ago
1
The idea of ANOVA Comparing several means The problem of multiple comparisons The ANOVA F test 1
2
Values of a quantitative random variable are of interest ◦ score, cholesterol level, etc. We will compare several groups described or labeled by values of one (typically) categorical random variable ◦ gender, age group, etc. This is One-Way ANOVA Compare means of several groups Question: The difference between the group means, are they statistically significant?
3
The Idea of ANOVA When comparing different populations or treatments, the data are subject to sampling variability. We can pose the question for inference in terms of the mean response. Analysis of variance (ANOVA) is the technique used to compare several means. One-way ANOVA is used for situations in which there is only one factor, or only one way to classify the populations of interest. Two-way ANOVA is used to analyze the effect of two factors. 3
4
Example 1: Numbers of days for healing a standard wound (in an animal) for several treatments Example 2: Wages of different ethnic groups in a company Example 3: Lifetimes of different brands of tires If comparing means of two groups, ANOVA is equivalent to a 2-sample (two-sided) pooled t-test ANOVA allows for 3 or more groups
5
Goal: test H 0 : μ 1 = μ 2 against H a : μ 1 ≠ μ 2 σ 1, σ 2 are unknown but assumed to be equal ◦ The pooled t test statistic is given in 7.2 (p. 499) Then the ANOVA test statistic (denoted by an F) is the square of the t-statistic.
7
Graphical investigation: ◦ side-by-side box plots ◦ multiple histograms Whether the differences between the groups are significant depends on ◦ the difference in the means ◦ the standard deviations of each group ◦ the sample sizes
8
Are the means significantly different?
9
Difference in means more plausible. (Still depends on sample sizes.)
10
ANOVA tests the following hypotheses: ◦ H 0 : 1 = 2 = 3 = … = I (the means of all the groups are equal) ◦ H a : Not all the means are equal Does not say how or which ones differ Can follow up with “multiple comparisons”, to check which pairs differ We refer to the sub-populations as “groups”
11
N = number of individuals all together I = number of groups = (grand) mean for entire data set Group i has ◦ n i = # of individuals in group i ◦ x ij = value for individual j in group i ◦ = sample mean for group i ◦ s i = sample standard deviation for group i
12
DATA=FIT+RESIDUAL µ i = population mean for group i Note: the standard deviations are assumed to be equal among all groups
13
Rule for examining SD for ANOVA: ◦ If the largest standard deviation (s) is less than twice the smallest standard deviation than we may still assume that SD (σ) is constant among groups (and we can use ANOVA). Pooled variance and standard deviation:
16
A study of reading comprehension in children compared three methods of instruction. Several pretest variables were measured before any instruction was given. One purpose of the pretest was to see if the three groups of children were similar in their comprehension skills. The three methods or instruction are called basal, DRTA, and strategies. We use Basal, DRTA, and Strat as values for the categorical variable indicating which method each student received.
18
Are (were) the groups the same with regard to reading ability before instruction? Hypotheses: First check ANOVA assumption that data is normally distributed:
22
Are the groups’ means significantly different?
23
Multiple comparisons (between all pairs of groups) greatly increase the probability of false rejection of a null hypothesis. There are 3 comparisons (instead of 1 for ANOVA). Estimation of standard deviation (s p ): ANOVA technique uses all information of data and usually gives higher precision We will use ANOVA and an F-test F=Fisher
24
ANOVA table Three categories of calculations within between total Three things to calculate SS (sum of squares) df (degrees of freedom) MS (mean square) We will use computer output for homework and exams
25
Variability df degrees of freedom SS sum of squares MS mean square Between Groups (called Model) DFM=I-1 (num) SSM (from data) SSG/DFG Within groups (called Error) DFE=N-I (den) SSE (from data) SSE/DFE TotalDFT=N-1 SST (from data) ANOVA table
28
Test statistic is F = MSM/MSE. Under H 0, F has an F distribution with DFM, DFE In Table E, read P-values for F given DFM, DFE ◦ larger values of F than the critical value will reject H 0 “Degrees of freedom in the numerator" = DFM “Degrees of freedom in the denominator" = DFE
30
p Fs Fs
32
Note that table E has a different layout than Table D or F. You have two kinds of DF to look up. No multiplication of P-value by 2 or subtraction from 1, whatever you note directly from Table E is the P-value.
34
Considered groups of elementary school students do not differ significantly (p-value = 0.33) in reading scores before instruction. This also means that later differences will be due to the effect of the (three) teaching methods subsequently applied to these children. Important that the SDs for the groups were similar.
35
After months of instruction (by three different methods) another reading test was given in each class. The score will be denoted COMP. Do the methods differ in effectiveness? State hypotheses:…
40
The groups DRTA and Strat were taught by innovative methods (of similar philosophy). Basal was the standard method used in schools. Now that we know there is a difference, can we compare the groups pairwise? ◦ Use multiple comparison tests (pg 661 in book) ◦ In this class, we will use the Bonferroni procedure There are other multiple comparison procedures Namely, Tukey, LSD, Scheffe, SNK
41
Means with the same letter are not significantly different. Bon Grouping Mean N Group A 10.5000 22 Basal A A 9.7273 22 DRTA A A 9.1364 22 Strat So for the pretest, none of the groups are significantly different. This should not be surprising since we failed to reject H 0 for the ANOVA F-test.
42
Means with the same letter are not significantly different. Bon Grouping Mean N Group A 46.727 22 DRTA A B A 44.273 22 Strat B B 41.045 22 Basal So for the post test, only DRTA and Basal are significantly different.
43
On SAS output R-square: R 2 =SSM/SST Shows what part of the total variation is due to differences among groups. Before instruction the groups explained only 3% of the variation in score, R 2 =0.034696 After instruction the groups explain 12% of the variation in score, R 2 =0.124540. For the comp scores we are seeing a lot more of the difference in the groups than we did with the pretest.
44
Since we assume the standard deviation is the same for all the groups, we have “constant variance” (the normal curve is the same shape for all 3 groups) It would be nice to have an estimate for this variation ◦ The MSE is an estimate for this variance, σ 2. To get an estimate for just σ, we take the square root ◦ The Root MSE is an estimate for σ, see SAS output.
45
Inference procedure for comparing means of several groups. Two kinds of variance: Between group and within group. If Between variation much larger than Within variation, there exists a difference among the group means. Using F-statistic and Table E.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.