One way Analysis of Variance (ANOVA) - PowerPoint PPT Presentation

About This Presentation
Title:

One way Analysis of Variance (ANOVA)

Description:

Diet 1 - High Protein , Beef. Diet 2 - High Protein , Cereal. Diet 3 - High Protein , Pork ... Diet 4 - Low protein , Beef. Diet 5 - Low protein , Cereal. Diet ... – PowerPoint PPT presentation

Number of Views:72
Avg rating:3.0/5.0
Slides: 63
Provided by: lave9
Category:
Tags: anova | analysis | beef | note | one | pork | variance | way

less

Transcript and Presenter's Notes

Title: One way Analysis of Variance (ANOVA)


1
One way Analysis of Variance (ANOVA)
  • Comparing k Populations

2
The F test for comparing k means
  • Situation
  • We have k normal populations
  • Let mi and s denote the mean and standard
    deviation of population i.
  • i 1, 2, 3, k.
  • Note we assume that the standard deviation for
    each population is the same.
  • s1 s2 sk s

3
We want to test
against
4
Computing Formulae
Compute
1)
2)
3)
4)
5)
5
The data
  • Assume we have collected data from each of k
    populations
  • Let xi1, xi2 , xi3 , denote the ni observations
    from population i.
  • i 1, 2, 3, k.

6
Then
1)
2)
3)
7
Anova Table
Source d.f. Sum of Squares Mean Square F-ratio
Between k - 1 SSBetween MSBetween MSB /MSW
Within N - k SSWithin MSWithin
Total N - 1 SSTotal
8
Example
  • In the following example we are comparing weight
    gains resulting from the following six diets
  • Diet 1 - High Protein , Beef
  • Diet 2 - High Protein , Cereal
  • Diet 3 - High Protein , Pork
  • Diet 4 - Low protein , Beef
  • Diet 5 - Low protein , Cereal
  • Diet 6 - Low protein , Pork

9
(No Transcript)
10
Thus
Thus since F gt 2.386 we reject H0
11
Anova Table
Source d.f. Sum of Squares Mean Square F-ratio
Between 5 4612.933 922.587 4.3 (p 0.0023)
Within 54 11586.000 214.556
Total 59 16198.933
- Significant at 0.05 (not 0.01)
- Significant at 0.01
12
Equivalence of the F-test and the t-test when k
2
the t-test
13
the F-test
14
(No Transcript)
15
Hence
16
Factorial Experiments
  • Analysis of Variance

17
  • Dependent variable Y
  • k Categorical independent variables A, B, C,
    (the Factors)
  • Let
  • a the number of categories of A
  • b the number of categories of B
  • c the number of categories of C
  • etc.

18
The Completely Randomized Design
  • We form the set of all treatment combinations
    the set of all combinations of the k factors
  • Total number of treatment combinations
  • t abc.
  • In the completely randomized design n
    experimental units (test animals , test plots,
    etc. are randomly assigned to each treatment
    combination.
  • Total number of experimental units N ntnabc..

19
The treatment combinations can thought to be
arranged in a k-dimensional rectangular block
B
1
2
b
1
2
A
a
20
C
B
A
21
  • The Completely Randomized Design is called
    balanced
  • If the number of observations per treatment
    combination is unequal the design is called
    unbalanced. (resulting mathematically more
    complex analysis and computations)
  • If for some of the treatment combinations there
    are no observations the design is called
    incomplete. (In this case it may happen that some
    of the parameters - main effects and interactions
    - cannot be estimated.)

22
Example
  • In this example we are examining the effect of

The level of protein A (High or Low) and the
source of protein B (Beef, Cereal, or Pork) on
weight gains (grams) in rats.
We have n 10 test animals randomly assigned to
k 6 diets
23
The k 6 diets are the 6 32 Level-Source
combinations
  • High - Beef
  • High - Cereal
  • High - Pork
  • Low - Beef
  • Low - Cereal
  • Low - Pork

24
Table Gains in weight (grams) for rats under six
diets differing in level of protein (High or
Low) and s ource of protein (Beef, Cereal, or
Pork)
Level
of Protein High Protein Low protein
Source of Protein Beef Cereal Pork Beef Cereal P
ork
Diet 1 2 3 4 5 6
73 98 94 90 107 49 102 74 79 76 95 82 118 56
96 90 97 73 104 111 98 64 80 86 81 95 102 86
98 81 107 88 102 51 74 97 100 82 108 72 74 106
87 77 91 90 67 70 117 86 120 95 89 61 111 9
2 105 78 58 82
Mean 100.0 85.9 99.5 79.2 83.9 78.7 Std.
Dev. 15.14 15.02 10.92 13.89 15.71 16.55
25
Treatment combinations
Source of Protein
Beef
Cereal
Pork


Level of Protein
High
Diet 1
Diet 2
Diet 3
Low
Diet 4
Diet 5
Diet 6
26
Summary Table of Means
Source of Protein
Level of Protein Beef Cereal Pork Overall
High 100.00 85.90 99.50 95.13
Low 79.20 83.90 78.70 80.60
Overall 89.60 84.90 89.10 87.87
27
Profiles of the response relative to a factor
  • A graphical representation of the effect of a
    factor on a reponse variable (dependent variable)

28
Profile Y for A
Y
This could be for an individual case or averaged
over a group of cases
This could be for specific level of another
factor or averaged levels of another factor
a

1
2
3
Levels of A
29
Profiles of Weight Gain for Source and Level of
Protein
30
Profiles of Weight Gain for Source and Level of
Protein
31
Example Four factor experiment
  • Four factors are studied for their effect on Y
    (luster of paint film). The four factors are

1) Film Thickness - (1 or 2 mils)
2) Drying conditions (Regular or Special)
3) Length of wash (10,30,40 or 60 Minutes), and
4) Temperature of wash (92 C or 100 C)
Two observations of film luster (Y) are taken for
each treatment combination
32
  • The data is tabulated below
  • Regular Dry Special Dry
  • Minutes 92 ?C 100 ?C 92?C 100 ?C
  • 1-mil Thickness
  • 20 3.4 3.4 19.6 14.5 2.1 3.8 17.2 13.4
  • 30 4.1 4.1 17.5 17.0 4.0 4.6 13.5 14.3
  • 40 4.9 4.2 17.6 15.2 5.1 3.3 16.0 17.8
  • 60 5.0 4.9 20.9 17.1 8.3 4.3 17.5 13.9
  • 2-mil Thickness
  • 20 5.5 3.7 26.6 29.5 4.5 4.5 25.6 22.5
  • 30 5.7 6.1 31.6 30.2 5.9 5.9 29.2 29.8
  • 40 5.5 5.6 30.5 30.2 5.5 5.8 32.6 27.4
  • 60 7.2 6.0 31.4 29.6 8.0 9.9 33.5 29.5

33
  • Definition
  • A factor is said to not affect the response if
    the profile of the factor is horizontal for all
    combinations of levels of the other factors
  • No change in the response when you change the
    levels of the factor (true for all combinations
    of levels of the other factors)
  • Otherwise the factor is said to affect the
    response

34
Profile Y for A A affects the response
Y
Levels of B
a

1
2
3
Levels of A
35
Profile Y for A no affect on the response
Y
Levels of B
a

1
2
3
Levels of A
36
  • Definition
  • Two (or more) factors are said to interact if
    changes in the response when you change the level
    of one factor depend on the level(s) of the other
    factor(s).
  • Profiles of the factor for different levels of
    the other factor(s) are not parallel
  • Otherwise the factors are said to be additive .
  • Profiles of the factor for different levels of
    the other factor(s) are parallel.

37
Interacting factors A and B
Y
Levels of B
a

1
2
3
Levels of A
38
Additive factors A and B
Y
Levels of B
a

1
2
3
Levels of A
39
  • If two (or more) factors interact each factor
    effects the response.
  • If two (or more) factors are additive it still
    remains to be determined if the factors affect
    the response
  • In factorial experiments we are interested in
    determining
  • which factors effect the response and
  • which groups of factors interact .

40
  • The testing in factorial experiments
  • Test first the higher order interactions.
  • If an interaction is present there is no need to
    test lower order interactions or main effects
    involving those factors. All factors in the
    interaction affect the response and they interact
  • The testing continues with for lower order
    interactions and main effects for factors which
    have not yet been determined to affect the
    response.

41
Models for factorial Experiments
42
The Single Factor Experiment
  • Situation
  • We have t a treatment combinations
  • Let mi and s denote the mean and standard
    deviation of observations from treatment i.
  • i 1, 2, 3, a.
  • Note we assume that the standard deviation for
    each population is the same.
  • s1 s2 sa s

43
The data
  • Assume we have collected data for each of the a
    treatments
  • Let yi1, yi2 , yi3 , , yin denote the n
    observations for treatment i.
  • i 1, 2, 3, a.

44
The model
  • Note

where
has N(0,s2) distribution
(overall mean effect)
(Effect of Factor A)
Note
by their definition.
45
  • Model 1

yij (i 1, , a j 1, , n) are independent
Normal with mean mi and variance s2.
Model 2
where eij (i 1, , a j 1, , n) are
independent Normal with mean 0 and variance s2.
Model 3
where eij (i 1, , a j 1, , n) are
independent Normal with mean 0 and variance s2
and
46
The Two Factor Experiment
  • Situation
  • We have t ab treatment combinations
  • Let mij and s denote the mean and standard
    deviation of observations from the treatment
    combination when A i and B j.
  • i 1, 2, 3, a, j 1, 2, 3, b.

47
The data
  • Assume we have collected data (n observations)
    for each of the t ab treatment combinations.
  • Let yij1, yij2 , yij3 , , yijn denote the n
    observations for treatment combination - A i,
    B j.
  • i 1, 2, 3, a, j 1, 2, 3, b.

48
The model
  • Note

where
has N(0,s2) distribution
and
49
The model
  • Note

where
has N(0,s2) distribution
Note
by their definition.
50
Model
where eijk (i 1, , a j 1, , b k 1, ,
n) are independent Normal with mean 0 and
variance s2 and
51
Maximum Likelihood Estimates
where eijk (i 1, , a j 1, , b k 1, ,
n) are independent Normal with mean 0 and
variance s2 and
52
This is not an unbiased estimator of s2 (usually
the case when estimating variance.) The unbiased
estimator results when we divide by ab(n -1)
instead of abn
53
The unbiased estimator of s2 is
where
54
Testing for Interaction
We want to test H0 (ab)ij 0 for all i and j,
against HA (ab)ij ? 0 for at least one i and
j.
The test statistic
where
55
We reject H0 (ab)ij 0 for all i and j,
If
56
Testing for the Main Effect of A
We want to test H0 ai 0 for all i, against
HA ai ? 0 for at least one i.
The test statistic
where
57
We reject H0 ai 0 for all i,
If
58
Testing for the Main Effect of B
We want to test H0 bj 0 for all j, against
HA bj ? 0 for at least one j.
The test statistic
where
59
We reject H0 bj 0 for all j,
If
60
The ANOVA Table
Source S.S. d.f. MS SS/df F
A SSA a - 1 MSA MSA / MSError
B SSB b - 1 MSB MSB / MSError
AB SSAB (a - 1)(b - 1) MSAB MSAB/ MSError
Error SSError ab(n - 1) MSError
Total SSTotal abn - 1
61
Computing Formulae
62
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com