MultivariatetDistribution
Definition
The probability density function of thed-dimensional multivariate Student'stdistribution is given by
wherexis a 1-by-dvector, Σ is ad-by-dsymmetric, positive definite matrix, andνis a positive scalar. While it is possible to define the multivariate Student'stfor singular Σ, the density cannot be written as above. For the singular case, only random number generation is supported. Note that while most textbooks define the multivariate Student'stwithxoriented as a column vector, for the purposes of data analysis software, it is more convenient to orientxas a row vector, and Statistics and Machine Learning Toolbox™ software uses that orientation.
Background
The multivariate Student'stdistribution is a generalization of the univariate Student'stto two or more variables. It is a distribution for random vectors of correlated variables, each element of which has a univariate Student'stdistribution. In the same way as the univariate Student'stdistribution can be constructed by dividing a standard univariate normal random variable by the square root of a univariate chi-square random variable, the multivariate Student'stdistribution can be constructed by dividing a multivariate normal random vector having zero mean and unit variances by a univariate chi-square random variable.
The multivariate Student'stdistribution is parameterized with a correlation matrix, Σ, and a positive scalar degrees of freedom parameter,ν.νis analogous to the degrees of freedom parameter of a univariate Student'stdistribution. The off-diagonal elements of Σ contain the correlations between variables. Note that when Σ is the identity matrix, variables are uncorrelated; however, they are not independent.
The multivariate Student'stdistribution is often used as a substitute for the multivariate normal distribution in situations where it is known that the marginal distributions of the individual variables have fatter tails than the normal.
Example
Plot PDF and CDF of Multivariatet-Distribution
Plot the pdf of a bivariate Student'stdistribution. You can use this distribution for a higher number of dimensions as well, although visualization is not easy.
Rho = [1 .6; .6 1]; nu = 5; x1 = -3:.2:3; x2 = -3:.2:3; [X1,X2] = meshgrid(x1,x2); F = mvtpdf([X1(:) X2(:)],Rho,nu); F = reshape(F,length(x2),length(x1)); surf(x1,x2,F); caxis([min(F(:))-.5*range(F(:)),max(F(:))]); axis([-3 3 -3 3 0 .2]) xlabel('x1'); ylabel('x2'); zlabel('Probability Density');
Plot the cdf of a bivariate Student'stdistribution.
F = mvtcdf([X1(:) X2(:)],Rho,nu); F = reshape(F,length(x2),length(x1)); surf(x1,x2,F); caxis([min(F(:))-.5*range(F(:)),max(F(:))]); axis([-3 3 -3 3 0 1]) xlabel('x1'); ylabel('x2'); zlabel('Cumulative Probability');
Since the bivariate Student'stdistribution is defined on the plane, you can also compute cumulative probabilities over rectangular regions. For example, this contour plot illustrates the computation that follows, of the probability contained within the unit square shown in the figure.
轮廓(x1, x2, F,[。0001措施。01 . 05:1。:。95 .99 .999 .9999]); xlabel('x'); ylabel('y'); line([0 0 1 1 0],[1 0 0 1 1],'linestyle','--','color','k');
Compute the value of the probability contained within the unit square.
F = mvtcdf([0 0],[1 1],Rho,nu)
F = 0.1401
Computing a multivariate cumulative probability requires significantly more work than computing a univariate probability. By default, themvtcdf
function computes values to less than full machine precision and returns an estimate of the error, as an optional second output.
[F,err] = mvtcdf([0 0],[1 1],Rho,nu)
F = 0.1401
err = 1.0000e-08