Next: The Exponential Distribution, Previous: The Bivariate Gaussian Distribution, Up: Random Number Distributions [Index]
This function generates a random vector satisfying the k-dimensional multivariate Gaussian
distribution with mean \mu and variance-covariance matrix
\Sigma. On input, the k-vector \mu is given in mu, and
the Cholesky factor of the k-by-k matrix \Sigma = L L^T is
given in the lower triangle of L, as output from gsl_linalg_cholesky_decomp
.
The random vector is stored in result on output. The probability distribution
for multivariate Gaussian random variates is
p(x_1,...,x_k) dx_1 ... dx_k = {1 \over \sqrt{(2 \pi)^k |\Sigma|} \exp \left(-{1 \over 2} (x - \mu)^T \Sigma^{-1} (x - \mu)\right) dx_1 \dots dx_k
These functions compute p(x) or \log{p(x)} at the point x, using mean vector mu and variance-covariance matrix specified by its Cholesky factor L using the formula above. Additional workspace of length k is required in work.
Given a set of n samples X_j from a k-dimensional multivariate Gaussian distribution, this function computes the maximum likelihood estimate of the mean of the distribution, given by
\Hat{\mu} = {1 \over n} \sum_{j=1}^n X_j
The samples X_1,X_2,\dots,X_n are given in the n-by-k matrix X, and the maximum likelihood estimate of the mean is stored in mu_hat on output.
Given a set of n samples X_j from a k-dimensional multivariate Gaussian distribution, this function computes the maximum likelihood estimate of the variance-covariance matrix of the distribution, given by
\Hat{\Sigma} = {1 \over n} \sum_{j=1}^n \left( X_j - \Hat{\mu} \right) \left( X_j - \Hat{\mu} \right)^T
The samples X_1,X_2,\dots,X_n are given in the n-by-k matrix X and the maximum likelihood estimate of the variance-covariance matrix is stored in sigma_hat on output.
Next: The Exponential Distribution, Previous: The Bivariate Gaussian Distribution, Up: Random Number Distributions [Index]