 # Analysis of variance

In the previous articles, we discussed statistical tests for continuous data when the number of groups does not exceed 2. When we have continuous data and more than 2 groups, we can use analysis of variance (ANOVA) to assess possible differences between them. To apply ANOVA, the data must be independent across the groups, normally distributed, and homogeneous. The aim of ANOVA is to examine whether the groups of interest have the same mean value (null hypothesis). The appropriate test to study this hypothesis is the F test. This test compares the 2 sources of variability of the measurements between groups and within groups. Generally, the F test provides reliable results, especially when the sample size is large and the groups are equal, even if the assumptions of normality and homogeneity are not met.

## Example

Research question: we want to compare the forces generated by 3 orthodontic wires. We will use a sample of about 10 wires per group and measure the generated forces on a testing machine. Then we will use 1-way ANOVA to assess whether there is a difference on average in the generated forces among any of the 3 wires. If we had only 2 wires, we could use the independent t test (or a nonparametric equivalent) ( Table I ).

Table I
Summary statistics for the forces (cN) generated by wires A, B, and C
Wire type n Mean SD Minimum Maximum
A 10 0.96 0.26 0.6 1.3
B 8 1.25 0.11 1.1 1.4
C 11 1.18 0.09 1.1 1.3

To study the null hypothesis,
H 0 : μ 1 = μ 2 = μ 3
, we use the 1-way ANOVA test (1 way because it uses only 1 factor, which is the type of wire). This test compares the variability of the measurements between each wire group with the variability of the measurements within the 3 groups. If the ratio of between-group to within-group variability is greater than 1, then ANOVA is possible, depending on how much larger than 1 this value is, to indicate that at least 1 wire generates forces that are statistically different on average from the other 2. This occurs when the generated forces within the wire groups are more similar compared with the generated forces between the wire groups. This ratio of variabilities is called the F test.

Tables II and III show the results of the ANOVA and describe the items in the ANOVA table.

Table II
Statistical software output showing the ANOVA table
Source ANOVA F P > F
Sum of squares df Mean square
Between groups 0.43 2 0.22 7.40 0.0029
Within groups 0.76 26 0.03
Total 1.193 28 0.04

Table III
Explanation of the ANOVA table
Source Sum of squares (SS) df Mean square (MS) F P value
Wire type (k ) SS between n − 1 SS/df between
‡ F ∗ = MS ( wire type ) MS ( error )

P ( F > F * | H 0 )
Error (residuals) SS within N − n SS/df within
Total (n ) Sum of wire type and error SSs N − 1 SSs/N – 1