Contenido principal

mvtpdf

Multivariate t probability density function

Description

y = mvtpdf(X,C,nu) returns the probability density function (pdf) of the multivariate t distribution with the correlation matrix C and degrees of freedom nu, evaluated at each row of X.

Examples

collapse all

Compute the pdf of a multivariate t distribution with the correlation parameters C=[1 .4; .4 1] and 2 degrees of freedom.

[X1,X2] = meshgrid(linspace(-2,2,25)',linspace(-2,2,25)');
X = [X1(:) X2(:)];
C = [1 .4; .4 1]; 
df = 2;
p = mvtpdf(X,C,df);

Plot the pdf.

figure;
surf(X1,X2,reshape(p,25,25))

Figure contains an axes object. The axes object contains an object of type surface.

Input Arguments

collapse all

Evaluation points, specified as a 1-by-d numeric vector or an n-by-d numeric matrix, where d is the dimension of a single multivariate t distribution and n is a positive scalar integer. The rows of X correspond to observations (or points), and the columns correspond to variables (or coordinates).

Data Types: single | double

Correlation matrix, specified as a d-by-d symmetric, positive definite matrix, where d is the number of columns in X. If the diagonal elements of C are not all 1 (that is, if C is a covariance matrix rather than a correlation matrix), then the mvtpdf function rescales C to correlation form. The function does not rescale the evaluation points X.

Data Types: single | double

Degrees of freedom of the multivariate t distribution, specified as a positive scalar or a vector of positive scalars with length equal to the number of rows in X. If nu is a positive scalar, the mvtpdf function expands nu into a vector with the same number of rows as X.

Data Types: single | double

Output Arguments

collapse all

pdf values, returned as an n-by-1 numeric vector, where n is the number of rows in X.

Version History

Introduced in R2006b