One-way ANOVA can be performed on three or more samples of unequal sizes. However, calculations get complicated when sample sizes are not always the same. So, while performing ANOVA with unequal samples size, the following equation is used:
In the equation, n is the sample size, ͞x is the sample mean, x̿ is the combined mean for all the observations, k is the number of samples, and s2 is the variance of the sample. It should be noted that the subscript 'i' represents a specific sample in a dataset.
Observe that both the variance estimates, the variance between samples, and the variance within samples are weighted since they use the same size to calculate the F statistic. In other words, the different sample sizes in the dataset will affect the two variance estimates- the variance between samples and the variance within samples, ultimately affecting the value of the F statistic.