The method of least squares applied to the analysis of variance