johnsrnd
Johnson system random numbers
Syntax
r = johnsrnd(quantiles,m,n)
r = johnsrnd(quantiles)
[r,type] = johnsrnd(...)
[r,type,coefs] = johnsrnd(...)
Description
r = johnsrnd(quantiles,m,n)
returns
an m
-by-n
matrix of random numbers
drawn from the distribution in the Johnson system that satisfies the
quantile specification given by quantiles
. quantiles
is
a four-element vector of quantiles for the desired distribution that
correspond to the standard normal quantiles [–1.5 –0.5
0.5 1.5]. In other words, you specify a distribution from which to
draw random values by designating quantiles that correspond to the
cumulative probabilities [0.067 0.309 0.691 0.933]. quantiles
may
also be a 2
-by-4
matrix whose
first row contains four standard normal quantiles, and whose second
row contains the corresponding quantiles of the desired distribution.
The standard normal quantiles must be spaced evenly.
Note
Because r
is a random sample, its sample
quantiles typically differ somewhat from the specified distribution
quantiles.
r = johnsrnd(quantiles)
returns a scalar
value.
r = johnsrnd(quantiles,m,n,...)
or r
= johnsrnd(quantiles,[m,n,...])
returns an m
-by-n
-by-...
array.
[r,type] = johnsrnd(...)
returns the type
of the specified distribution within the Johnson system. type
is 'SN'
, 'SL'
, 'SB'
,
or 'SU'
. Set m
and n
to
zero to identify the distribution type without generating any random
values.
The four distribution types in the Johnson system correspond to the following transformations of a normal random variate:
'SN'
— Identity transformation (normal distribution)'SL'
— Exponential transformation (lognormal distribution)'SB'
— Logistic transformation (bounded)'SU'
— Hyperbolic sine transformation (unbounded)
[r,type,coefs] = johnsrnd(...)
returns
coefficients coefs
of the transformation that defines
the distribution. coefs
is [gamma, eta,
epsilon, lambda]
. If z
is a standard
normal random variable and h
is one of the transformations
defined above, r = lambda*h((z-gamma)/eta)+epsilon
is
a random variate from the distribution type corresponding to h
.
Examples
References
[1] Johnson, Norman Lloyd, et al. Continuous Univariate Distributions. 2nd ed, Wiley 1994.
[2] Johnson, N. L. "Systems of Frequency Curves Generated by Methods of Translation." Biometrika 36, no. 1–2, Jun. 1949, 149–176.
[3] Slifker, James F., and Samuel S. Shapiro. "The Johnson System: Selection and Parameter Estimation." Technometrics 22, no. 2, May 1980, 239–246.
[4] Wheeler, Robert E. "Quantile Estimators of Johnson Curve Parameters." Biometrika 67, no. 3, Dec .1980, 725–728.
Version History
Introduced in R2006a