fTest

The F-test is a one-way ANOVA extension of the T-test to >2 groups. It's useful when you have 3 or more groups with equal variance and want to test whether their means are equal. Data can be input as either a tuple or a range. This may contain any combination of ranges of numeric types, MeanSD structs and Summary structs.

Note: This test makes the assumption that all groups have equal variances, also known as homoskedasticity. For a similar test that does not make these assumptions, see welchAnova.

fTest
(
T...
)
()

Return Value

Type: TestRes

A TestRes containing the F statistic and the P-value for the alternative that the means of the groups are different against the null that they are identical.

Examples

1 uint[] thing1 = [3,1,4,1],
2        thing2 = [5,9,2,6,5,3],
3        thing3 = [5,8,9,7,9,3];
4 auto result = fTest(thing1, meanStdev(thing2), summary(thing3));
5 assert(approxEqual(result.testStat, 4.9968));
6 assert(approxEqual(result.p, 0.02456));

References: http://en.wikipedia.org/wiki/F-test

Meta