Loading [MathJax]/jax/output/HTML-CSS/config.js
scipy 1.10.1 Pypi GitHub Homepage
Other Docs

NotesParametersReturns
ttest_1samp(a, popmean, axis=0, alternative='two-sided')

Notes

For more details on ttest_1samp, see scipy.stats.ttest_1samp.

Parameters

a : array_like

sample observation

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 or None, optional

Axis along which to compute test. If None, compute over the whole array a.

alternative : {'two-sided', 'less', 'greater'}, optional

Defines 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 array

t-statistic

pvalue : float or array

The p-value

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

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

scipy.stats._stats_py:ttest_1samp_stats_py:ttest_1samp

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/stats/_mstats_basic.py#1317
type: <class 'function'>
Commit: