This is a pre-release version (2.0.0.dev0+git20260907.41eeb59).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / stats / _morestats / mvsdist

function

scipy.stats._morestats:mvsdist

source: build-install/usr/lib/python3.14/site-packages/scipy/stats/_morestats.py:160

Signature

def mvsdist(data)

Summary

'Frozen' distributions for mean, variance, and standard deviation of data.

Parameters

data : array_like

Input array. Converted to 1-D using ravel. Requires 2 or more data-points.

Returns

mdist : "frozen" distribution object

Distribution object representing the mean of the data.

vdist : "frozen" distribution object

Distribution object representing the variance of the data.

sdist : "frozen" distribution object

Distribution object representing the standard deviation of the data.

Notes

The return values from bayes_mvs(data) is equivalent to tuple((x.mean(), x.interval(0.90)) for x in mvsdist(data)).

In other words, calling <dist>.mean() and <dist>.interval(0.90) on the three distribution objects returned from this function will give the same results that are returned from bayes_mvs.

Examples

from scipy import stats
data = [6, 9, 12, 7, 8, 8, 13]
mean, var, std = stats.mvsdist(data)
✓
We now have frozen distribution objects "mean", "var" and "std" that we can examine:
mean.mean()
mean.interval(0.95)
mean.std()
✗
np.float64(1.1952286093343936)

See also

bayes_mvs

Aliases

  • scipy.stats.mvsdist