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)
MultivariateProbabilityDistribution
cdf
in interface MultivariateProbabilityDistribution
x
- xpublic double density(Vector x)
MultivariateProbabilityDistribution
f(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 MultivariateProbabilityDistribution
x
- xpublic Vector mean()
MultivariateProbabilityDistribution
mean
in interface MultivariateProbabilityDistribution
public Vector mode()
MultivariateProbabilityDistribution
mode
in interface MultivariateProbabilityDistribution
public Matrix covariance()
MultivariateProbabilityDistribution
covariance
in interface MultivariateProbabilityDistribution
public double entropy()
MultivariateProbabilityDistribution
entropy
in interface MultivariateProbabilityDistribution
public double moment(Vector t)
MultivariateProbabilityDistribution
E(etX)This may not always exist.
moment
in interface MultivariateProbabilityDistribution
t
- tCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.