# Statistics/Testing Data/FtestANOVA

The one-way ANOVA F-test is used to identify if there are differences between subject effects. For instance, to investigate the effect of a certain new drug on the number of white blood cells, in an experiment the drug is given to three different groups, one of healthy people, one with people with a light form of the considered disease and one with a severe form of the disease. Generally the **an**alysis **o**f **va**riance identifies whether there is a significant difference in effect of the drug on the number of white blood cells between the groups. Significant refers to the fact that there will always be difference between the groups and also within the groups, but the purpose is to investigate whether the difference between the groups are large compared to the differences within the groups. To set up such an experiment three assumptions must be validated before calculating an F statistic: independent samples, homogeneity of variance, and normality. The first assumption suggests that there is no relation between the measurements for different subjects. Homogeneity of variance refers to equal variances among the different groups in the experiment (e.g., drug vs. placebo). Furthermore, the assumption of normality suggests that the distribution of each of these groups should be approximately normally distributed.

## Model[edit]

The situation is modelled in the following way. The measurement of the -th test person in group is indicated by:khalil kakayi

- .

This reads: the outcome of the measurement for in group is due to a general effect indicated by , an effect due to the group, and an individual contribution .

The individual, or random, contributions , often referred to as *disturbances*, are considered to be independently, normally distributed, all with expected value 0 and standard deviation .

To make the model unambiguous the group effects are restrained by the condition:

- .

Now. a notational note: it is common practice to indicate averages over one or more indices by writing a dot in the place of the index or indices. So for instance

The analysis of variance now divides the total "variance" in the form of the total "sum of squares" in two parts, one due to the variation within the groups and one due to the variation between the groups:

- .

We see the term sum of squares of error:

of the total squared differences of the individual measurements from their group averages, as an indication of the variation within the groups, and the term sum of square of the factor

of the total squared differences of the group means from the overall mean, as an indication of the variation between the groups.

Under the null hypothesis of no effect:

we find:

- is chi-square distributed with a(m-1) degrees of freedom, and
- is chi-square distributed with a-1 degrees of freedom,

where is the number of groups and is the number of persons in each group.

Hence the quotient of the so-called mean sum of squares:

and

may be used as a test statistic

which under the null hypothesis is F-distributed with degrees of freedom in the nominator and in the denominator, because the unknown parameter does not play a role since it is cancelled out in the quotient.