scipy.stats.Uniform.

standard_deviation#

Uniform.standard_deviation(*, method=None)[source]#

Standard deviation, a measure of dispersion

For real-line distributions, the standard deviation is the square root of the second central moment.

The standard deviation \(\sigma\) of a circular random variable \(X\) is defined ([2] 30) as

\[\sigma = \sqrt{-2 \log( E\left[ \cos(X - \mu) \right]) }\]

where \(\mu\) is the circular mean.

Parameters:
method{None, ‘formula’, ‘transform’, ‘normalize’, ‘quadrature’, ‘cache’}

Method used to calculate the central second moment. Not all methods are available for all distributions. See moment for details.

See also

variance
mean
moment

References

[2]

Mardia, Kanti V., and Peter E. Jupp. Directional statistics. John Wiley & Sons, 1999. DOI:10.1002/9780470316979.

Examples

Instantiate a distribution with the desired parameters:

>>> from scipy import stats
>>> X = stats.Normal(mu=1., sigma=2.)

Evaluate the standard deviation:

>>> X.standard_deviation()
2.0
>>> X.standard_deviation() == X.moment(order=2, kind='central')**0.5 == X.sigma
True