Generation of pseudo-random numbers from over 20 continuous and discrete distributions using the Mulberry32 PRNG.
Statusvalidated
Version1.0.0
Minitab equivalentCalc > Random Data
Description
This module implements reproducible random number generation using the Mulberry32 PRNG (32-bit, deterministic). Continuous distributions are generated via inversion, Box-Muller, and Marsaglia & Tsang methods. The normal distribution uses the SinhArcSinh transform (Jones & Pewsey 2009), which enables a flexible family of asymmetric distributions via skewness (ε) and tailweight (δ) parameters.
Formulas
Mulberry32
sn+1=sn+0x6D2B79F5,U=232t⊕(t≫14)
Deterministic PRNG: same seed always produces the same sequence of uniformly distributed U(0,1) values.Box-Muller
Z1=−2lnS⋅SU1,Z2=−2lnS⋅SU2
Generation of standard normal pairs (Z₁, Z₂) from uniform U₁, U₂ with S = U₁² + U₂² < 1.SinhArcSinh
X=μ+σ⋅sinh(δarcsinh(Z)+ε),Z∼N(0,1)
Jones & Pewsey transform (2009): ε controls skewness, δ controls tailweight. With ε=0, δ=1 this reduces to the standard normal.Gamma (Marsaglia–Tsang)
X=d⋅v3⋅β,d=α−31,c=9d1
Marsaglia & Tsang method for gamma variates with shape α ≥ 1. For α < 1, uses the identity Gamma(α) = Gamma(α+1) · U^(1/α).Chi-Quadrat
X∼χ2(k)=Gamma(2k,2)
Chi-square as special case of the Gamma distribution.F-Verteilung
X=χ2(d2)/d2χ2(d1)/d1
Ratio of two scaled chi-square variates.t-Verteilung
X=χ2(ν)/νZ,Z∼N(0,1)
Ratio of standard normal to scaled chi-square root.Beta
X=G1+G2G1,G1∼Gamma(α,1),G2∼Gamma(β,1)
Beta variate as ratio of two independent gamma variates.Exponential (Inversion)
X=−λln(1−U),U∼U(0,1)
Inversion method for the exponential distribution.Weibull (Inversion)
X=β⋅(−ln(1−U))1/α
Inversion method for the Weibull distribution with shape α and scale β.Lognormal
X=eμ+σZ,Z∼N(0,1)
Exponential transform of a normally distributed variable.Cauchy (Inversion)
X=x0+γtan(π(U−0,5))
Inversion method. Mean and variance do not exist.Laplace
X=μ−b⋅sign(U−0,5)⋅ln(1−2∣U−0,5∣)
Inversion method for the Laplace distribution.Gumbel Max
X=μ−βln(−lnU)
Inversion method for the Gumbel maximum distribution (Type I extreme value).Logistic (Inversion)