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

Factorial Experiment Two- Way ANOVA: Data layout

 In some experiments we want to draw conclusions


about more than one variable or factor.
 Factorial experiments and their corresponding
ANOVA computations are valuable designs when
simultaneous conclusions about two or more
factors are required.
 The term factorial is used because the experimental
conditions include all possible combinations of the
factors.
 For example, for a levels of factor A and b levels of
factor B, the experiment will involve collecting data
on ab treatment combinations.

17 18

Factorial Experiments : 2 Way ANOVA


Two-Way ANOVA Data Layout Formulae

Factor Factor B
A 1 2 ... b Observation k
in each cell
1 X111 X121 ... X1b1
X11n X12n ... X1bn Xijk
2 X211 X221 ... X2b1
X21n X22n ... X2bn Level i Level j
: : : : : Factor Factor
a Xa11 Xa21 ... Xab1 A B
i = 1,…,a
Xa1n Xa2n ... Xabn j = 1,…,b
k = 1,…,n
There are a X b treatment combinations

19 20

ANOVA Hypotheses Two-Factor Factorial Experiment

 ANOVA Procedure
• The ANOVA procedure for the two-factor factorial
experiment is similar to the completely randomized
experiment and the randomized block experiment.
• We again partition the sum of squares total (SST)
into its sources.
SST = SSA + SSB + SSAB + SSE

• The total degrees of freedom, nT - 1, are partitioned


such that (a – 1) d.f go to Factor A, (b – 1) d.f go to
Factor B, (a – 1)(b – 1) d.f. go to Interaction, and
ab(r – 1) go to Error.

21 22

1
Two-Factor Factorial Experiment Two-Factor Factorial Experiment

Source of Sum of Degrees of Mean p-  Step 1 Compute the total sum of squares
Variation Squares Freedom Square F Value a b r

SSA MSA
SST =  ( x ijk  x )2
Factor A SSA a-1 MSA  i 1 j 1 k 1
a-1 MSE
SSB MSB  Step 2 Compute the sum of squares for factor A
Factor B SSB b-1 MSB 
b -1 MSE a
SSA = br  ( xi .  x )2
SSAB MSAB
Interaction SSAB (a – 1)(b – 1) MSAB  i 1
( a  1)(b  1) MSE
SSE  Step 3 Compute the sum of squares for factor B
Error SSE ab (r – 1) MSE 
ab(r  1) b
SSB = ar  ( x . j  x )2
Total SST nT - 1 j 1

23 24

Two-Factor Factorial Experiment Two-Factor Factorial Experiment

 Step 4 Compute the sum of squares for interaction  Example: State of Ohio Wage Survey
a b A survey was conducted of hourly wages for a
SSAB = r  ( xij  xi .  x. j  x )2 sample of workers in two industries at three locations
i 1 j 1
in Ohio. Part of the purpose of the survey was to
 Step 5 Compute the sum of squares due to error determine if differences exist in both industry type
and location. The sample data are shown on the next
SSE = SST – SSA – SSB - SSAB slide.

25 26

Two-Factor Factorial Experiment Two-Factor Factorial Experiment

 Example: State of Ohio Wage Survey  Factors

Industry Cincinnati Cleveland Columbus


•Factor A: Industry Type (2 levels)
I $12.10 $11.80 $12.90 •Factor B: Location (3 levels)
I 11.80 11.20 12.70  Replications
I 12.10 12.00 12.20
II 12.40 12.60 13.00
•Each experimental condition is repeated 3 times
II 12.50 12.00 12.10
II 12.00 12.50 12.70

27 28

2
Two-Factor Factorial Experiment Two-Factor Factorial Experiment

 ANOVA Table  Conclusions Using the Critical Value Approach


•Industries:F = 4.19 < Fa = 4.75
Source of Sum of Degrees of Mean
Variation Squares Freedom Square p-Value Mean wages do not differ by industry type.
F

Factor A .50 .50 4.19


•Locations: F = 4.69 > Fa = 3.89
1 .06
Mean wages differ by location.
Factor B 1.12 2 .56 4.69 .03
Interaction .37 2 .19 1.55 .25 •Interaction: F = 1.55 < Fa = 3.89
Error 1.43 12 .12 Interaction is not significant.

Total 3.42 17

29 30

Two-Factor Factorial Experiment

 Conclusions Using the p-Value Approach


•Industries: p-value = .06 > a = .05
Mean wages do not differ by industry type.
•Locations: p-value = .03 < a = .05 Two-way ANOVA with Factorial Design
Mean wages differ by location.

•Interaction: p-value = .25 > a = .05 More about Interaction Effect


Interaction is not significant.

31 32

Example:
Questions of Interest
Capsule Dissolve Time
Suppose we are looking at two capsule types
(C or V) & two digestive fluids (Gastric or Duodenal)
1. What effect does capsule type
Randomly assign 5
have on the time to dissolve?
capsules of each type to
each of type of digestive 2. What effect does fluid type have
juice and
dissolve time.
observe
on the time to dissolve?
Xijk = measured dissolve
time for capsule k in 3. Do both capsule types dissolve in
digestive juice i and
capsule type j. the same manner in the two
i = 1 or 2 (i.e. G and D)
j = 1 or 2 (i.e. C and V)
different fluid types?
k = 1,2,3,4,5

33 34

3
Plotting the Results ~ Capsule Effect Plotting the Results ~ Fluid Effect

Time Until Bubbles (seconds)

Capsule Type Fluid Type

X 1  mean time for type C capsules to dissolve  43.05 seconds X 1  mean time for capsules to dissolve in gastric juice  45.7 seconds
X 2  mean time for type V capsules to dissolve  42.85 seconds X 2  mean time for capsules to dissolve in duodenal juice  40.2 seconds

There appears to be very little difference between the capsule Capsules take 5.5 seconds longer on average to dissolve in
types in terms of the time it takes them to dissolve. gastric juice compared to duodenal juice.

35 36

Preliminary Conclusion Plotting the Results ~ Capsule Effect Separately


Type C capsules dissolve faster in duodenal
juice than do type V capsules where for
gastric juice the opposite is true.

There is very little difference between the capsule types in


terms of the length in time it takes them to dissolve.
Capsules take about 5 seconds longer on average to dissolve in
gastric juice than in duodenal juice.

Then, let’s plot means of each levels in the Factors


X 11  mean time for C capsules to dissolve in gastric juice  49.8 seconds
X 12  mean time for V capsules to dissolve in gastric juice  41.6 seconds
X 21  mean time for C capsules to dissolve in duodenal juice  36.3 seconds
X 22  mean time for V capsules to dissolve in duodenal juice  44.1 seconds

Clearly the time to dissolve depends on what capsule is being


used and which juice it is being dissolved in.
37 38

Interactions
Interactions can “Mask” main effects
Type C capsules dissolve
faster than Type V in
duodenal juice, where
opposite is true when
gastric juice is used to
dissolve the capsules.

The capsule study is an example of situation where there is The apparent lack of
an interaction between the two factors being studied in a capsule effect is
terms of their effect on the numeric response. caused by the
interaction of capsule
An interaction occurs when the effect of one factor depends We say the interaction masks type and fluid type.
on the level of another factor. Here the effect of capsule
depends on the type of digestive juice used to dissolve it
the main effect of capsule
and vise versa. type.

39 40

4
Types of Interactions and Interpreting Types of Interactions and Interpreting
Interaction Plots Interaction Plots

Here both effects are masked Here the A main effect is


Here the mean by the interaction. This type Here the mean “masked” by the interaction. The
response is the same of interaction is called a response differs B main effect is significant,
for both levels of both “difference in direction” of the depending on the level although cannot be talked about
factors. effects. of B but not A. independently of the level of A.

41 42

Types of Interactions and Interpreting Types of Interactions and Interpreting


Interaction Plots Interaction Plots
This type of interaction is a
difference in magnitude in the
effect. The direction of A main
effect is the same for both levels
of B, however the A effect is
larger when B is at the 1st level.
Here the effect of A is the Here the A main effect is differs Here the effect of A is the same Here the A main effect is
same for both levels of B. depending on the level of B. The for both levels of B and vise differs depending on the level
There is minimal separation B main effect is masked by the versa. The response differs of B. Neither the A or B
between the two profiles for interaction as the means for B1 across the level of both factors main effects are masked by
the levels of B, thus B is not and B2 are the same. and both differences suggest the interaction.
significant significant A & B effects.

43 44

Example: Lifetime Number of Jobs


by Educational Level
Types of Interactions
 One measure of the health of a nation’s economy is how
quickly it creates jobs. One aspect of this issue is the
In summary there are types of interactions:
number of jobs individuals hold. As part of a study on job
Differences in Direction Differences in Magnitude tenure, a survey was conducted in which Americans aged
between 37 and 45 were asked how many jobs they have
held in their lifetimes. Also recorded were gender and
educational attainment. The categories are
 Less than high school (E1)
 High school (E2)
 Some college/university but no degree (E3)
 At least one university degree (E4)

Always construct an interaction plot to The data are shown for each of the eight categories of gender
and education. Can we infer that differences exist between
visualize the interaction or lack thereof ! genders and educational levels?

45 46

5
Data

Solution
47 48

Interaction Effects Interaction effect

 Change the sample associated with men who have not


finished high school (Treatment 1). We subtracted 6 from
the original numbers so that the sample in treatment 1 is
• 4, 3, 6, 10, 8, 11, 7, 3, 5, 9

There are small (not significant) differences between males and females in
factor Gender. There are significant differences between men and women
with different educational backgrounds. Finally, there is no interaction.

49 50

Question
Interaction Plot
data

Detergent manufacturers frequently make claims about the effectiveness of


their products. A consumer protection service decided to test the five best-
selling brands of detergent, where each manufacturer claims that its
product produces the “whitest whites” in all water temperatures. The
experiment was conducted in the following way. One hundred fifty white
sheets were equally soiled. Thirty sheets were washed in each brand—l0
with cold water, 10 with warm water, and 10 with hot water. After
washing, the “whiteness” scores for each sheet were measured with laser
equipment.
 Column 1: Water temperature code
 Column 2: Scores for detergent 1 (first 10 rows cold water, middle 10 rows
warm, and last 10 rows hot)
 Column 2: Scores for detergent 2 (same format as column 2)
 Column 3: Scores for detergent 3 (same format as column 2)
 Column 4: Scores for detergent 4 (same format as column 2)
 Column 5: Scores for detergent 5 (same format as column 2)
Perform a statistic analysis using a 5% significance level to determine whether there is sufficient
statistical evidence to infer that there are differences in whiteness scores between the five detergents,
differences in whiteness scores between the three water temperatures, or inter- action between
detergents and temperatures.

51 52

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