functionJohnson

Johnson

Extends from Var (prototype for variate generation functions).

Information

Johnson

Johnson probability distribution function.

Syntax

Johnson(g,alpha1,alpha2,a,b) if bounded (alpha2 > 0) 
Johnson(g,alpha1,alpha2,gamma,beta) if unbounded (alpha2 < 0)

Description

Generates a random variate following the Johnson probability distribution, with parameters alpha1 and alpha2. If alpha2 > 0, for the Johnson bounded distribution, the variate is generated in the interval [a,b]. Otherwise, gamma and beta are the shape parameters.

Examples

 (u,g) := Johnson(g,0.1,0.5,1,4); // bounded
 (u,g) := Johnson(g,0.1,-0.5,1,1); // unbounded

Inputs

TypeNameDefaultDescription
Generatorg (from Var)Random number generator
Reala (from Var)0First parameter of the prob. distribution
Realb (from Var)0Second parameter of the prob. distribution
Realc (from Var)0Third parameter of the prob. distribution (only for the Johnson and Triangular distributions)
Reald (from Var)0Fourth parameter of the prob. distribution (only for the Johnson distribution)

Outputs

TypeNameDefaultDescription
Realx (from Var)Generated random variate
Generatorgout (from Var)Updated random number generator