0% found this document useful (0 votes)
33 views5 pages

MAP 716 Lecture 2 Two Way Anova

The document discusses two-way ANOVA, which is an extension of one-way ANOVA that allows researchers to analyze the effects of two independent variables on a single dependent variable simultaneously. A two-way ANOVA design involves two factors, each with two or more levels, and generates three F-values to test the main effects of each factor and their interaction effect. Assumptions of two-way ANOVA include normality, independence of samples, equal variances between populations, and equal sample sizes across groups.

Uploaded by

josephnjenga142
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views5 pages

MAP 716 Lecture 2 Two Way Anova

The document discusses two-way ANOVA, which is an extension of one-way ANOVA that allows researchers to analyze the effects of two independent variables on a single dependent variable simultaneously. A two-way ANOVA design involves two factors, each with two or more levels, and generates three F-values to test the main effects of each factor and their interaction effect. Assumptions of two-way ANOVA include normality, independence of samples, equal variances between populations, and equal sample sizes across groups.

Uploaded by

josephnjenga142
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

12/05/2023

MAP 716: BIOSTATISTICS II AND


COMPUTTING
Two-Way ANOVA
Lecture 2: Two Way Anova • The two-way analysis of variance is an extension to the
One-way Analysis of Variance.
• There are two independent variables (hence the name
two-way).
Lecturer • Two-Way ANOVA is sometimes referred as Factorial
Dr. Alice Lakati, PhD ANOVA
Senior Lecturer
Amref International University • Two Way ANOVA improves on one-way ANOVA in
that the researcher can simultaneously assess the
analysis. effects of two (or more) independent variables on
a single dependent variable within the same
• Thus, Two way ANOVA yields the same information
that two one-way ANOVA's would, but it does so in
one analysis
MAP 716: Biostatistics II and Computing by Dr As Lakati 1 MAP 716: Biostatistics II and Computing by Dr As Lakati 2

Two Way Anova… Two Way Anova…


• It also allows the investigator to determine the • The is similar to one-way ANOVA, and the
possible combined effects of the independent interpretation of the resulting F-values is also
variables. based on the same logic as in the one-way
• That is, it also assesses the ways in which these ANOVA.
variables interact with one another to influence • The difference is that where one-way ANOVA
scores on the dependent variable. only generates one F-value,
• Interaction effects can be a complex and difficult • Two-way ANOVA generates three F-values:
task, however, it is essential to the progress of one to test the main effects of each factor, and a
science, since in the real world many variables third to test the interaction effect (i.e., the
interact with one another to determine behavior. combined effect of the two factors).
MAP 716: Biostatistics II and Computting by MAP 716: Biostatistics II and Computting by
3 4
Dr As Lakati Dr As Lakati

Two Way ANOVA example Two Way Anova:2 by 2 Design


• In the simplest two-way ANOVA (2 x 2 design), four
different groups of participants would be needed.
• If the first factor (Factor A) is GENDER (where
level A1 is male employees and level A2 is female Gender Factor A
employees), and the second factor (Factor B)
is MASC (where level B1 is low-masculine employees Masculinity factor Male (A1) Female (A2)
B
and level B2 is high-masculine employees), four Low (B1) AIB1 A2B1
combinations would be required to permit a factorial
ANOVA. high ( B2) A1B2 A2B2
• Each unique combination is referred to as a cell.
• In this table, the four cells (in boldface) represent these
four possible combinations.
MAP 716: Biostatistics II and Computting by MAP 716: Biostatistics II and Computting by
5 6
Dr As Lakati Dr As Lakati

1
12/05/2023

Two Way Anova:2 by 2 Design.. Assumptions


• This factorial combination will allow us to compare the
scores of men vs. women (GENDER) and low-masculine • The populations from which the samples were
vs. high-masculine employees (MASC) on a given obtained must be normally or approximately
dependent variable. normally distributed.
• This would be the same as if we did two separate studies
and conducted two t-tests (one comparing the male vs. • The samples must be independent.
female scores, and one comparing low- vs. high-masculine • The variances of the populations must be
employees' scores). equal.
• It is more economical and efficient to use 2 way Anova
because we would get the same information from one
• The groups must have the same sample size.
study and one analysis (the 2 x 2 ANOVA).
• We are also able to assess the possible interaction effect of
the two independent variables combined.
MAP 716: Biostatistics II and Computting by MAP 716: Biostatistics II and Computting by
7 8
Dr As Lakati Dr As Lakati

Hypotheses
Factors
• There are three sets of hypothesis with the two-
way ANOVA. • The two independent variables in a two-way
ANOVA are called factors. The idea is that there
• The null hypotheses for each of the sets: are two variables, factors, which affect the
• The population means of the first factor are equal. This
is like the one-way ANOVA for the row factor. dependent variable.
• The population means of the second factor are equal. • Each factor will have two or more levels within
This is like the one-way ANOVA for the column it, and the degrees of freedom for each factor is
factor.
• There is no interaction between the two factors. This is
one less than the number of levels.
similar to performing a test for independence with
contingency tables.

MAP 716: Biostatistics II and Computting by MAP 716: Biostatistics II and Computting by
9 10
Dr As Lakati Dr As Lakati

EXAMPLE: Suppose we want to compare the cholesterol contents of four Two-Way ANOVA table
competing diet foods on the basis results three labs
Source of Variation SS df MS F

DIET LAB 1 LAB 2 LAB 3 Main Effect A given A, SS / df MS(A) / MS(W)


a-1

Diet food A 3.6 4.1 4.0 Main Effect B given B, SS / df MS(B) / MS(W)
b-1

Diet food B 3.1 3.2 3.9 Interaction Effect given A*B, SS / df MS(A*B) / MS(W)
(a-1)(b-1)

Diet food C 3.2 3.5 3.5 Within given N - ab, SS / df


ab(n-1)

Diet food D 3.5 3.8 3.8 Total sum of others N - 1,


abn - 1

MAP 716: Biostatistics II and Computting MAP 716: Biostatistics II and Computting
11 12
by Dr As Lakati by Dr As Lakati

2
12/05/2023

Two-Way ANOVA…. Two-Way ANOVA….


Interaction Effect
• Main Effect:
• The main effect involves the independent variables one • The interaction effect is the effect that one factor
at a time. has on the other factor. The degrees of freedom
• The interaction is ignored for this part. Just the rows or here are the product of the two degrees of
just the columns are used, not mixed. This is the part freedom for each factor.
which is similar to the one-way analysis of variance.
• Each of the variances calculated to analyze the main
effects are like the between variances

MAP 716: Biostatistics II and Computting by MAP 716: Biostatistics II and Computting by
13 14
Dr As Lakati Dr As Lakati

Two-Way ANOVA…. F-test


Within Variation: • There is an F-test for each of the hypotheses
• The Within variation is the sum of squares within each • The F-test is the mean square for each main effect
treatment group. You have one less than the sample size and the interaction effect divided by the within
(remember all treatment groups must have the same
sample size for a two-way ANOVA) for each treatment variance.
group. • The numerator degrees of freedom come from
• The total number of treatment groups is the product of the each effect, and the denominator degrees of
number of levels for each factor. freedom is the degrees of freedom for the within
• The within variance is the within variation divided by its variance in each case.
degrees of freedom
• The within group is also called the error.
MAP 716: Biostatistics II and Computting by MAP 716: Biostatistics II and Computting by
15 16
Dr As Lakati Dr As Lakati

Example…. Corn Two-Way ANOVA


• Two-way ANOVA is applicable when we examine the
simultaneous or joint effect of two factors on the mean of
• The type of seed and type of fertilizer are the two the response variable
factors we're considering. This 15 treatment • It has a continuous response variable
groups. • Two categorical predictors
• There are 3-1=2 degrees of freedom for the type of • E.g? What are the joint effects of gestational age and gender
seed, and 5-1=4 degrees of freedom for the type of of the baby on its birth weight?
fertilizer. There are 2*4 = 8 degrees of freedom for • We compare the mean weight in each of the groups defined
the interaction between the type of seed and type by the levels of gender and gestational age group
of fertilizer.

MAP 716: Biostatistics II and Computting by MAP 716: Biostatistics II and Computting by
17 18
Dr As Lakati Dr As Lakati

3
12/05/2023

Interaction Interaction….
• Since we are dealing with two categorical predictors we • If the two factors do interact, we can speak without
need to test whether the effects of the two factors are qualification of the effect of each factor on the
additive or interactive mean response:
• An interaction between 2 factors occurs when the effect • E.g The effect of gestational age group on birth weight
on one factor changes the level of the other factor as is same for girls and baby boys
changes
• E.g gender and gestational age interact in their effect on • However if the factors do not interact, we have to
birth weight if the mean difference in birth weight qualify our statements about the effect of each
between premature and full term babies for girls is factor by giving it for every level of the other factor
different from the mean difference in birth weight
between premature and full term babies for boys

MAP 716: Biostatistics II and Computting by MAP 716: Biostatistics II and Computting by
19 20
Dr As Lakati Dr As Lakati

Two-Way ANOVA with


Interaction … Interaction Term
• An important issue in the analysis is whether such
an interaction exist in the population Source SS df MS F

• If not the conclusions and interpretations are much Main Effect A SSA A,
a-1
SS / df MS(A) / MS(W)

simpler
Main Effect B SSB B, SS / df MS(B) / MS(W)
• Preliminary test for interaction is an important b-1

component for the analysis Interaction Effect SSAB A*B, SS / df MS(A*B) / MS(W)
• The test is carried out by including the interaction (a-1)(b-1)

term in the model and testing the significance using Within (Error) SSW N - ab, SS / df
the F statistic based on the mean square ab(n-1)

Total sum of N - 1,
othe abn - 1
rs

MAP 716: Biostatistics II and Computting by MAP 716: Biostatistics II and Computting
21 22
Dr As Lakati by Dr As Lakati

Example Example….

• A psychologist, decided to teach old dogs and puppies new Type of Trick
tricks. So he adopts 15 old dogs and 15 puppies. Then
"Sit" "Shake" "Roll Over"
attempted to teach each of the 30 dogs one of the standard (Column 1) (Column 2) (Column 3)
dog tricks, "sit", "stay", and "roll over."
Puppies 2 4 6
• Teaching only one trick to each dog, you keep a record of (Row 1) 1
3
5
4
9
7
how many days it takes before they learn the tricks. The 1
2
6
7
8
10
results of your experiment are listed in the table
below. Use that data to conduct a two-way analysis of
variance to determine if old dogs can learn new tricks. Old Dogs
(Row 2)
2
5
9
10
13
12
2 11 15
4 13 17
3 7 13

MAP 716: Biostatistics II and Computting by MAP 716: Biostatistics II and Computting
23 24
Dr As Lakati by Dr As Lakati

4
12/05/2023

Start with.. Hypotheses TWO-WAY ANOVA TABLE


Source of Variation Sums of Degrees of Mean Square F
Squares Freedom
A. Main effect A:
• H0: There is no difference between the time it takes an old dog to learn a
trick and a puppy to learn a trick.
H1: There is a difference between the time it takes an old dog to learn a 124.034 1 124.034 47.705
trick and a puppy to learn a trick. Main effect A
Age of Dog (Rows)

B. Main effect B Main Effect B 366.067 2 183.034 70.398


H0: There is no difference between the time it takes to learn the Type of Trick
different types of tricks. Columns
H1: There is a difference between the time it takes to learn the Interaction 28.466 2 14.233 5.474
different types of tricks.

Within 62.4 24 2.600


C. Interaction
H0: There is no interaction..
H1: There is an interaction Total 580.967 29

MAP 716: Biostatistics II and Computting by MAP 716: Biostatistics II and Computting
25 26
Dr As Lakati by Dr As Lakati

Graph: Descriptive

MAP 716: Biostatistics II and Computting


27
by Dr As Lakati

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy