Class MultivariateTDistribution
- java.lang.Object
-
- dev.nm.stat.distribution.multivariate.MultivariateTDistribution
-
- All Implemented Interfaces:
MultivariateProbabilityDistribution
public class MultivariateTDistribution extends Object implements MultivariateProbabilityDistribution
The multivariate T distribution or multivariate Student distribution, is a generalization of the one-dimensional (univariate) Student's t-distribution to higher dimensions. An equivalent function in R isdmvt
from the packagemvtnorm
.- See Also:
- Wikipedia: Multivariate t-distribution
-
-
Constructor Summary
Constructors Constructor Description MultivariateTDistribution(int dim, int v)
Constructs an instance of the standard t distribution, mean 0, variance 1.MultivariateTDistribution(int v, Vector mu, Matrix Sigma)
Constructs an instance with the given mean and scale matrix.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
MultivariateTDistribution
public MultivariateTDistribution(int v, Vector mu, Matrix Sigma)
Constructs an instance with the given mean and scale matrix.- Parameters:
v
- the degree of freedommu
- the mean, a px1 vector, where p is the dimensionSigma
- the scale or dispersion matrix, a positive definite, real, pxp matrix; this is not the covariance matrix
-
MultivariateTDistribution
public MultivariateTDistribution(int dim, int v)
Constructs an instance of the standard t distribution, mean 0, variance 1.- Parameters:
dim
- the dimensionality of the distributionv
- the degree of freedom; v > 2
-
-
Method Detail
-
cdf
public double cdf(Vector x)
Description copied from interface:MultivariateProbabilityDistribution
Gets the cumulative probability F(x) = Pr(X ≤ x).- Specified by:
cdf
in interfaceMultivariateProbabilityDistribution
- Parameters:
x
- x- Returns:
- F(x) = Pr(X ≤ x)
-
density
public double density(Vector x)
Description copied from interface:MultivariateProbabilityDistribution
The density function, which, if exists, is the derivative of F. It describes the density of probability at each point in the sample space.f(x) = dF(X) / dx
This 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.- Specified by:
density
in interfaceMultivariateProbabilityDistribution
- Parameters:
x
- x- Returns:
- f(x)
-
mean
public Vector mean()
Description copied from interface:MultivariateProbabilityDistribution
Gets the mean of this distribution.- Specified by:
mean
in interfaceMultivariateProbabilityDistribution
- Returns:
- the mean
-
mode
public Vector mode()
Description copied from interface:MultivariateProbabilityDistribution
Gets the mode of this distribution.- Specified by:
mode
in interfaceMultivariateProbabilityDistribution
- Returns:
- the mean
-
covariance
public Matrix covariance()
Description copied from interface:MultivariateProbabilityDistribution
Gets the covariance matrix of this distribution.- Specified by:
covariance
in interfaceMultivariateProbabilityDistribution
- Returns:
- the covariance
-
entropy
public double entropy()
Description copied from interface:MultivariateProbabilityDistribution
Gets the entropy of this distribution.- Specified by:
entropy
in interfaceMultivariateProbabilityDistribution
- Returns:
- the entropy
- See Also:
- Wikipedia: Entropy (information theory)
-
moment
public double moment(Vector t)
Description copied from interface:MultivariateProbabilityDistribution
The moment generating function is the expected value of etX. That is,E(etX)
This may not always exist.- Specified by:
moment
in interfaceMultivariateProbabilityDistribution
- Parameters:
t
- t- Returns:
- E(exp(tX))
- See Also:
- Wikipedia: Moment-generating function
-
-