Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 34

2 - WAY A N A LY S I S

O F VA R I A N C E
2-Way ANOVA

ANOVA : What is it?


An ANOVA (Analysis of Variance), sometimes called an F test, is closely
related to the t test.

The major difference:

t - test ANOVA tests


measures the measures the difference
difference between the
between the means of
means of two groups more than two groups
2-Way ANOVA

“Two-Way” means groups are defined by 2 independent variables (IVs)

These IVs are typically called factors

With 2-Way ANOVA, there are two main effects and 1 interaction, so there are
3 F tests
2-Way ANOVA

Three types of ANOVA

1) Single Factor ANOVA

2) Two-Factor ANOVA Without Replication

3) Two-Factor ANOVA with Replication


2-Way ANOVA

Single Factor ANOVA

Example: the teaching method, on the measured outputs.

The measured outputs are the mean test scores for the groups that had the
different teaching methods applied to them.

The Null Hypothesis for this one factor states that varying that factor has no
effect on the outcome.
2-Way ANOVA

Two-Factor ANOVA Without Replication


Two-Factor ANOVA Without Replication - Allows testing of the original factor
plus one other factor.

For example, in addition to testing teaching methods, you could also test an
additional factor, such as whether differences in teaching ability caused
additional variation in the outcome of test average scores.

Each factor has a Null Hypothesis which states that varying that factor had no
effect on the outcome.
2-Way ANOVA

Two-Factor ANOVA With Replication


Two-Factor ANOVA With Replication allows for testing both factors as above.
This method also allows us to test the effect of interaction between the factors
upon the measured outcome.
The test is replicated in two places. This allows for analysis of  whether the
interaction between the two factors influences the measured outcome.

The Null Hypothesis for this interaction test states that varying the interaction
between the two factors has no effect on the measured outcome. Each of the
other two factors being tested also has its own Null Hypothesis.
2-Way ANOVA

Assumptions for the Two Factor ANOVA


1. Observations within each sample are independent

2. Populations are normally or approximately normally distributed

3. Populations from which the samples are selected must have equal variances
(homogeneity of variance)

4. The groups must have the same sample size


2-Way ANOVA

BASIC TWO -WAY ANOVA TABLE


Source of variation SS df MS F Pvalue Fcrit
[SS/df]
Main effect A

Main effect B

Interactive effect

Within

Total
2-Way ANOVA

Two-Way ANOVA – Computational formulas

CM = (ΣXi)2/N

SSTotal = ΣX2 – CM

SSE = ΣX2 – Σ(Tij)2


nij
CM compare means

SSA = Σ(Ti)2 – CM SSA is the sum of squared deviations for Variable A


ni SSB is the sum of squared deviations for Variable B. It is
NOT the sum of squares for Blocks – this is not a block
design!
SSB = Σ(Tj)2 – CM
SSAB = Σ(T )2
– Σ(T ) 2
– Σ(T ) 2
+ (ΣX) 2 SSAB is the sum of squared deviations for the interaction of
nj ij j i
n n ni n A and B
2-Way ANOVA

Example 1

1. An experiment investigates the effects of two treatments, illumination level


and type size of reading speed. Two levels of illumination, 15 foot-candles
and 30 foot-candles, are used. Three levels of type size are used: 6-point, 12-
point, and 18-point type. Test the independent and joint effects of these
treatments on reading speed (.05).
2-Way ANOVA

Reading speed (ave. words per minute)


6 point 12 point 18 point
15 fc 30 fc 15 fc 30 fc 15 fc 30 fc
378 415 454 439 432 426
408 396 394 467 411 428
357 451 452 477 466 464
353 455 396 410 411 412
414 398 419 417 460 475
2-Way ANOVA

Example 1 – hypothesis test for A (illumination)

• H0: No difference among means for levels of A


• HA: At least two A means differ significantly

• Test statistic: F=

• Rej. region: Fobt < F(1, 24, .05) = 4.26


2-Way ANOVA

Example 1 – hypothesis test for B (type size)

• H0: No difference among means for levels of B


• HA: At least two B means differ significantly

• Test statistic: F=

• Rej. region: Fobt < F(2, 24, .05) = 3.40


2-Way ANOVA

Example 1 – hypothesis test for AB interaction

• H0: A & B do not interact to affect means


• HA: A & B do interact to affect means

• Test statistic: F=

• Rej. region: Fobt < F(2, 24, .05) = 3.40


2-Way ANOVA
2-Way ANOVA
2-Way ANOVA

SSAB = 5380634.2 – 5409528.33 – 5413447.5 + 5406007.5


= 1646.667

SSTotal = ΣX2 – CM = 5437581.0 – 5406007.5


= 31573.5

SSE = SSTotal – SSA – SSB – SSAB = 18966.0


2-Way ANOVA

Source df SS MS F

A 1 3520.83 3520.83 4.46*


B 2 7440.00 3720.00 4.71*
AB 2 1646.67 823.33 1.04
Error 24 18966.0 790.25
Total 29 31573.5

* Reject H0.
2-Way ANOVA

Example 2

A researcher is interested in comparing the effectiveness of 3 different


methods of teaching reading, and in whether the effectiveness might vary as a
function of the reading ability of the students. Fifteen students with high
reading ability and fifteen students with low reading ability were divided into
three equal-sized group and each group was taught by one of these methods.
Listed on the next slide are the reading performance scores for the various
groups at school year-end.
2-Way ANOVA

Teaching Method
Ability A B C

High X 37.6 32.4 33.2


s2 2.8 9.3 11.7

LowX 20.0 18.4 17.6


s2 10.0 4.3 4.3
2-Way ANOVA

• (a) Do the appropriate analysis to answer the questions posed by the


researcher (all αs = .05)

• (b) The London School Board is currently using Method B and, prior to this
experiment, had been thinking of changing to Method A because they
believed that A would be better. At α = .01, determine whether this belief is
supported by these data.
2-Way ANOVA

Example 2 – hypothesis test for A

• H0: No difference among means for levels of A


• HA: At least two A means differ significantly

• Test statistic: F=

• Rejection region: Fobt < F(2, 24, .05) = 3.40


2-Way ANOVA

Example 2 – hypothesis test for B

• H0: No difference among means for levels of B


• HA: At least two B means differ significantly

• Test statistic: F=

• Rejection region: Fobt < F(1, 24, .05) = 4.26


2-Way ANOVA

Example 2 – hypothesis test for interaction

• H0: A and B do not interact to affect treatment means


• HA: A and B do interact to affect treatment means

• Test statistic: F=

• Rejection region: Fobt < F(2, 24, .05) = 3.40


2-Way ANOVA

SSE = 4 (2.8 + 9.3 + 11.7 + 10.0 + 4.3 + 4.3)


= 4 (42.4)
= 169.6

CM = =

= 21120.533
2-Way ANOVA

SSMethod =

= – 21120.533

= 21197.6 – 21120.533
= 77.066
2-Way ANOVA

SSAbility =

= 344656 – 21120.533
15
= 22977.066 – 21120.533
= 1856.533
2-Way ANOVA

For the interaction sum of squares, we begin with the value


2-Way ANOVA

Now, we can compute SSMA:

23070.4 – 21197.6 – 22977.066 + 21120.533

= 16.267
2-Way ANOVA

Source df SS MS F
Method 2 77.066 38.533 5.45*
Ability 1 1856.533 1856.533 262.72*
MxA 2 16.267 8.134 1.15
Error 24 169.6 7.067
Total 29

Reject HO for Method and for Ability, not for interaction.


2-Way ANOVA
2-Way ANOVA
2-Way ANOVA

You might also like