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

# 2/26/2009

Purpose:

## To look for a statistically significant

relationship between two variables
Analysis of Variance where the independent variable is
(ANOVA) nominal or categorical and the
dependent variable is typically
interval/ratio

significant?)

## Example of a One Way ANOVA:

Educational Attainment (Measured in Years) for Four
Demographic Groups (GSS data) Educational Attainment (Measured in Years) for
Four Demographic Groups (GSS data)
White Males Black Males White Females Black Females
16 16 16 14
White Males Black Males White Females Black Females
18 12 12 10
14 11 14 12 16 16 16 14
14 14 14 13 18 12 12 10
16 11 11 14 11 14 12
16 11 14 14 14 13
16 11 11
16 11
What might be our hypothesis? Our null hypothesis?
Which group appears to have most education? Least?
Could we use tt--tests to examine this? Explain.

## Educational Attainment (Measured in Years) for Four

Groups (GSS data) Affect of Demographic Group on Educational
Attainment (Measured in Years)
White Males Black Males White Females Black Females
16 16 16 14
18 12 12 10
White Males Black Males White Females Black Females
14 11 14 12
14 14 14 13 16 16 16 14
16 11 11 18 12 12 10
16 11 14 11 14 12
Y = 15.67 13.25 13.00 12.00 14 14 14 13
S = 1.51 2.22 2.00 1.58 16 11 11
S2 = 2.27 4.92 4.00 2.50 16 11
After examining the Mean, SD, and Variance is it easier
to find differences? Why is this considered a “one-
“one-way” ANOVA?
Are the differences we see true differences in the There is one dependent (education) and one independent
population or only due to sampling error? (group membership) variable.

1
2/26/2009

Assumptions of ANOVA:
Statement of Null Hypothesis:
1. Independent random samples There is no difference in education
(selection of one sample has no effect between demographic groups.
on another)
u1 = u2 = u3 = u4
2.
2 Dependent
D d t variable
i bl iis iinterval-
interval
t l-ratio
ti
(ordinal is sometimes used)
Statement of Hypothesis:
3. Population is normally distributed
Not all demographic groups have equal
4. Population variances are equal (in education.
our example variances are close enough)

## How does ANOVA work?

When considering our example,
ANOVA examines the difference is there variation among the
between the samples (or groups) as scores within one of the
well as the difference within a single samples (or groups)?
sample
l (or
( group).)
That is, are all the scores alike
These differences can also be (no variation) or is there a
referred to as the variance or broad variation in scores?
variation.

## How does ANOVA work? Calculating an ANOVA means that

we want to calculate the F
ANOVA allows us to determine statistic so we can determine the
whether the variance between likelihood of obtaining the scores
samples (or groups) is larger than (data) by chance.
the
th variance
i within
ithi the
th samplesl
(or groups). There are six steps to calculating
the F statistic:
Why is this information valuable?

2
2/26/2009

(Calculating ANOVA)
(Calculating ANOVA)

(1) “sum of squares” between the (4) using the information collected in
groups (i.e., sum of squared steps 1 – 3 to calculate the “mean
deviations), square between” and “mean square
within
within”
(2) “sum of squares” within the
groups, (5) using this info. to create the F
ratio (or F statistic)
(3) degrees of freedom for each.
(6) Making a decision

## (a) determining the mean education

(Step 1) Between-
Between-group for the four groups, that is, the
sum of squares (SSB) overall mean
measures the (squared)
difference in average years (b) determining the difference
of education between our between each group mean and the
four groups. overall mean,

## (c) squaring these differences

between each sample mean and
the overall mean,

## This tells us the sum of squared

deviations between the sample
(d) multiplying each squared
means and the overall mean
difference by the number of
score.
scores or cases in its respective
group,
group and
SSB
B measures the
h difference
d ff in
average years of education
(e) summing the squared differences.
between the groups.

3
2/26/2009

## Educational Attainment (Measured in Years) for Four

Groups (GSS data)
(2) Within-
Within-group sum of squares (SSW)
White Males Black Males White Females Black Females
measures the variation of scores within
Y = 15.67 13.25 13.0 12.0
each single sample or group (i.e., the
S = 1.51 2.22 2.00 1.58 variation between each individual score and
S2 = 2.27 4.92 4.00 2.50 its group mean).

## It is also thought of as the amount of

(15.67 + 13.25 +13.0 +12.0)/4 = 13.57 = overall mean
unexplained variation after considering the
6(15.67 - 13.57)2 = 26.46 variation found between each sample (or
4(13.26 – 13.57)2 = .38 group) and the dependent variable.
6(13.0 – 13.57)2 = 1.95
5(12.0 – 13.57)2 = 12.32
41.11 (SSB
(SSB or the sum of squared
deviations between each group mean and the overall mean)

## Educational Attainment (Measured in Years) for Four

Groups (GSS data)

## White Males Black Males White Females Black Females

(16-15.67)2
(16- 16 (same) 16 (same) 14 (same)
(18--15.67)2
(18 12 12 10 The total sum of squares (SST)
(14--15.67)2
(14 11 14 12 refers to the variation found within
14 . 14 14 13 each group plus the variation found
16 . 11 11
16 . sum (y – y)2 sum (y – y)2 11 between the groups.
sum (y – y)2 sum (y – y)2
SST = SSB + SSW
Y = 15.67 13.25 13.0 12.0
S = 1.51 2.22 2.00 1.58
S2 = 2.27 4.92 4.00 2.50

## Calculating the SSW = sum of the four group’s sum of

squared deviations or the unexplained variation after
considering SSB

Decomposing the SST for a single case The difference between his group mean
helps to see that SSW is the variation (15.67) and the overall mean is 2.10
left after considering SSB. That is, it (SSB = 15.67 – 13.57)
can help us see that: SSW + SSB = SST.
Looking within his group, the difference
Let’s take the fifth white male with 16 between his score and his g group’s
p mean
yrs of education. The difference is .33 years (SSW
(SSW = 16
16--15.67)
between his score and the overall mean
(13.57) yrs is 2.43 (16 – 13.57). This is When adding his SSB (2.10) and SST
equal to the SSB + SSW. More (.33), we get the total sum of squares
specifically: (SST
SST)) for this case (2.43).

4
2/26/2009

## (4) In order to use this information to

calculate the F statistic we must determine
the mean square between and mean square
within. To calculate the
degrees of freedom between
F statistic = mean square between
=
MSB and the degrees of freedom within:
within:
mean square within MSW
DFW = ((# of cases)) – (#
( of g
groups)
p )

## MSB = Sum of Squares Between DFB = (# of groups) – 1

Degrees of Freedom Between

## MSW = Sum of Squares Within

Degrees of Freedom Within

## (5) Create the F statistic

For our example when calculating the
mean square between = SSB/DFB: F = Mean Sq Between = SSB/DFB
Mean Sq Within SSW/DFW
SSB = 41.11
= 13.70 (for our example:
DFB = 4 – 1 = 3 F = 13.70/3.30 = 4.15)

## A larger F statistic means that there is

Mean square within = SSW/DFW: more variation between groups than within
groups.
SSW = 56.08 = 3.30
DFW = 21 – 4 = 17 A larger F statistic supports the hypothesis
that the groups are affecting the dependent
variable.

## (6) Making a decision

Summary:
1. Determine a specific alpha (such
as .05) and refer to the appropriate
F = SSB/DFB = Mean Sq Between
alpha f distribution table (such as the
SSW/DFW Mean Sq Within .05 f table or the .01 f table) to
determine the probability of obtaining a
F = 41.11/3 = 13.70 = 4.15 particular F statistic.
56.08/17 = 3.30
2. To read the table you must select the
two degrees of freedom used to
calculate the f statistic (in our example
these were 3 & 17).

5
2/26/2009

## (6) Making a decision

(6) Making a decision
3. Determine the “critical E” found in Is our hypothesis supported
the table for the corresponding at the .05 level?
degrees of freedom and alpha
(eg
eg.,
., 3.20
3 20 is found for 3 and 17 DF)
Our F statistic would need to be
4. If the calculated F is larger than larger than 3.20.
the corresponding F, then the Since it is, the answer is Yes.
hypothesis is supported.

## The F statistic doesn’t advise us

about which groups are different,
(6) Making a decision
only that educational attainment
Is our hypothesis supported does differ significantly by
at the .01 level? demographic group members.

## That is, we reject the null

Our F statistic would need to be
hypothesis and conclude that the
larger than 5.18. Since it is not,
years of education do vary by
the answer is NO.
group membership.

SSB
Eta2 =
While we know that “years of SST
education” does vary by or
demographic group, the F test
doesn’t give us a measure of 41.11 .42
=
association. 97.19

## How do we determine the Thus, 42% of the variation in educational

attainment can be attributed to
strength of the relationship
demographic group membership.
between education and
demographic group? Or, 42% of the variation in the dependent
variable (educational attainment) can be
Eta2 explained by the independent variable
(group membership)