mvdnorm | R Documentation |
Probability density function of multivariate Gaussian distribution
mvdnorm(x, mu, Sigma)
x |
A vector of length |
mu |
A vector of length |
Sigma |
A |
The probability density of N(\mu,\Sigma)
evaluated at x
.
# 1D example
mvdnorm(x = 2, mu = 1, Sigma = 2)
dnorm(x = 2, mean = 1, sd = sqrt(2))
# Independent 2D example
mvdnorm(x = c(2,2), mu = c(1,1), Sigma = diag(1:2))
prod(dnorm(x = c(2,2), mean = c(1,1), sd = sqrt(1:2)))
# Correlated 2D example
mvdnorm(x = c(2,2), mu = c(1,1), Sigma = matrix(c(2,1,1,2),nrow=2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.