Calculates the standard error of the mean (or standard error of measurement) of the values in the input array.
Parameters : | a : array_like
axis : int or None, optional.
ddof : int, optional
|
---|---|
Returns : | s : ndarray or float
|
Notes
The default value for ddof is different to the default (0) used by other ddof containing routines, such as np.std nd stats.nanstd.
Examples
Find standard error along the first axis:
>>> from scipy import stats
>>> a = np.arange(20).reshape(5,4)
>>> stats.sem(a)
array([ 2.8284, 2.8284, 2.8284, 2.8284])
Find standard error across the whole array, using n degrees of freedom:
>>> stats.sem(a, axis=None, ddof=0)
1.2893796958227628