Creates an object representing a multivariate normal distribution.
Usage
mnormal(expectation = c(0,0), P = diag(length(expectation)))
Arguments
expectation
A vector of length at least 2 specifying the expectation of the distribution.
By default, the vector (0,0).
P
A matrix of size \(k\times k\), where \(k\) is the length of the
expectation vector. P specifies the precision matrix, i.e., the
inverse of the covariance matrix.
Value
A multivariate normal probability distribution.
Details
If \(\mu\) is the expectation vector
and \(P\) is the precision matrix, then the probability density function
is proportional to
$$f(x)=\exp(-0.5(x-\mu)^tP(x-\mu))$$