### Analysis of Variance

#### Introduction

#### Completely randomized design

#### Full factorial design

#### Randomized block design

#### Calculators

#### Appendices

### Analysis of Variance:

Table of Contents

#### Introduction

#### Completely randomized design

#### Full factorial design

#### Randomized block design

#### Calculators

#### Appendices

# Hartley's Fmax Test for Homogeneity of Variance

Hartley's Fmax test is used to test the assumption that variances are equal across groups. The test is easy to implement and produces valid results, assuming underlying assumptions are met (or nearly met).

### Underlying Assumptions

Hartley's Fmax test makes two assumptions about group data:

**Normality.**Scores within each group should be normally distributed.**Equal sample size.**The number of observations ( n ) in each group should be equal.

As a practical matter, few datasets in the real world satisfy both assumptions *exactly*. With that in mind,
here are some guidelines for dealing with violations of assumptions:

- When there are small differences in sample size, use the largest sample size to compute degrees of freedom. This will produce just a small bias in the test - causing us to conclude that the variances are heterogeneous a little bit more often than we should.
- If groups differ greatly in sample size, consider Bartlett's test instead of Hartley's Fmax test. Bartlett's test can handle unequal sample sizes, and the test is easy to implement with Bartlett's Test Calculator.
- Because Hartley's Fmax test is sensitive to departures from normality, a normality test is prudent. Several ways to check for departures from normality are described at: How to Test for Normality: Three Simple Tests.

## Hartley's Test: Step-by-Step

Hartley's Fmax test is easy to implement and interpret - just five simple steps.

**Step 1.**Compute the sample variance ( s^{2}_{j}) for each group.kΣj=1( X_{ i, j}- X_{ j})^{ 2}s ^{2}_{j}=( n _{ j}- 1 )where X

_{ i, j}is the score for observation*i*in Group*j*, X_{ j}is the mean of Group*j*, and n_{ j}is the number of observations in Group*j*.**Step 2.**Compute an F ratio from the following formula:F

_{RATIO}= s^{2}_{MAX}/ s^{2}_{MIN}where s

^{2}_{MAX}is the largest group variance, and s^{2}_{MIN}is the smallest group variance.**Step 3.**Compute degrees of freedom ( df ).df = n - 1

where

*n*is the largest sample size in any group.**Step 4.**Based on the degrees of freedom ( df ) and the number of groups ( k ), find the critical F value from the Table of Critical F Values for Hartley's Fmax Test.**Note:**The critical F values in the table are based on a significance level of 0.05.**Step 5.**Compare the observed F ratio computed in Step 2 to the critical F value recovered from the Fmax table in Step 4. If the F ratio is smaller than the Fmax table value, the variances are homogeneous. Otherwise, the variances are heterogeneous.

**Example 1**

The table below shows sample data for five groups. Based on the data, would you say that group variances are homogeneous?

Group 1 | Group 2 | Group 3 | Group 4 | Group 5 |
---|---|---|---|---|

1 2 3 4 5 |
1 3 5 7 9 |
1 4 7 10 13 |
1 5 9 13 17 |
1 6 11 16 21 |

We will use Hartley's Fmax test to test the assumption that variances are equal across groups.

**Step 1.**First, we compute sample variances for each group, as shown below.Variance Group 1 Group 2 Group 3 Group 4 Group 5 2.5 10 22.5 40 62.5 **Step 2.**We identify the smallest group variance ( 2.5 ) and the largest group variance ( 62.5 ). We use these inputs to compute an F ratio from the following formula:F

_{RATIO}= s^{2}_{MAX}/ s^{2}_{MIN}F

_{RATIO}= 62.5 / 2.5F

_{RATIO}= 25**Step 3.**Compute degrees of freedom ( df ), based on the biggest sample size ( n ) in any group.df = n - 1

df = 5 - 1 = 4

**Step 4.**Based on the degrees of freedom ( df=4 ) and the number of groups ( k=5 ), we find that the critical F value from the Table of Critical F Values for Hartley's Fmax Test is 25.2.**Step 5.**Since the F ratio computed in Step 2 ( 25 ) is smaller than the critical F value from the Fmax table ( 25.2 ), we accept the hypothesis that variances are equal or nearly equal.

**Note:** Other tests, such as Bartlett's test, can also be used to test for homogeneity
of variance. For comparison, we applied Bartlett's test to above problem. If you're curious to see whether
Bartlett's test agreed with Hartley's test, go to
Bartlett's test of normality: Example 1.

## Hartley's Fmax Table

The table below shows critical values of Hartley's Fmax, assuming a significance level of 0.05.

Choose a critical value, based on the degrees of freedom ( df ) and number of groups ( k ) in your design. If the critical value is bigger than the F ratio computed from sample data, you can assume that group variances are equal or close to equal.

df | Number of groups (k) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | |

2 | 39.0 | 87.5 | 142 | 202 | 266 | 333 | 403 | 475 | 550 | 626 | 704 |

3 | 15.4 | 27.8 | 39.2 | 50.7 | 62.0 | 72.9 | 83.5 | 93.9 | 104 | 114 | 124 |

4 | 9.6 | 15.5 | 20.6 | 25.2 | 29.5 | 33.6 | 37.5 | 41.1 | 44.6 | 48.0 | 51.4 |

5 | 7.2 | 10.8 | 13.7 | 16.3 | 18.7 | 20.8 | 22.9 | 24.7 | 26.5 | 28.2 | 29.9 |

6 | 5.82 | 8.38 | 10.4 | 12.1 | 13.7 | 15.0 | 16.3 | 17.5 | 18.6 | 19.7 | 20.7 |

7 | 4.99 | 6.94 | 8.44 | 9.70 | 10.8 | 11.8 | 12.7 | 13.5 | 14.3 | 15.1 | 15.8 |

8 | 4.43 | 6.00 | 7.18 | 8.12 | 9.03 | 9.78 | 10.5 | 11.1 | 11.7 | 12.2 | 12.7 |

9 | 4.03 | 5.34 | 6.31 | 7.11 | 7.80 | 8.41 | 8.95 | 9.45 | 9.91 | 10.3 | 10.7 |

10 | 3.72 | 4.85 | 5.67 | 6.34 | 6.92 | 7.42 | 7.87 | 8.28 | 8.66 | 9.01 | 9.34 |

12 | 3.28 | 4.16 | 4.75 | 5.30 | 5.72 | 6.09 | 6.42 | 6.72 | 7.00 | 7.25 | 7.43 |

15 | 2.86 | 3.54 | 4.01 | 4.37 | 4.68 | 4.95 | 5.19 | 5.40 | 5.59 | 5.77 | 5.95 |

20 | 2.46 | 2.95 | 3.29 | 3.54 | 3.76 | 3.94 | 4.10 | 4.24 | 4.37 | 4.49 | 4.59 |

30 | 2.07 | 2.40 | 2.61 | 2.78 | 2.91 | 3.02 | 3.12 | 3.21 | 3.29 | 3.36 | 3.39 |

60 | 1.67 | 1.85 | 1.96 | 2.04 | 2.11 | 2.17 | 2.22 | 2.26 | 2.30 | 2.33 | 2.36 |

∞ | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |

df | Number of groups (k) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|

2 | 3 | 4 | 5 | 6 | 7 | ||||||

2 | 39.0 | 87.5 | 142 | 202 | 266 | 333 | |||||

3 | 15.4 | 27.8 | 39.2 | 50.7 | 62.0 | 72.9 | |||||

4 | 9.6 | 15.5 | 20.6 | 25.2 | 29.5 | 33.6 | |||||

5 | 7.2 | 10.8 | 13.7 | 16.3 | 18.7 | 20.8 | |||||

6 | 5.82 | 8.38 | 10.4 | 12.1 | 13.7 | 15.0 | |||||

7 | 4.99 | 6.94 | 8.44 | 9.70 | 10.8 | 11.8 | |||||

8 | 4.43 | 6.00 | 7.18 | 8.12 | 9.03 | 9.78 | |||||

9 | 4.03 | 5.34 | 6.31 | 7.11 | 7.80 | 8.41 | |||||

10 | 3.72 | 4.85 | 5.67 | 6.34 | 6.92 | 7.42 | |||||

12 | 3.28 | 4.16 | 4.75 | 5.30 | 5.72 | 6.09 | |||||

15 | 2.86 | 3.54 | 4.01 | 4.37 | 4.68 | 4.95 | |||||

20 | 2.46 | 2.95 | 3.29 | 3.54 | 3.76 | 3.94 | |||||

30 | 2.07 | 2.40 | 2.61 | 2.78 | 2.91 | 3.02 | |||||

60 | 1.67 | 1.85 | 1.96 | 2.04 | 2.11 | 2.17 | |||||

∞ | 1 | 1 | 1 | 1 | 1 | 1 |

df | Number of groups (k) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|

8 | 9 | 10 | 11 | 12 | |||||||

2 | 403 | 475 | 550 | 626 | 704 | ||||||

3 | 83.5 | 93.9 | 104 | 114 | 124 | ||||||

4 | 37.5 | 41.1 | 44.6 | 48.0 | 51.4 | ||||||

5 | 22.9 | 24.7 | 26.5 | 28.2 | 29.9 | ||||||

6 | 16.3 | 17.5 | 18.6 | 19.7 | 20.7 | ||||||

7 | 12.7 | 13.5 | 14.3 | 15.1 | 15.8 | ||||||

8 | 10.5 | 11.1 | 11.7 | 12.2 | 12.7 | ||||||

9 | 8.95 | 9.45 | 9.91 | 10.3 | 10.7 | ||||||

10 | 7.87 | 8.28 | 8.66 | 9.01 | 9.34 | ||||||

12 | 6.42 | 6.72 | 7.00 | 7.25 | 7.43 | ||||||

15 | 5.19 | 5.40 | 5.59 | 5.77 | 5.95 | ||||||

20 | 4.10 | 4.24 | 4.37 | 4.49 | 4.59 | ||||||

30 | 3.12 | 3.21 | 3.29 | 3.36 | 3.39 | ||||||

60 | 2.22 | 2.26 | 2.30 | 2.33 | 2.36 | ||||||

∞ | 1 | 1 | 1 | 1 | 1 |