Professional Documents
Culture Documents
1
Single Factor ANOVA
Example { Hence, this is a single-
{ To find the effect of factor experiment with
percentage of cotton a=5 levels and n=5
fiber on cloth strength replicates
z Engineer knows that %
Cotton
should be between 10 Weight Experimental Run Number
and 40 Percent
z Engineer decides to test 15 1 2 3 4 5
specimens at five levels: 20 6 7 8 9 10
25 11 12 13 14 15
15%, 20%, 25%, 30%, 30 16 17 18 19 20
and 35% 35 21 22 23 24 25
z He/She also decides to
take 5 samples at each
level of cotton content
2
An Example (See pg. 62)
{ Does changing
the cotton weight
percent change
the mean tensile
strength?
{ Is there an
optimum level for
cotton content?
3
The Analysis of Variance
4
The Analysis of Variance
{ Total variability is measured by the total sum of
squares: a n
SST = ( yij y.. ) 2
i =1 j =1
{ The basic ANOVA partitioning is:
a n a n
SST = SSTreatments + SS E
SST = SSTreatments + SS E
{ A large value of SSTreatments reflects large differences in
treatment means
{ A small value of SSTreatments likely indicates no
differences in treatment means
{ Formal statistical hypotheses are:
H 0 : 1 = 2 = L = a
H1 : At least one mean is different
5
The Analysis of Variance
{ While sums of squares cannot be directly compared
to test the hypothesis of equal means, mean
squares can be compared.
{ A mean square is a sum of squares divided by its
degrees of freedom:
dfTotal = dfTreatments + df Error
an 1 = a 1 + a ( n 1)
SS SS E
MSTreatments = Treatments , MS E =
a 1 a ( n 1)
{ If the treatment means are equal, the treatment and
error mean squares will be (theoretically) equal.
{ If treatment means differ, the treatment mean
square will be larger than the error mean square.
11
F0 > F ,a 1,a ( n 1)
6
Single Factor Analysis
Note that the treatment effect of If treatment levels are
five preselected chosen as a random sample
levels is being studied here. from a larger population,
Hence, the results then i is a random variable.
can not be extended beyond this
Here the knowledge about
five levels.
particular is that are
This is called investigated is useless.
Fixed Effects Model Instead, we test hypothesis
about the variability about ti
and try to estimate this
variability. This is called
Random Effects Model.
( )
a a n 2
H1 : i j For at least one pair (i,j) = n ( yi. y.. ) 2 + yij yi.
i =1 i =1 j =1
Where i=+i
= SSTreatments + SS E
7
Single Factor ANOVA
{ Analysis of the Fixed Effects Model(Contd.)
We have seen that It can be shown easily that
SST = SS treatment + SS E
E [ MS E ] = 2
a 1 a 1
a-1=treatment dof
SS E
MS E = N-a= error
N a That is under null hypothesis,
MS treatment = MSE
Total dof = N-1, then But under H1, MStreatment
Error dof = Total dof - Treatment dof is higher than MSE
= N-1-(a-1)=N-a
1 a 2 y..2
Null hypothesis H0 is rejected if SStreatment = yi . N
n i =1
F0 > F ,a 1, N a SS E = SST SStreatment
8
Single Factor ANOVA
n
An estimate of the overall
mean and the treatment Thus, if 2 were known, then C.I.
effect can be given as Could be obtained from N.D.
= y..
i = 1,2,..., a Using MSE as an estimator of 2,we
i = yi . y.. would base the C.I. on t-distribution.
That is, a 100(1-)% C.I. On the ith
Now let i = + i
treatment with mean i is:
Then, an estimate of i would be
MS E
i = + i = yi. yi. t , N a
2 n
9
ANOVA Computer Output
(Design-Expert)
Response:Strength
ANOVA for Selected Factorial Model
Analysis of variance table [Partial sum of squares]
Sum of Mean F
Source Squares DF Square Value Prob > F
Model 475.76 4 118.94 14.76 < 0.0001
A 475.76 4 118.94 14.76 < 0.0001
Pure Error161.20 20 8.06
Cor Total636.96 24
10
Graphical View of the Results
DE S IG N-E X P E RT P l o t One Factor Plot
S tre n g th 25
X = A : Co tto n We i g h t %
De si g n P o i n ts
20.5
2 2
Strength 2 2
16
2
11.5
2
7 2
15 20 25 30 35
21
A: C otton Weight %
11
Single Factor ANOVA
12
99
95
N orm al % probability
90
80
70
50
30
20
10
R es idual
ij
Time
13
Residuals vs. Run
5.2
2.95
R es iduals
0.7
-1.55
-3.8
1 4 7 10 13 16 19 22 25
R un N um ber
1 a
c = 1+ (ni 1) 1 ( N a) 1
3(a 1) i =1
a
(n 1)S
i i
2
S =
2
p
i =1
N a
14
Single Factor ANOVA
Hence, reject H0 if
02 > 2 ,a 1
15
Single Factor ANOVA
{ Comparison among Treatment Means
After H 0 : 1 = 2 = ... = a is rejected, we need to find exactly which
means differ. For this, comparisons of groups of treatment means may
be useful.
Multiple Comparison methods: Contrasts
Some sample multiple comparison hypotheses are: H 0 : 4 = 5
H1 : 4 5
The above hypothesis could be tested investigating an appropriate linear
combination of treatment totals, say y4. y5. = 0
Similarly, H 0 : 1 + 3 = 4 + 5 which implies testing with
H1 : 1 + 3 4 + 5 y1. + y3. y4. y5. = 0
In general, multiple comparison will imply a linear combination a of
treatment totals such as C = ci yi. with the restriction that ci = 0
a
i =1 i =1
C is called a contrast
ni ci
i =1
2
16
Single Factor ANOVA
{ Orthogonal Contrasts
Two contrasts with coefficients {ci} and {di} are
orthogonal if
a
17
Single Factor ANOVA
{ Comparing pairs of treatment means
If we want to compare all pairs (ac2) of treatment means
H 0 : i = j for all i j
H1 : i j for at least one i j
Method 1. LSD Method (Least squares difference)
yi . y j .
t0 = ~ t N a
1 1
MS E +
reject H0 if n n
1 1 i j
yi. y j . > t , N a MS E +
n n
2
i j
Design-Expert Output
Treatment Means (Adjusted, If Necessary)
Estimated Standard
Mean Error
1-15 9.80 1.27
2-20 15.40 1.27
3-25 17.60 1.27
4-30 21.60 1.27
5-35 10.80 1.27
18
Graphical Comparison of Means
Text, pg. 89
Response:Strength
ANOVA for Response Surface Cubic Model
Analysis of variance table [Partial sum of squares]
Sum of Mean F
Source Squares DF Square Value Prob > F
Model 441.81 3 147.27 15.85 < 0.0001
A 90.84 1 90.84 9.78 0.0051
A2 343.21 1 343.21 36.93 < 0.0001
A3 64.98 1 64.98 6.99 0.0152
Residual 195.15 21 9.29
Lack of Fit 33.95 1 33.95 4.21 0.0535
Pure Error 161.20 20 8.06
Cor Total 636.96 24
19
The Regression Model
25
%
Final Equation in
Terms of Actual 20.5
Factors: 2 2
2 2
Strength
Strength = +62.61143 16
-9.01143* Cotton
Weight % +0.48143 *
Cotton Weight %^2 -
7.60000E-003 * 11.5
2
This is an empirical
model of the 7 2
experimental results
15.00 20.00 25.00 30.00 35.00
39
A: C otton Weight %
20
{ Recall the Hypothesis H 0 : 1 = 2 = ... = a
H1 : i j for at least one (i, j )
{ Choice of Sample Size
Operating Characteristics (OC) Curves can be used to
guide the experimenter in selecting the number of
replicates so that the design will be sensitive to
important potential differences in the treatments.
I.e. limit the Type II error to an acceptable value.
= 1 P{reject H 0 H 0 is false}
= 1 P{F0 > F ,a 1, N a H 0 is false}
21
{ Steps in Calculating Sample Size
1. Select acceptable values of and errors
2. Choose the actual values 1,2,,a for which you
would reject H0.
3. Calculate i for all i.
4. Choose a value for 2 (from previous experiment or
using judgement).
5. Select any value of n
- Calculate
- Check the OC curve (corresponding to selected value of
, and
1=a-1,2=an-a) for the value of error with respect to
the value.
6. If acceptable value of , then stop. Your
sample(replication) size is n. Else, nn+1 and go to
step 5.
nD 2
2 =
2a 2
{ Since this gives minimum values of , the
corresponding sample size(n) obtained is a
conservative one(why?). That is the resulting error
is its upper bound and the corresponding power of
test (1-) is at least as great as specified by the
experimenter.
22
Non-Parametric Methods
{ The Kruskal-Wallis Test. 1952.
{ Rank observations yij in ascending order,
and replace them by their ranks Rij.
{ Calculate the Test Statistic:
1 a R i2. N(N + 1)
2
H=
S 2 i=1 ni 4
1 a ni N(N + 1)
2
Where R ij
2
{ S =
N 1 i=1 j=1 4
23