Upload
tranthuan
View
224
Download
0
Embed Size (px)
Citation preview
Copyright Reserved 1
Chapter 13: Analysis of Variance (ANOVA)
Consider the examination scores for 18 employees
(6 at each plant) Given: � = 0.05
Observation Atlanta
(Treatment 1) Dallas
(Treatment 2) Seattle
(Treatment 3)
1 x11 = 85 x12 = 71 x13 = 59
2 x21 = 75 x22 = 75 x23 = 64
3 x31 = 82 x32 = 73 x33 = 62
4 x41 = 76 x42 = 74 x43 = 69
5 x51 = 71 x52 = 69 x53 = 75
6 x61 = 85 x62 = 82 x63 = 67
�� �� = 79 � = 74 � = 66
�� �� = 34 � = 20 � = 32
�� �� = 5.83 � = 4.47 � = 5.66
� �� = 6 � = 6 � = 6
k = number of treatments =
�� = �� + � + � = 6 + 6 + 6 =
Overall mean: �̿ = ∑ ∑ �����
=
OR
Overall mean: �̿ = ��������� =.
Copyright Reserved 2
Hypotheses:
��:!" = !# = !$
Ha: Not all population means are equal
OR (a different way of phrasing Ha)
Ha: At least one population mean differs significantly from
the rest.
ANOVA table
Sum of
Squares
Degrees of
Freedom (df)
Mean
Square
Treatments SSTR % − 1 MSTR
Error SSE �� − % MSE
Total SST �� − 1
Copyright Reserved 3
TREATMENT:
Sum of squares due to treatments ((()*)
= ∑ ��+�� − �̿,��-�
= ��.�� − �̿/ + �.� − �̿/ + �.� − �̿/
=
01 = k – 1 =
Mean square due to treatments (MSTR)
2()* = 33�4�5� =
Note that the MSTR is also called the: Between-treatment
estimate of population variance;
or the: Between-treatment estimate of 6
Copyright Reserved 4
ERROR:
Sum of squares due to errors (SSE)
= ∑ +�� − 1,����-�
= .�� − 1/�� + .� − 1/� + .� − 1/�
=
01 = �� − % =
Mean square due to error (MSE)
2(7 = 338��5� =
Note that the MSE is also called the: Within-treatment
estimate of population variance;
or the: Within-treatment estimate of 6
Copyright Reserved 5
F test statistic:
9 = :3�4:38 =
Numerator df
9 = :3�4:38 =
33�4 �5�;338 ��5�;
Denominator df
has a F distribution with .% − 1/ and .�� − %/ degrees of
freedom.
has a F distribution with and df.
Using Excel to calculate the test statistic:
= F.INV.RT(p-value, % − 1, �� − %)
= F.INV.RT( )
≈
Note: p-value will be calculated later.
Copyright Reserved 6
The critical value (=>):
� = 0.05
Numerator df = k – 1 =
Denominator df = �� − % =
Therefore, 9? =
Using Excel to calculate the critical value:
= F.INV.RT(�, % − 1, �� − %)
= F.INV.RT( )
=
Copyright Reserved 7
Make the decision and conclusion.
Reject @A if 9 > 9?
Or similarly: Reject @A if 9 ≥ 9?
Decision:
Conclusion:
Copyright Reserved 8
Fixed rule: Reject @A if p-value < �.
Calculating the p-value exactly using Excel:
= F.DIST.RT(F test statistic, % − 1, �� − %)
= F.DIST.RT( )
=
Decision: (the same decision as when we compared the test
statistic to the critical value)
Reject H0 at a 5% level of significance.
Conclusion: (the same conclusion as when we compared the
test statistic to the critical value)
At least one population mean differs significantly from the
rest.
Copyright Reserved 9
Approximating the p-value using the F-table:
Step 1: Go to correct df on the F-table
Numerator df = k – 1 = 3 – 1 = 2
Denominator df = �� − % = 18 − 3 = 15
Step 2: Search for the test statistic 9 ≈ 9
The test statistic is greater than 6.36 and, consequently, the p-
value is smaller than 0.01.
Therefore, p-value < 0.01
Copyright Reserved 10
Total sum of squares (SST):
SST = SSTR + SSE =
OR use the formula on the formula sheet:
(() = G G+� � − �̿,��
-�
�
�-�=
Copyright Reserved 11
Fill in the ANOVA table.
ANOVA table
Sum of
Squares
Degrees of
Freedom (df)
Mean
Square
Treatments SSTR % − 1 MSTR
Error SSE �� − % MSE
Total SST �� − 1
ANOVA table
Sum of
Squares
Degrees of
Freedom (df)
Mean
Square
Treatments
Error
Total
Note:
Since 2()* = 33�4�5� we have (()* = .2()*/.% − 1/.
Since 2(7 = 338��5� we have ((7 = .2(7/.�� − %/.
Since SST = SSTR + SSE we have SSTR = SST – SSE.
Since SST = SSTR + SSE we have SSE = SST – SSTR.
Using Excel 2010’s ANOVA Single Factor tool
Copyright Reserved 12
Example:
Sample 1 Sample 2 Sample 3
165 174 169
149 164 154
156 181 161
142 148
158
��
��
�
At > = �. �H, test whether the means for the three
treatments are equal.
Define the hypothesis:
��: Ha:
Copyright Reserved 14
ANOVA table
Sum of
Squares
Degrees of
Freedom (df)
Mean
Square
Treatments
Error
Total
Summary of Excel functions for Chapter 13:
Use Excel’s F.INV.RT to compute the F test statistic.
= F.INV.RT(p-value, k – 1, nT - k)
Use Excel’s F.INV.RT to compute the critical value.
= F.INV.RT(�, k – 1, nT - k)
Use Excel’s F.DIST.RT to compute the p-value.
= F.DIST.RT(test statistic, k – 1, nT - k)
Copyright Reserved 15
F DISTRIBUTION
Denominator
Degrees Area in Numerator Degrees of Freedom
of Freedom Upper Tail 1 2 3 4 5 6 7
8 0.1 3.46 3.11 2.92 2.81 2.73 2.67 2.62
0.05 5.32 4.46 4.07 3.84 3.69 3.58 3.50
0.025 7.57 6.06 5.42 5.05 4.82 4.65 4.53
0.01 11.26 8.65 7.59 7.01 6.63 6.37 6.18
9 0.1 3.36 3.01 2.81 2.69 2.61 2.55 2.51
0.05 5.12 4.26 3.86 3.63 3.48 3.37 3.29
0.025 7.21 5.71 5.08 4.72 4.48 4.32 4.20
0.01 10.56 8.02 6.99 6.42 6.06 5.80 5.61
10 0.1 3.29 2.92 2.73 2.61 2.52 2.46 2.41
0.05 4.96 4.10 3.71 3.48 3.33 3.22 3.14
0.025 6.94 5.46 4.83 4.47 4.24 4.07 3.95
0.01 10.04 7.56 6.55 5.99 5.64 5.39 5.20
11 0.1 3.23 2.86 2.66 2.54 2.45 2.39 2.34
0.05 4.84 3.98 3.59 3.36 3.20 3.09 3.01
0.025 6.72 5.26 4.63 4.28 4.04 3.88 3.76
0.01 9.65 7.21 6.22 5.67 5.32 5.07 4.89
12 0.1 3.18 2.81 2.61 2.48 2.39 2.33 2.28
0.05 4.75 3.89 3.49 3.26 3.11 3.00 2.91
0.025 6.55 5.10 4.47 4.12 3.89 3.73 3.61
0.01 9.33 6.93 5.95 5.41 5.06 4.82 4.64
13 0.1 3.14 2.76 2.56 2.43 2.35 2.28 2.23
0.05 4.67 3.81 3.41 3.18 3.03 2.92 2.83
0.025 6.41 4.97 4.35 4.00 3.77 3.60 3.48
0.01 9.07 6.70 5.74 5.21 4.86 4.62 4.44
14 0.1 3.10 2.73 2.52 2.39 2.31 2.24 2.19
0.05 4.60 3.74 3.34 3.11 2.96 2.85 2.76
0.025 6.30 4.86 4.24 3.89 3.66 3.50 3.38
0.01 8.86 6.51 5.56 5.04 4.69 4.46 4.28
Fα
Area or probability
Copyright Reserved 16
Using Excel 2010’s ANOVA Single Factor tool
Step 1: Enter the data into Excel
Step 2: Click on the Data tab.
Step 3: In the Analysis group, click Data Analysis.
Copyright Reserved 17
Step 4: Choose Anova: Single Factor
Step 5: Press OK and the Anova: Single Factor dialog box
appears
Step 6:
• Enter the range of the data (A1:C7)
• Select Labels in First Row (if you put labels in the first
row)
• Enter the value of alpha (�) in the alpha box
• Choose where you want the output to be placed
• Press OK