OneWayAnovaResult Class
Click or drag to resize

OneWayAnovaResult Class

The result of a one-way ANOVA test.
Inheritance Hierarchy
SystemObject
  Meta.Numerics.StatisticsOneWayAnovaResult

Namespace:  Meta.Numerics.Statistics
Assembly:  Meta.Numerics (in Meta.Numerics.dll) Version: 4.0.5.0 (4.0.5.0)
Syntax
public sealed class OneWayAnovaResult

The OneWayAnovaResult type exposes the following members.

Properties
  NameDescription
Public propertyFactor
Gets design factor variance data.
Public propertyResidual
Gets residual variance data.
Public propertyResult
Gets the result of the F test for the influence of the factor.
Public propertyTotal
Gets total variance data.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

A one way ANOVA test detects the influence of a single factor on the mean of a measured variable, which is assumed to be normally distributed.

A one way ANOVA result is returned by the static OneWayAnovaTest(IReadOnlyCollectionSample) method.

Fundamentally, a one-way ANOVA is a simple statistical test like any other, with a single test statistic (F) and a single associated null distribution (the FisherDistribution), but some ANOVA users like to examine and report intermediate quantities used in the computation of the test. In particular, the sum of square deviations and degrees of freedom associated with the design factor and the residual, and their sum may be of interest. Each of these appear as rows in the common tabular representation of an ANOVA. To enable this, the class makes this information available as AnovaRow objects returned by the Factor, Residual, and Total properties. This has the unfortunate side-effect of making the AVOVA look more complicated than it really is. If you just want the test result, you can get it from the Result property.

Examples

Suppose you have sampled the heights of aliens from three planets. Heights are approximately normally distributed on each planet. You want to know whether planet-of-origin affects average height. You can do a one-way ANOVA to determine if the planet factor affects mean height.

C#
Sample group1 = new Sample(4, 5, 6);
Sample group2 = new Sample(3, 4, 5);
Sample group3 = new Sample(5, 6, 8, 9);
OneWayAnovaResult anova = Sample.OneWayAnovaTest(group1, group2, group3);
Console.WriteLine("P = {0}", anova.Result.Probability);
See Also