mne.stats.f_oneway#

mne.stats.f_oneway(*args, sigma=0.0, method='relative')[source]#

Perform a 1-way ANOVA.

The one-way ANOVA tests the null hypothesis that 2 or more groups have the same population mean. The test is applied to samples from two or more groups, possibly with differing sizes [1].

This is a modified version of scipy.stats.f_oneway() that avoids computing the associated p-value.

Parameters:
*argsarray_like

The sample measurements should be given as arguments.

sigmafloat

Regularization parameter (>= 0) added to the within-group mean square to mitigate F-statistic inflation under low-variance conditions. 0 (default) disables correction.

New in v1.12.

methodstr

How sigma is interpreted when sigma > 0. Can be 'relative' (default) or 'absolute'. 'relative' multiplies sigma by the median within-group mean square (scale-invariant, recommended). 'absolute' uses sigma directly as a raw sigma squared.

New in v1.12.

Returns:
F-valuefloat

The computed F-value of the test.

Notes

The ANOVA test has important assumptions that must be satisfied in order for the associated p-value to be valid.

  1. The samples are independent

  2. Each sample is from a normally distributed population

  3. The population standard deviations of the groups are all equal. This property is known as homoscedasticity.

If these assumptions are not true for a given set of data, it may still be possible to use the Kruskal-Wallis H-test (scipy.stats.kruskal()) although with some loss of power.

The algorithm is from Heiman [2], pp.394-7.

References