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
| Type | Name | Default | Description |
|---|---|---|---|
| Generator | g (from Var) | Random number generator | |
| Real | a (from Var) | 0 | First parameter of the prob. distribution |
| Real | b (from Var) | 0 | Second parameter of the prob. distribution |
| Real | c (from Var) | 0 | Third parameter of the prob. distribution (only for the Johnson and Triangular distributions) |
| Real | d (from Var) | 0 | Fourth parameter of the prob. distribution (only for the Johnson distribution) |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | x (from Var) | Generated random variate | |
| Generator | gout (from Var) | Updated random number generator |