def mvsdist(data):
x = ravel(data)<EOL>n = len(x)<EOL>if (n < <NUM_LIT:2>):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>xbar = x.mean()<EOL>C = x.var()<EOL>if (n > <NUM_LIT:1000>):  <EOL><INDENT>mdist = distributions.norm(loc=xbar, scale=math.sqrt(C/n))<EOL>sdist = distributions.norm(loc=math.sqrt(C), scale=math.sqrt(C/(<NUM_LIT>*n)))<EOL>vdist = distributions.norm(loc=C, scale=math.sqrt(<NUM_LIT>/n)*C)<EOL><DEDENT>else:<EOL><INDENT>nm1 = n-<NUM_LIT:1><EOL>fac = n*C/<NUM_LIT><EOL>val = nm1/<NUM_LIT><EOL>mdist = distributions.t(nm1,loc=xbar,scale=math.sqrt(C/nm1))<EOL>sdist = distributions.gengamma(val,-<NUM_LIT:2>,scale=math.sqrt(fac))<EOL>vdist = distributions.invgamma(val,scale=fac)<EOL><DEDENT>return mdist, vdist, sdist<EOL>
'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.stats import mvsdist
>>> data = [6, 9, 12, 7, 8, 8, 13]
>>> mean, var, std = mvsdist(data)

We now have frozen distribution objects "mean", "var" and "std" that we can
examine:

>>> mean.mean()
9.0
>>> mean.interval(0.95)
(6.6120585482655692, 11.387941451734431)
>>> mean.std()
1.1952286093343936