ANOVA

Author

Eric W. Weisstein
March 22, 2002

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Statistics/ANOVA.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/ANOVA.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Initialization

<<Statistics`ANOVA`

Comments

Finish the hand computation.

Example

onewaydata={{1,7.0},{1,5.3},{1,5.9},{1,6.6},{1,4.9},{2,4.4},{2,6.8},{2,7.7},{2,8.3},{2,6.6},{3,8.1},{3,10.4},{3,8.0},{3,6.8},{3,9.2},{4,5.7},{4,3.9},{4,6.2},{4,5.5},{4,6.2}};

Computed by Mathematica

ANOVA[onewaydata]

Computed by Hand

levels=Union[First/@onewaydata]

Function[l,Count[onewaydata,_?(First[#]==l&)]]/@levels

t=Transpose[onewaydata];
leveleddata=t[[2]][[Flatten[Position[t[[1]],#]]]]&/@levels

{mean=Mean[Flatten[leveleddata]],Mean/@leveleddata}

Mean[Mean/@leveleddata]

Plus@@Flatten[((#-mean)^2&/@leveleddata)]

k=Length[levels];
n=5;

{k-1,k(n-1),k n-1}