stats[anova]
oneway
analysis of variance, one way
Calling Sequence
Parameters
Description
Examples
anova[oneway](data)
data
-
list of list of statistical data
Important: The stats package has been deprecated. Use the superseding command Statistics[OneWayANOVA] instead.
Suppose that one performs experiments varying only one factor. For each value of the factor, one repeats the experiment many times. Such experiments are known both as one-way classifications and as one-factor experiments.
The anova[oneway] command is used to test whether changing the factor has any significant influence, or whether the apparent change could have just as well been due to random fluctuations. Each value of the factor gives rise to one treatment. Each treatment is repeated (or replicated) and the results are put in a list. The data required by anova[oneway] is then a list of all those lists.
The anova[oneway] command allows each treatment to have different number of replications.
The result of anova[oneway] comprises two elements: the variance part and the variance ratio parts. The presentation models the usual analysis of variance tables and the elements are presented in a way that is similar between oneway, twoway, and twowayreplicated.
For oneway, the variance part is further subdivided into three subparts: the variance between treatments, the variance within treatments and the total variance. Each of those are lists of three elements (two for total variance): the degree of freedom associated to this element, the variation in this element and the mean square of this element (mean square is not used for the total variance).
For oneway, the variance ratio part has only one ratio. It has four components: two degrees of freedom, the ratio and the probability value. This ratio follows an F-ratio statistic with the two given degrees of freedom. It allows us to test the null hypothesis (that the means of each treatment are equal) using a one-tailed test of the F-ratio distribution.
with⁡statsanova:
with⁡statsdescribe:
Treatment_1≔10,11,8
Three of the measures have the same value
Treatment_2≔Weight⁡9,3,11
One bad measure
Treatment_3≔missing,10,11,7,12
data≔Treatment_1,Treatment_2,Treatment_3
data≔10,11,8,Weight⁡9,3,11,missing,10,11,7,12
R≔oneway⁡data
R≔2,1733,1766,8,653,6524,10,24411,2,8,68715,0.089709850848
The F-ratio is 68/715 with 2 and 8 degrees of freedom.
Ratio≔2
Ratio≔2,8,68715,0.089709850848
the level of significance is measured with
sig≔statsstatevalf,cdf,fratioRatio1,Ratio2⁡Ratio3
sig≔0.08970985085
Since this is much smaller than 0.95, we conclude that there is no significance to the differences in means:
map⁡mean,Treatment_1,Treatment_2,Treatment_3
293,192,10
evalf⁡
9.666666667,9.500000000,10.
Now we change the treatment results to yield
data2≔10,11,8,Weight⁡11,3,13,missing,14,15,11,16:
Ratio2≔oneway⁡data22
Ratio2≔2,8,4388715,0.97575671908
The difference between
map⁡mean,data2
293,232,14
9.666666667,11.50000000,14.
is significant at the 0.05 level (since 0.976>0.95) but not at the 0.01 level (since 0.976<0.99).
See Also
Statistics
Statistics[OneWayANOVA]
stats(deprecated)
Download Help Document