bundles / scipy latest / scipy / stats / _mstats_basic / ttest_1samp
function
scipy.stats._mstats_basic:ttest_1samp
source: build-install/usr/lib/python3.14/site-packages/scipy/stats/_mstats_basic.py:1611
Signature
def ttest_1samp(a, popmean, axis = 0, alternative = two-sided)Summary
Calculates the T-test for the mean of ONE group of scores.
Parameters
a: array_likesample observation
popmean: float or array_likeexpected value in null hypothesis, if array_like than it must have the same shape as
aexcluding the axis dimensionaxis: int or None, optionalAxis along which to compute test. If None, compute over the whole array
a.alternative: {'two-sided', 'less', 'greater'}, optionalDefines the alternative hypothesis. The following options are available (default is 'two-sided'):
'two-sided': the mean of the underlying distribution of the sample is different than the given population mean (
popmean)'less': the mean of the underlying distribution of the sample is less than the given population mean (
popmean)'greater': the mean of the underlying distribution of the sample is greater than the given population mean (
popmean)
Returns
statistic: float or arrayt-statistic
pvalue: float or arrayThe p-value
Notes
For more details on ttest_1samp, see scipy.stats.ttest_1samp.
Aliases
scipy.stats._mstats_basic.ttest_1samp