generate a one-way ANOVA table - Maple Help

Home : Support : Online Help : Statistics : Statistics Package : Regression : Statistics/OneWayANOVA

Statistics[OneWayANOVA] - generate a one-way ANOVA table

 Calling Sequence OneWayANOVA(X)

Parameters

 X - list(Vector) or Matrix; observations

Description

 • The OneWayANOVA command generates a Matrix that represents the standard analysis-of-variance (ANOVA) table for a one-way classification. Suppose one performs experiments varying only one factor.  Each value of the factor results in one group of observations.  The ANOVA table generated by analyzing all the observations can help in determining whether changing the factor has any significant influence.
 • The parameter X is a list of Vectors, each containing the observations for a single group.  If each group contains the same number of observations, then X can be a Matrix in which each column contains observations for one group. The data sets for the groups can also be supplied as lists; see the Input Forms help page for more details.
 • The OneWayANOVA command returns a Matrix with 3 rows and 5 columns. The first row contains variance between groups, the second contains variance within groups and the third contains total variance.
 • The first column of the ANOVA table contains the degrees of freedom for each source of variance, the second column contains the sum of squares, and the third contains the mean square.  The final two columns show the F-statistic (ratio of the mean squares) and the p-value for the null hypothesis that there is no difference between means of the groups.

Examples

 > $\mathrm{with}\left(\mathrm{Statistics}\right):$

Consider three groups of observations.

 > $\mathrm{G1}:=\mathrm{Vector}\left(\left[10,11,8\right],\mathrm{datatype}=\mathrm{float}\right):$
 > $\mathrm{G2}:=\mathrm{Vector}\left(\left[9,9,9,11\right],\mathrm{datatype}=\mathrm{float}\right):$
 > $\mathrm{G3}:=\mathrm{Vector}\left(\left[10,11,7,12\right],\mathrm{datatype}=\mathrm{float}\right):$

Generate the one-way ANOVA table.

 > $\mathrm{OneWayANOVA}\left(\left[\mathrm{G1},\mathrm{G2},\mathrm{G3}\right]\right)$
 $\left[\begin{array}{ccccc}{2}& {0.515151515151515}& {0.257575757575758}& {0.0951048951048951}& {0.910290149152349}\\ {8}& {21.6666666666667}& {2.70833333333333}& {\mathrm{NULL}}& {\mathrm{NULL}}\\ {10}& {22.1818181818182}& {\mathrm{NULL}}& {\mathrm{NULL}}& {\mathrm{NULL}}\end{array}\right]$ (1)

When all groups have equal numbers of observations, the observations can be placed in a Matrix.

 > $M:=\mathrm{Matrix}\left(\left[\left[60,55,57,69\right],\left[65,60,58,69\right],\left[52,67,66,50\right],\left[54,51,53,69\right],\left[66,52,66,56\right],\left[51,61,66,54\right],\left[52,64,53,57\right],\left[63,63,58,66\right],\left[51,58,70,52\right],\left[51,54,52,58\right],\left[54,63,69,65\right],\left[68,52,58,62\right]\right]\right):$
 > $\mathrm{OneWayANOVA}\left(M\right)$
 $\left[\begin{array}{ccccc}{3}& {97.8333333333334}& {32.6111111111111}& {0.791517268854770}& {0.505164016846382}\\ {44}& {1812.83333333333}& {41.2007575757576}& {\mathrm{NULL}}& {\mathrm{NULL}}\\ {47}& {1910.66666666667}& {\mathrm{NULL}}& {\mathrm{NULL}}& {\mathrm{NULL}}\end{array}\right]$ (2)