pearsrnd - Pearson system random numbers

Syntax

r = pearsrnd(mu,sigma,skew,kurt,m,n)
[r,type] = pearsrnd(...)
[r,type,coefs] = pearsrnd(...)

Description

r = pearsrnd(mu,sigma,skew,kurt,m,n) returns an m-by-n matrix of random numbers drawn from the distribution in the Pearson system with mean mu, standard deviation sigma, skewness skew, and kurtosis kurt. mu, sigma, skew, and kurt must be scalars.

Some combinations of moments are not valid for any random variable, and in particular, the kurtosis must be greater than the square of the skewness plus 1. The kurtosis of the normal distribution is defined to be 3.

r = pearsrnd(mu,sigma,skew,kurt) returns a scalar value.

r = pearsrnd(mu,sigma,skew,kurt,m,n,...) or r = pearsrnd(mu,sigma,skew,kurt,[m,n,...]) returns an m-by-n-by-... array.

[r,type] = pearsrnd(...) returns the type of the specified distribution within the Pearson system. type is a scalar integer from 0 to 7. Set m and n to zero to identify the distribution type without generating any random values.

The seven distribution types in the Pearson system correspond to the following distributions:

[r,type,coefs] = pearsrnd(...) returns the coefficients coefs of the quadratic polynomial that defines the distribution via the differential equation .

Examples

Generate random values from the standard normal distribution:

r = pearsrnd(0,1,0,3,100,1);  % Equivalent to randn(100,1)

Determine the distribution type:

[r,type] = pearsrnd(0,1,1,4,0,0);
r =
     []
type =
     1

See Also

random, johnsrnd

  


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