mars.tensor.stats.ttest_1samp(a, popmean, axis=0, nan_policy='propagate', alternative='two-sided')[source]

Calculate the T-test for the mean of ONE group of scores.

This is a two-sided test for the null hypothesis that the expected value (mean) of a sample of independent observations a is equal to the given population mean, popmean.

  • a (array_like) – Sample observation.

  • popmean (float or array_like) – Expected value in null hypothesis. If array_like, then it must have the same shape as a excluding the axis dimension.

  • axis (int or None, optional) – Axis along which to compute test; default is 0. If None, compute over the whole array a.

  • nan_policy ({'propagate', 'raise', 'omit'}, optional) –

    Defines how to handle when input contains nan. The following options are available (default is ‘propagate’):

    • ’propagate’: returns nan

    • ’raise’: throws an error

    • ’omit’: performs the calculations ignoring nan values

  • alternative ({'two-sided', 'less', 'greater'}, optional) –

    Defines the alternative hypothesis. The following options are available (default is ‘two-sided’):

    • ’two-sided’

    • ’less’: one-sided

    • ’greater’: one-sided


  • statistic (float or array) – t-statistic.

  • pvalue (float or array) – Two-sided p-value.