mvpa2.misc.stats.ttest_1samp(a, popmean=0, axis=0, mask=None, alternative='two-sided')ΒΆ

Calculates the T-test for the mean of ONE group of scores a.

This is a refinement for the scipy.stats.ttest_1samp() for the null hypothesis testing that the expected value (mean) of a sample of independent observations is equal to the given population mean, popmean. It adds ability to carry single tailed test as well as operate on samples with varying number of active measurements, as specified by mask argument.

Since it is only a refinement and otherwise it should perform the same way as the original ttest_1samp – the name was overloaded.


a : array_like

sample observations

popmean : float or array_like

expected value in null hypothesis, if array_like than it must have the same shape as a excluding the axis dimension

axis : int, optional, (default axis=0)

Axis can equal None (ravel array first), or an integer (the axis over which to operate on a).

mask : array_like, bool

bool array to specify which measurements should participate in the test

alternative : (‘two-sided’, ‘greater’, ‘less’)

alternative two test


t : float or array


prob : float or array