Loading [MathJax]/extensions/tex2jax.js
scipy 1.10.1 Pypi GitHub Homepage
Other Docs

NotesParametersReturnsBackRef
sem(a, axis=0, ddof=1, nan_policy='propagate')

Calculate the standard error of the mean (or standard error of measurement) of the values in the input array.

Notes

The default value for ddof is different to the default (0) used by other ddof containing routines, such as np.std and np.nanstd.

Parameters

a : array_like

An array containing the values for which the standard error is returned.

axis : int or None, optional

Axis along which to operate. Default is 0. If None, compute over the whole array a.

ddof : int, optional

Delta degrees-of-freedom. How many degrees of freedom to adjust for bias in limited samples relative to the population estimate of variance. Defaults to 1.

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

Returns

s : ndarray or float

The standard error of the mean in the sample(s), along the input axis.

Compute standard error of the mean.

Examples

Find standard error along the first axis:
import numpy as np
from scipy import stats
a = np.arange(20).reshape(5,4)
stats.sem(a)
Find standard error across the whole array, using n degrees of freedom:
stats.sem(a, axis=None, ddof=0)
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.stats._mstats_basic:sem

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._mstats_basic:sem_mstats_basic:sem

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/_stats_py.py#2535
type: <class 'function'>
Commit: