On generalization of the analysis of variance