Products & Services Solutions Academia Support User Community Company

Learn more about Statistics Toolbox   

mvtrnd - Multivariate t random numbers

Syntax

R = mvtrnd(C,df,cases)
R = mvtrnd(C,df)

Description

R = mvtrnd(C,df,cases) returns a matrix of random numbers chosen from the multivariate t distribution, where C is a correlation matrix. df is the degrees of freedom and is either a scalar or is a vector with cases elements. If p is the number of columns in C, then the output R has cases rows and p columns.

Let t represent a row of R. Then the distribution of t is that of a vector having a multivariate normal distribution with mean 0, variance 1, and covariance matrix C, divided by an independent chi-square random value having df degrees of freedom. The rows of R are independent.

C must be a square, symmetric and positive definite matrix. If its diagonal elements are not all 1 (that is, if C is a covariance matrix rather than a correlation matrix), mvtrnd computes the equivalent correlation matrix before generating the random numbers.

R = mvtrnd(C,df) returns a single random number from the multivariate t distribution.

Examples

SIGMA = [1 0.8;0.8 1];
R = mvtrnd(SIGMA,3,100);
plot(R(:,1),R(:,2),'+')

See Also

mvtpdf, mvtcdf

Multivariate t Distribution

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS