Вы находитесь на странице: 1из 34

Chapter 11

Analysis of Variance

ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 1
Chapter Overview
DCOVA
Analysis of Variance (ANOVA)

Completely Randomized Design


One-Way ANOVA
F-test

Tukey-
Kramer
Multiple
Comparisons

ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 2
General ANOVA Setting
DCOVA

 Investigator controls one or more factors of interest.


 Each factor contains two or more levels.

 Levels can be numerical or categorical.

 Different levels produce different groups.

 Think of each group as a sample from a different

population.
 Observe effects on the dependent variable.
 Are the groups the same?

 Experimental design: the plan used to collect the data.

ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 3
One-Way Analysis of Variance
DCOVA

 Evaluate the difference among the means of three


or more groups.
Examples: Number of accidents for 1st, 2nd, and 3rd shift.
Expected mileage for five brands of tires.

 Assumptions:
 Populations are normally distributed.

 Populations have equal variances.

 Samples are randomly and independently

selected.
ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 4
Hypotheses of One-Way ANOVA
DCOVA

 H0 : μ1  μ2  μ3    μc
 All population means are equal.
 i.e., no factor effect (no variation in means among
groups.)

 H1 : Not all of the population means are equal


 At least one population mean is different.
 i.e., there is a factor effect .
 Does not mean that all population means are
different (some pairs may be the same).

ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 5
One-Way ANOVA
H0 : μ1  μ2  μ3    μc DCOVA

H1 : Not all μ j are equal

When The Null Hypothesis is True


All Means are the same:
(No Factor Effect)

μ1  μ 2  μ 3
ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 6
One-Way ANOVA (continued)

DCOVA
H0 : μ1  μ2  μ3    μc
H1 : Not all μ j are equal
When The Null Hypothesis is NOT true
At least one of the means is different.
(Factor Effect is present).

or

μ1  μ2  μ3 μ1  μ2  μ3
ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 7
Partitioning the Variation
DCOVA
 Total variation can be split into two parts:

SST = SSA + SSW

SST = Total Sum of Squares


(Total variation).
SSA = Sum of Squares Among Groups
(Among-group variation).
SSW = Sum of Squares Within Groups
(Within-group variation).

ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 8
Partitioning the Variation
(continued)

DCOVA
SST = SSA + SSW

Total Variation = the aggregate variation of the individual


data values across the various factor levels (SST).

Among-Group Variation = variation among the factor


sample means (SSA).

Within-Group Variation = variation that exists among


the data values within a particular factor level (SSW).

ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 9
Partition of Total Variation
DCOVA
Total Variation (SST)

Variation Due to Variation Due to Random


= Factor (SSA) + Error (SSW)

ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 10
Total Sum of Squares
DCOVA

SST = SSA + SSW


c nj

SST   ( Xij  X) 2

j1 i1
Where:
SST = Total sum of squares
c = number of groups or levels
nj = number of values in group j
Xij = ith observation from group j
X = grand mean (mean of all data values)
ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 11
Total Variation DCOVA
(continued)

2 2 2
SST  ( X 11  X )  ( X 12  X )      ( X cn  X )
c

Response, X

Group 1 Group 2 Group 3

ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 12
Among-Group Variation
DCOVA

SST = SSA + SSW


c
SSA   n j ( X j  X) 2

j1
Where:
SSA = Sum of squares among groups
c = number of groups
nj = sample size from group j
Xj = sample mean from group j
X = grand mean (mean of all data values)
ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 13
Among-Group Variation
(continued)
c
DCOVA
SSA   n j ( X j  X) 2

j1
Variation Due to SSA
Differences Among MSA 
Groups. c 1
Mean Square Among =
SSA/degrees of freedom.

i j

ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 14
Among-Group Variation
DCOVA
(continued)

SSA  n1 (X1  X)  n 2 (X 2  X)      n c (X c  X)
2 2 2

Response, X

X3
X2 X
X1

Group 1 Group 2 Group 3


ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 15
Within-Group Variation
DCOVA
SST = SSA + SSW
c nj
SSW    ( Xij  X j ) 2

j1 i1
Where:
SSW = Sum of squares within groups
c = number of groups
nj = sample size from group j
Xj = sample mean from group j
Xij = ith observation in group j
ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 16
Within-Group Variation
(continued)
DCOVA
c nj
SSW    ( Xij  X j ) 2

j1 i1
SSW
Summing the variation
MSW 
within each group and then
adding over all groups. nc
Mean Square Within =
SSW/degrees of freedom.

μj
ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 17
Within-Group Variation
DCOVA
(continued)

SSW  (X11  X1 )  (X12  X 2 )      (X cnc  X c )


2 2 2

Response, X

X3
X2
X1

Group 1 Group 2 Group 3


ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 18
Obtaining the Mean Squares
DCOVA
The Mean Squares are obtained by dividing the various
sum of squares by their associated degrees of freedom.

SSA Mean Square Among


MSA  (d.f. = c-1).
c 1
SSW
MSW  Mean Square Within
nc (d.f. = n-c).

SST
MST  Mean Square Total
n 1 (d.f. = n-1).
ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 19
One-Way ANOVA Table
DCOVA

Source of Degrees of Sum Of Mean Square F


Variation Freedom Squares (Variance)

Among SSA FSTAT =


c-1 SSA MSA =
Groups c-1
MSA
Within SSW
n-c SSW MSW = MSW
Groups n-c

Total n–1 SST

c = number of groups
n = sum of the sample sizes from all groups
df = degrees of freedom

ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 20
One-Way ANOVA
F Test Statistic DCOVA

H0: μ1= μ2 = … = μc
H1: At least two population means are different

 Test statistic MSA


FSTAT 
MSW
MSA is mean squares among groups.
MSW is mean squares within groups.
 Degrees of freedom
 df1 = c – 1 (c = number of groups)
 df2 = n – c (n = sum of sample sizes from all populations)

ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 21
Interpreting One-Way ANOVA
F Statistic DCOVA

 The F statistic is the ratio of the among


estimate of variance and the within estimate
of variance:
 The ratio must always be positive.
 df1 = c -1 will typically be small.
 df2 = n - c will typically be large.

Decision Rule:

 Reject H0 if FSTAT > Fα,
otherwise do not reject 0 Do not Reject H0
H0. reject H0

ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 22
One-Way ANOVA
DCOVA
F Test Example
 You want to see if three Club 1 Club 2 Club 3
different golf clubs yield 254 234 200
different distances traveled 263 218 222
by ball struck on an 241 235 197
automated driving machine. 237 227 206
 You randomly select five 251 216 204
measurements from trials on
an automated driving
machine for each club.
 At the 0.05 significance
level, is there a difference in
mean distance?
ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 23
Excel, JMP, & Minitab Scatter Plots
DCOVA
Distance vs Club Group
270
260
250
Distance

240
230
220
210
200
190
0 1 2 3 4
Club Group

Scatterplot of Distance vs Club Group


270

260

250

240
Distance

230

220

210

200

190
1.0 1.5 2.0 2.5 3.0
Club Group

ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 24
One-Way ANOVA Example:
Scatter Plot Distance DCOVA
270
Club 1 Club 2 Club 3 •
260
254 234 200 ••
263 218 222 250 X1
241 235 197 240 •
• ••
237 227 206 230
251 216 204 • X2 X
220 •
••
210
•• X3
x1  249.2 x 2  226.0 x 3  205.8 200 ••
x  227.0 190

1 2 3
Club
ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 25
One-Way ANOVA Example
Computations DCOVA

Club 1 Club 2 Club 3 X1 = 249.2 n1 = 5


254 234 200 X2 = 226.0 n2 = 5
263 218 222
X3 = 205.8 n3 = 5
241 235 197
237 227 206 n = 15
X = 227.0
251 216 204 c=3
SSA = 5 (249.2 – 227)2 + 5 (226 – 227)2 + 5 (205.8 – 227)2 = 4,716.4
SSW = (254 – 249.2)2 + (263 – 249.2)2 +…+ (204 – 205.8)2 = 1,119.6

MSA = 4,716.4 / (3-1) = 2,358.2 2358.2


FSTAT   25.275
MSW = 1,119.6 / (15-3) = 93.3 93.3

ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 26
One-Way ANOVA Example
Solution DCOVA
H0: μ1 = μ2 = μ3 Test Statistic:
H1: μj not all equal
MSA 2,358.2
 = 0.05 FSTAT    25.275
df1= 2 df2 = 12 MSW 93.3

Critical Decision:
Value:
Reject H0 at  = 0.05.
Fα = 3.89
 = .05 Conclusion:
There is evidence that
0 Do not Reject H0 at least one μj differs
reject H0
F0.05 = 3.89 from the rest.
ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 27
One-Way ANOVA Excel, Minitab, & JMP
Output DCOVA

ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 28
You Must Make Three Assumptions About
Your Data To Use The ANOVA F Test
DCOVA

 Randomness and Independence


 Of the samples selected.
 Normality
 Of the c groups from which the samples are selected.
 Homogeneity of Variance:
 The variances of the c groups are equal.
 Can be tested with Levene’s Test.

ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 29
When the ANOVA F Test Is
Statistically Significant DCOVA

 When the F test is rejected, you conclude that


at least one of the population means is different
from the others.

 Now you need to determine which one(s) are


different.

 In this book we use the Tukey-Kramer multiple


comparison procedure for one-way ANOVA to
answer this question.
ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 30
The Tukey-Kramer Procedure
DCOVA

 Tells which population means are significantly


different.
 e.g.: μ1 = μ2  μ3.
 Done after rejection of equal means in ANOVA.
 Allows paired comparisons:
 Compare absolute mean differences with critical
range.

μ1= μ2 μ3 x

ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 31
Tukey-Kramer Critical Range
DCOVA

MSW  1 1 
Critical Range  Q α 
2  n j n j' 

where:
Qα = Upper Tail Critical Value from Studentized
Range Distribution with c and n - c degrees
of freedom (see appendix E.7 table)
MSW = Mean Square Within
nj and nj’ = Sample sizes from groups j and j’

ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 32
The Tukey-Kramer Procedure:
Example DCOVA
1. Compute absolute mean
Club 1 Club 2 Club 3 differences:
254 234 200
263 218 222 x1  x 2  249.2  226.0  23.2
241 235 197 x1  x 3  249.2  205.8  43.4
237 227 206
251 216 204 x 2  x 3  226.0  205.8  20.2

2. Find the Qα value from the table in appendix E.7 with


c = 3 and (n – c) = (15 – 3) = 12 degrees of freedom:

Q α  3.77
ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 33
The Tukey-Kramer Procedure:
Example (continued)

3. Compute Critical Range: DCOVA

MSW  1 1  93.3  1 1 
Critical Range  Q α   3.77     16.285
 
2  n j n j'  2 5 5

4. Compare:
5. All of the absolute mean differences
are greater than the critical range. x1  x 2  23.2
Therefore there is a significant
x1  x 3  43.4
difference between each pair of
means at 5% level of significance. x 2  x 3  20.2
Thus, with 95% confidence we conclude that
the mean distance for club 1 is greater than
club 2 and 3, and club 2 is greater than club 3.
ALWAYS LEARNING Copyright © 2019, 2015, 2012 Pearson Education, Inc. Slide 34

Вам также может понравиться