## Information

**Target**: To check if the difference between the averages of two or more groups is significant, using sample data

ANOVA is usually used when there are at least three groups since for two groups, the two-tailed pooled variance t-test and the right-tailed ANOVA test have the same result.

When performing ANOVA test, we try to determine if the difference between the averages reflects a real difference between the groups, or is due to the random noise inside each group.

The F statistic represents the ratio of the variance between the groups and the variance inside the groups. Unlike many other statistic tests, the smaller the F statistic the more likely the averages are equal.

**Example**: Compare four fertilizers used in four fields

H_{0}: The average weight of crops per square meter is equal in all fields.

H_{1}: At least one field yields different average per square meter.

**Right-tailed** F test, for ANOVA test you can use only the right tail. Why?## Assumptions

| Independent samples |

| Normal distribution of the analyzed population |

| Equal standard deviation, σ_{1}=σ_{2}=...=σ_{k} The assumption is more important when the groups' sizes not similar. |

## Required Sample Data

| Sample data from all compared groups |

## Parameters

**k** - Number of groups.

**n**_{i} - Sample side of group i.

**n** - Overall sample side, includes all the groups (Σn

_{i}, i=1 to k).

**x**_{i} - Average of group i.

**x** - Overall average (Σx

_{i,j} / n, i=1 to k, j=1 to n

_{i}).

**S**_{i} - Standard deviation of group i.

## Results calculations

Source | Degrees of Freedom | Sum of Squares | Mean Square | F statistic | p-value |
---|

**Groups** (between groups) | k - 1 | | MSG = SSG / (k - 1) | F = MSG / MSE | P(x > F) |

**Error** (within groups) | n - k | | MSE = SSE / (n - k) | | |

**Total** | n - 1 | SS(total) = SSG + SSE | Sample Variance = SS(total) / (n - 1) | | |