ANOVA STEP-BY-STEP

The Sums of Squares:

1) Computing SStotal: The SStotal is the SS based on the entire set of scores in the study. So computing this SS is the same as if you just stacked your different treatment samples together to form a single sample and then computed the Sum of 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:

1ozX23ozX25ozX2

0 0 2 4 416

1 1 3 9 636

0 0 0 0 3 9

2 4 3 9 2 4

1 1 1 1 3 9

4 6 9 23 18 74

k = 3, n = 5, N = 15, T1 = 4, T2 = 9, and T3 = 18, and G = 31

ΣX2 = sum of the ΣX2 for each level of the factor = 6 + 23 + 74 = 103

So SStotal = 103 - 312 = 103 - 961/15 = 38.933

15

PSY295-0011 of 4

Spring 2003

ANOVA STEP-BY-STEP

2) Computing SSwithin:

To compute SSwithin you first need to compute the SS

within each level of the IV using the regular SS formula:

Then to get SSwithin you simply add up the SS from within each level of the IV:

SSwithin = ΣSS

So for the Alcohol data there are three SS you need to compute first, one for each level:

SS1 = 6 - 42/5 = 2.800

SS2 = 23 - 92/5 = 6.800

SS3 = 74 - 182/5 = 9.200

Then you add these three SS up to get SSwithin:

SSwithin = 2.800 + 6.800 + 9.200 = 18.800

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 '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:

So for the Alcohol data,

SSbetween = (42/5 + 92/5 + 182/5) - 312/15 = 84.2 - 64.067 = 20.133

Note: You should Always check to see if: SStotal = SSbetween + SSwithin

PSY295-0011 of 4

Spring 2003

ANOVA STEP-BY-STEP

If this check does not come out right - you have made a mistake in your calculations.

So for the Alcohol data:

Does 20.133 + 18.8 = SStotal? Yes 38.933 = 38.933.

In computing the degrees of freedom, you should keep in mind that:

1) Each df is associated with a specific SS

2) The df are approximately equal to the number of items that went into computing the corresponding SS minus 1. So if n things went in, then df = n - 1.

Computing the df:

1) dftotal = N - 1 Because SStotal was computed using the entire set of N scores.

So for the Alcohol study, dftotal = 15 - 1 = 14

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.

So for the Alcohol study, dfwithin = 15 - 3 = 12.

3) dfbetween = k - 1 Because SSbetween is really based on the deviations of each treatment mean from the grand mean, the number of items in this SS is the number of treatment means = k. So the dfbetween = k - 1.

So for the Alcohol study, dfbetween = 3 - 1 = 2.

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.

For the Alcohol study: does 2 + 12 = dftotal? Yes 14 = 14!

So now we have the 3 SS and the corresponding 3 df. What we need now is to compute the variances.

PSY295-0011 of 4

Spring 2003

ANOVA STEP-BY-STEP

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:

MSbetween = SSbetween = the variance between treatments

dfbetween

and

MSwithin = SSwithin = the variance within treatments

dfwithin

So for the Alcohol study,

MSbetween = 20.133/2 = 10.067

MSwithin = 18.800/12 = 1.567

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

So for the Alcohol study, F = 10.067/1.567 = 6.426.

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:

SourceSSdfMSF

______

Between20.133 210.0676.426

Within18.800121.567

Total38.93314

______

PSY295-0011 of 4

Spring 2003