Suppose we want to determine whether there is a difference in the average test scores of students in three different schools: School A, School B, and School C. To test this hypothesis, we randomly select a sample of students from each school and administer a test. The data we collect is as follows:
- School A: 85, 92, 88, 90, 95
- School B: 75, 85, 80, 78, 82
- School C: 92, 88, 90, 94, 86
To perform an ANOVA, we first calculate the mean and variance of each group:
- School A: Mean = 90, Variance = 19.2
- School B: Mean = 80, Variance = 11.2
- School C: Mean = 90, Variance = 13.2
Next, we calculate the overall mean of all three groups, which is 86. We then calculate the sum of squares between groups (SSB) and the sum of squares within groups (SSW).
- SSB = 5 * ((90 – 86)^2 + (80 – 86)^2 + (90 – 86)^2) = 240
- SSW = (5-1)*19.2 + (5-1)*11.2 + (5-1)*13.2 = 141.6
The degrees of freedom for SSB is k-1, where k is the number of groups. In this case, k = 3, so the degrees of freedom for SSB is 2.
The degrees of freedom for SSW is N-k, where N is the total sample size and k is the number of groups. In this case, N = 15 and k = 3, so the degrees of freedom for SSW is 12.
Using these values, we can calculate the F-statistic:
F = (SSB/df_SSB) / (SSW/df_SSW) = (240/2) / (141.6/12) = 10.67
We can then compare this F-statistic to the critical F-value for our chosen significance level and degrees of freedom. If the F-statistic is greater than the critical F-value, we reject the null hypothesis and conclude that there is a statistically significant difference between the means of the groups.
In this example, assuming a significance level of 0.05, the critical F-value for 2 and 12 degrees of freedom is 3.89. Since our calculated F-statistic of 10.67 is greater than 3.89, we reject the null hypothesis and conclude that there is a statistically significant difference in the mean test scores between the three schools.