Professional Documents
Culture Documents
ANOVA Step by Step
ANOVA Step by Step
2
G
SS total = X
2
N
Squares on that one larger sample. In terms of our new notation:
So for the Alcohol data, you first need to make X2 columns for each of the
treatment levels, then add up the columns and then add the three X2 's together.
Then you subtract G2/N:
2) Computing SSwithin:
2
( X)
SS = X 2
Then to get SSwithin you simply add up the SS from within each level of the IV:
SSwithin = SS
PSY295-001 1 of 4
Spring 2003
ANOVA STEP-BY-STEP
So for the Alcohol data there are three SS you need to compute first, one for each
level:
3) Computing SSbetween:
Recall that the variance between treatments measures the differences or variance
between the treatment means. This implies one way we could find the
SSbetween would be to compute a SS using the X's as the scores. That is,
we could consider our deviations (that we will square and sum) as the
deviation of each individual mean from the grand mean (the grand
mean is the over all mean of the entire set of data or G/N). Of course,
there is a computational formula that looks different from that, but is
much easier to use:
2 2
T ]G
SS betw = [
n N
Note: You should Always check to see if: SStotal = SSbetween + SSwithin
If this check does not come out right - you have made a mistake in your
calculations.
PSY295-001 2 of 4
Spring 2003
ANOVA STEP-BY-STEP
2) dfwithin = N - k To get the SSwithin we first computed the SS for each level and
then added them up. This is the same for dfwithin in a sense. For each level we have
"n - 1" degrees of freedom. Then we sum those n - 1 degrees of freedom across the
levels: (n - 1) + (n - 1) + (n - 1) + ... If you simplify this, you get N - k which is
the right number for the dfwithin.
Note: You should Always check to see if: dftotal = dfbetween + dfwithin
If this check does not come out right - you have made a mistake in your
calculations.
So now we have the 3 SS and the corresponding 3 df. What we need now is to
compute the variances.
PSY295-001 3 of 4
Spring 2003
Computing the between and within variances:
Recall that a variance is SS/df. In Anova the variances we compute are called
Mean Squares, symbolized "MS" (Because they are essentially mean squared
deviations)
So we can compute:
Note: In general we do not compute MStotal. Also, it is NOT TRUE that MStotal =
MSbetween + MSwithin.
Finally, because the F test is the variance between divided by the variance within,
we get our F-ratio:
F = MSbetween
MSwithin
Finally, you should always present what is called an Anova Summary Table that
contains the results of all of these calculations. It should look like:
Source SS df MS F
_____________________________________________________________
Between 20.133 2 10.067 6.426
Within 18.800 12 1.567
Total 38.933 14
_____________________________________________________________