public class MultivariateNormalDistribution extends Object implements MultivariateProbabilityDistribution
dmvnorm from the package mvtnorm.| Constructor and Description |
|---|
MultivariateNormalDistribution(int dim)
Constructs an instance of the standard Normal distribution.
|
MultivariateNormalDistribution(Vector mu,
Matrix Sigma)
Constructs an instance with the given mean and covariance matrix.
|
| Modifier and Type | Method and Description |
|---|---|
double |
cdf(Vector x)
Gets the cumulative probability F(x) = Pr(X ≤ x).
|
Matrix |
covariance()
Gets the covariance matrix of this distribution.
|
double |
density(Vector x)
The density function, which, if exists, is the derivative of F.
|
double |
entropy()
Gets the entropy of this distribution.
|
Vector |
mean()
Gets the mean of this distribution.
|
Vector |
mode()
Gets the mode of this distribution.
|
double |
moment(Vector t)
The moment generating function is the expected value of etX.
|
public MultivariateNormalDistribution(Vector mu, Matrix Sigma)
mu - the meanSigma - the covariance matrix which must be positive definitepublic MultivariateNormalDistribution(int dim)
dim - the dimensionality of the distributionpublic double cdf(Vector x)
MultivariateProbabilityDistributioncdf in interface MultivariateProbabilityDistributionx - xpublic double density(Vector x)
MultivariateProbabilityDistributionf(x) = dF(X) / dxThis may not always exist. For the discrete cases, this is the probability mass function. It gives the probability that a discrete random variable is exactly equal to some value.
density in interface MultivariateProbabilityDistributionx - xpublic Vector mean()
MultivariateProbabilityDistributionmean in interface MultivariateProbabilityDistributionpublic Vector mode()
MultivariateProbabilityDistributionmode in interface MultivariateProbabilityDistributionpublic Matrix covariance()
MultivariateProbabilityDistributioncovariance in interface MultivariateProbabilityDistributionpublic double entropy()
MultivariateProbabilityDistributionentropy in interface MultivariateProbabilityDistributionpublic double moment(Vector t)
MultivariateProbabilityDistributionE(etX)This may not always exist.
moment in interface MultivariateProbabilityDistributiont - tCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.