MNE-Python provides different parametric and and non-parametric statistics in mne.stats which are specially designed for analyzing mass-univariate hypotheses on neuroimaging data.

Parametric statistics


Multiple comparisons

In MEG and EEG analyses typically involve multiple measurements (sensors, time points) for each sample. In a mass-univariate analysis fitting statistical models for each of these observations a multiple comparison problem occurs (MCPP). MNE-Python provides the following functions to control for multiple comparison:

  • mne.stats.bonferroni_correction() returns a boolean mask of rejection decisions and the corrected p-values. The Bonferroni correction reflects the most conservative choice and corrects for the MCPP by multiplying the p-values by the number of observations
  • mne.stats.fdr_correction() implements False discovery rate (FDR) and also returns a boolean mask of rejection decisions and the corrected p-values.

More flexible handling of the MCPP can be achieved by non-parametric statistics.

Non-paramteric statistics

Permutation clustering

As MEG and EEG data are subject to considerable spatiotemporal correlation the assumption of independence between observations is hard to justify. As a consequence the MCPP is overestimated when employing paramteric mass-univariate statistics. A flexble alternative is given by non-parametric permutation clustering statistics which implement a spatiotemporal priors and typically allow for clusterwise inference. These tests can be applied over a wide range of situations inclduing single subject and group analyses in time, space and frequency. The only requirement is that the scientific hypothesis can be mapped onto an exchangeability null hypothesis in which two or more conditions can be compared and exchanged across permutations to generate an empirical distribution.

The clustering permutation API in MNE-Python is grouped according to different contrasts of interest and clustering connectivity prior, i.e., assumptions about the grouping and neighborhood of the observations.

Using the TFCE option observation- instead of cluster-wise hypothesis testing can be realized.


Note that the permutation clustering functions do not constitute thresholding to paramterical tests. Although using F-tests and t-tests internally for contrast enhancement, the actual test statistic is the cluster size.


Unless TFCE is used, the hypotheses tested are cluster-wise. This means that no inference is provided for individual time points, sensors, dipole locations or frequencies in such a cluster.