multivariate_t

sherpa.sim.sample.multivariate_t(mean: Sequence[float] | ndarray, cov: ndarray, df: int, size: tuple[int, ...] | None = None, rng: Generator | RandomState | None = None) ndarray[source] [edit on github]

Draw random deviates from a multivariate Student’s T distribution.

Such a distribution is specified by its mean covariance matrix, and degrees of freedom. These parameters are analogous to the mean (average or “center”), variance (standard deviation, or “width,” squared), and the degrees of freedom of the one-dimensional t distribution.

Changed in version 4.16.0: The rng parameter was added.

Parameters:
mean1-D array_like, length N

Mean of the N-dimensional distribution

cov2-D array_like, shape (N, N)

Covariate matrix of the distribution. Must be symmetric and positive semi-definite for “physically meaningful” results.

dfint

Degrees of freedom of the distribution

sizetuple of ints, optional

Given a shape of, for example, (m,n,k), m*n*k samples are generated, and packed in an m-by-n-by-k arrangement. Because each sample is N-dimensional, the output shape is (m,n,k,N). If no shape is specified, a single (N-D) sample is returned.

rngnumpy.random.Generator, numpy.random.RandomState, or None, optional

Determines how random numbers are created. If set to None then the routines from numpy.random are used, and so can be controlled by calling numpy.random.seed.

Returns:
outndarray

The drawn samples, of shape size, if that was provided. If not, the shape is (N,).

In other words, each entry out[i,j,...,:] is an N-dimensional value drawn from the distribution.

Is this right? This needs to be checked! A reference to the literature
the better