The logic of ANOVA (Analysis Of Variance)

Variances in general:

Sum of Squares (of deviations from the mean): SS = (X - M)2

Variance: s2 = SS/df = (X - M)2 / (n-1)

An F-ratio is a ratio of two independent estimates of the same population variance.

-variance WITHIN each group is due to experimental error + individual differences: these explain why one score is different from another within a treatment group, where all participants have been treated the same

-variance BETWEEN group means is due to experimental error + individual differences + treatment effects: these explain why a score in one treatment group is different from a score in another treatment group, i.e., the same reasons as the within groups differences, plus the additional fact that they've been treated differently

-but if Ho is true, then 1 = 2 = 3 = ...., or in other words, there is NO treatment effect

-so if Ho is TRUE, then the ratio of BETWEEN to WITHIN variance actually IS a ratio of two estimates of the same population variance and therefore fits an F distribution, because

BET =exp'tal error + indiv diffs + trtmt effects =exp'tal error + indiv diffs + ZERO =exp'tal error + indiv diffs

W/INexp'tal error + indiv diffsexp'tal error + indiv diffsexp'tal error + indiv diffs

-which is equal to about 1, usually... but it would be strange if it were EXACTLY 1 because that would mean the two variance estimates were exactly the same, just like it would be strange if two samples from the same population had the exact same variances; we expect there to be sampling error

-the F distribution tells us the probabilities of getting various possible degrees of divergence from 1, just due to sampling error making the numerator different from the denominator

-the bigger the F-ratio, the less likely it is to occur when the numerator and denominator are representing the same thing -- that is, when the null hypothesis is true

-so we decide that if the F-ratio we calculate is big enough, we'll conclude that the null hypothesis is NOT true -- that the treatment effects are NOT zero -- and that the treatment effects are what's making the numerator so much bigger than the denominator

-an F-ratio that's "big enough" to reject Ho is, according to convention, one that would occur only 1 out of 20 times when ONLY sampling error is at work, ie, when the null hypothesis is true; in other words, a value of F big enough to cut off the area under the F distribution curve that is the most extreme .05 of the total area

Now we just need to calculate the actual variances of interest.

-the variance of ANY set of number is just the sum of the squared deviations from the mean of those numbers, divided by the degrees of freedom of those numbers: that is, SS/df

-so we compute that for the scores WITHIN each group, to get the F-ratio's denominator, and then we compute it for the means of the two groups as an estimate of the variance BETWEEN the groups to get the F-ratio's numerator

-the needed information for BET and W/IN groups variances is the BET and W/IN groups degrees of freedom and the BET and W/IN groups Sums Of Squares

-then we make the ratio of BET and W/IN groups variances, and compare that calculated F-value to the tabled F distribution, to see if we've got something that would be unlikely to occur if the null hypothesis were true

The information for the F-ratio is summarized in a table like this, which just lists all the ingredients needed. "MS" just means "Mean Square", short for "mean squared deviation from the mean" -- which is exactly what a variance is, in that it's the SS divided by df. (Okay, it's not technically a mean, because we divide by df or n-1 instead of by n; but we CALL it a mean.) So MS just means "variance" -- it's just an alternative to writing "s2". To get F we need BETWEEN and WITHIN variances, and to get variances we first compute SS and df for both:

Source of VarianceSSdfMSF

Between GroupsSSBETdfBETMSBETMSBET / MSW/IN

Within GroupsSSW/INdfW/INMSW/IN

Degrees of freedom:

For the BETWEEN groups variance, degrees of freedom is just the number of groups minus 1, so if there are k groups, df = k-1. (That's the number of group means that are free to vary around the overall grand mean of all the scores in the experiment.)

For the WITHIN groups variance, degrees of freedom is the sum of the degrees of freedom within each group, so df = (n1-1) + (n2-1) + (n3-1) + ... If all the groups have equal n's, then dfW/IN is just the df in one group times the number of groups, or df = k(n-1) -- which could also be written as kn - k, and since kn is the number of groups times the number of subjects in each group, kn is the total number of subjects in the experiment, sometimes identified with a capital N. That's why the textbook says dfW/IN = N-k. It's probably more intuitive to realize you're adding up the df in each group though.

Sums Of Squares:

The textbook gives computational formulas for these Sums of Squares, but we're only concerned with the basic formulas that tell you what they actually mean. (Notice that I'm referring to the overall mean of all the scores as "Moverall.")

For the BETWEEN groups variance, first figure what we can usefully call SSmeans: the sum of squares using the group means. There are k of them, and you find the sum of their squared deviations from their mean just like you'd do for any other collection of numbers. That is,

SSmeans = (M1-Moverall)2 + (M2-Moverall)2 + (M3-Moverall)2 + ...

The additional wrinkle is that you then have to multiply that SSmeans by n to get the BETWEEN groups SS we'll need: SSBET = n(SSmeans). The reason for this is that the SSBET is supposed to represent the group mean's distance from the overall mean, not just for each group, but for every subject in each group. Essentially, we're saying if there are three subjects in each group, we're doing this:

SSBET =for the three subjects in group 1, [(M1-Moverall)2 + (M1-Moverall)2 + (M1-Moverall)2] +

for the three subjects in group 2, [(M2-Moverall)2 + (M2-Moverall)2 + (M2-Moverall)2] +

for the three subjects in group 3, ...

which can be shortened to

SSBET = n1(M1-Moverall)2 + n2(M2-Moverall)2 + n3(M3-Moverall)2 + ...

And that formula works all the time, but if the n's are equal in all the groups we can shorten it even more to

SSBET = n[(M1-Moverall)2 + (M2-Moverall)2 + (M3-Moverall)2 + ...]

which says

SSBET = n(SSmeans)

For the WITHIN groups variance, the SS is easy: SSW/IN = SS1+SS2+SS3+..., that is, it's just the sum of all the SS's in each group separately.

Now the table can be filled in with these formulas:

Source of VarianceSSdfMSF

Between Groupsn(SSmeans)k-1SSBET/dfBETMSBET/MSW/IN

Within GroupsSS1+SS2+SS3+...(n1-1)+(n2-1)+(n3-1)+...SSW/IN/dfW/IN

Notice that the WITHIN groups MS is [(SS1+SS2+SS3+...)/(df1 + df2 + df3 + ...)], which is exactly how we calculate the "pooled variance" s2p in an independent groups t-test; though of course in a t-test there are only two groups, so we have just [(SS1+SS2)/(df1+df2)].

Once you've calculated an F ratio from the data, you compare it to the F listed in the table using both the dfBET and dfW/IN to look it up. The "numerator df" for the table is dfBET and the "denominator df" is dfW/IN so we're looking for F(dfBET , dfW/IN) in the table. The table only lists two F-values from that whole F(dfBET , dfW/IN) distribution: a smaller one that cuts off the most extreme 5% of the area under the curve, and a larger one that cuts off the most extreme 1%. Using a computer program like SPSS, you'd get the proportion of the area under the curve cut off by exactly the F you computed. But without SPSS, at least we can say whether the probability of getting our F when the null hypothesis is true is less than .05 (and also whether it's less than .01). All it takes is for our F to be larger than the one listed in the table.