bundles / scipy latest / scipy / stats / _morestats / mvsdist
function
scipy.stats._morestats:mvsdist
source: /scipy/stats/_morestats.py :162
Signature
def mvsdist ( data ) Summary
'Frozen' distributions for mean, variance, and standard deviation of data.
Parameters
data: array_likeInput array. Converted to 1-D using ravel. Requires 2 or more data-points.
Returns
mdist: "frozen" distribution objectDistribution object representing the mean of the data.
vdist: "frozen" distribution objectDistribution object representing the variance of the data.
sdist: "frozen" distribution objectDistribution 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.
Array API Standard Support
mvsdist has experimental support for Python Array API Standard compatible backends in addition to NumPy. Please consider testing these features by setting an environment variable SCIPY_ARRAY_API=1 and providing CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following combinations of backend and device (or other capability) are supported.
==================== ==================== ==================== Library CPU GPU ==================== ==================== ==================== NumPy ✅ n/a CuPy n/a ⛔ PyTorch ⛔ ⛔ JAX ⛔ ⛔ Dask ⛔ n/a ==================== ==================== ====================
See
dev-arrayapifor more information.
Examples
from scipy import stats data = [6, 9, 12, 7, 8, 8, 13] mean, var, std = stats.mvsdist(data)✓
mean.mean() mean.interval(0.95) mean.std()✗
See also
Aliases
-
scipy.stats.mvsdist