Formula & API reference

Distributions in JDistlib

Every public probability-law and copula class in the main and extreme-value packages, with its parameterization, defining density or mass, and the operations that are actually implemented.

129 documented classes 94 scalar laws with full D/P/Q/R 14 vector or matrix laws 12 copula and joint-law classes

How to read this page

R names, Java spelling

D density is a density or probability mass; P cumulative is a CDF; Q quantile is an inverse CDF; and R random draws one or many variates. A dash means that operation is not defined or not exposed by that class.

Most scalar methods also accept lower/upper-tail and log-probability flags. Random methods take an explicit RandomEngine. Formulae below show the ordinary, non-log density or mass on the stated support. Labels after D/P/Q/R call out useful public helpers or special overloads; the JavaDoc lists every low-level and vectorized overload.

Notation: \(\phi\) and \(\Phi\) are the standard-normal density and CDF; \(\Gamma\), \(B\), \(I\), and \(K\) are the gamma, beta, regularized-beta, and modified Bessel functions; and \(q(\mathbf x)=(\mathbf x-\boldsymbol\mu)^{\mathsf T} \Sigma^{-1}(\mathbf x-\boldsymbol\mu)\). Parameter constraints and boundary behavior are detailed in the linked JavaDoc.

Complete catalog

Find a distribution

Continuous scalar distributions

DistributionSupport & parametersDefining formulaAPI
finance.GeneralizedHyperbolicDistributionx∈ℝ; canonical λ,α,β,δ,μ with α>|β|, δ>0\(r_x=\sqrt{\delta^2+(x-\mu)^2},\ \gamma=\sqrt{\alpha^2-\beta^2},\quad f(x)=\dfrac{(\gamma/\delta)^\lambda}{\sqrt{2\pi}\,K_\lambda(\delta\gamma)}\left(\dfrac{r_x}{\alpha}\right)^{\lambda-1/2}K_{\lambda-1/2}(\alpha r_x)e^{\beta(x-\mu)}\)DPQR CF/MGF
finance.VarianceGammaDistributionx∈ℝ; shape r, drift θ, scale σ, location μ\(X=\mu+\theta G+\sigma\sqrt{G}\,Z,\quad G\sim\operatorname{Gamma}(r,1),\quad Z\sim N(0,1),\quad G\perp Z\)DPQR CF/MGF
finance.StableDistributionx∈ℝ; S1 α∈(0,2], β∈[-1,1], scale σ, location μ\(\log\varphi_X(t)=i\mu t-|\sigma t|^\alpha[1-i\beta\operatorname{sgn}(t)\tan(\pi\alpha/2)]\) for \(\alpha\ne1\); \(\log\varphi_X(t)=i\mu t-|\sigma t|[1+i\beta\tfrac{2}{\pi}\operatorname{sgn}(t)\log|t|]\) for \(\alpha=1\)DPQR CF
finance.CgmyDistributionx∈ℝ; C,G,M>0, Y∈(0,1)∪(1,2), location μ\(\log\varphi_X(t)=i\mu t+C\Gamma(-Y)\big[(M-it)^Y-M^Y+(G+it)^Y-G^Y\big]\)DPQR CF/MGF
finance.NormalTemperedStableDistributionx∈ℝ; α∈(0,1), tempering λ, intensity c, skew θ, scale σ, location μ\(\log\varphi_X(t)=i\mu t+c\Gamma(-\alpha)\left[\left(\lambda+\tfrac12\sigma^2t^2-i\theta t\right)^\alpha-\lambda^\alpha\right]\)DPQR CF/MGF
finance.MeixnerDistributionx∈ℝ; scale a>0, skew b∈(−π,π), shape d>0, location μ\(\varphi_X(t)=e^{i\mu t}\left[\dfrac{\cos(b/2)}{\cosh((at-ib)/2)}\right]^{2d}\)DPQR CF/MGF
finance.GeneralizedInverseGaussianDistributionx>0; λ∈ℝ, χ,ψ>0\(f(x)=\dfrac{(\psi/\chi)^{\lambda/2}}{2K_\lambda(\sqrt{\chi\psi})}\,x^{\lambda-1}\exp\!\left[-\tfrac12\left(\dfrac{\chi}{x}+\psi x\right)\right]\)DPQR CF/MGF
finance.PositiveTemperedStableDistributionx>0; α∈(0,1), tempering λ, intensity c\(\log\operatorname E(e^{-sT})=c\Gamma(-\alpha)\big[(\lambda+s)^\alpha-\lambda^\alpha\big],\qquad s\ge0\)DPQR CF/MGF
finance.LevyIncrementDistributionsupport inherited from unit law X₁; time t>0\(\log\varphi_{X_t}(u)=t\log\varphi_{X_1}(u),\qquad \log M_{X_t}(s)=t\log M_{X_1}(s)\)DPQR CF/MGF
Arcsinea<x<b; endpoints a,b\(f(x)=\dfrac{1}{\pi\sqrt{(x-a)(b-x)}}\)DPQR
AsymmetricLaplacex∈ℝ; location μ, scale σ, asymmetry p\(f(x)=\dfrac{p(1-p)}{\sigma}\exp[-\rho_p((x-\mu)/\sigma)]\)DPQR
Beta0<x<1; shapes α,β\(f(x)=\dfrac{x^{\alpha-1}(1-x)^{\beta-1}}{B(\alpha,\beta)}\)DPQR
BetaPrimex>0; shapes α,β\(f(x)=\dfrac{x^{\alpha-1}(1+x)^{-\alpha-\beta}}{B(\alpha,\beta)}\)DPQR
BirnbaumSaundersx>μ; shape α, scale β, location μ\(X=\mu+\beta\left[\dfrac{\alpha Z}{2}+\sqrt{1+\left(\dfrac{\alpha Z}{2}\right)^2}\right]^2,\quad Z\sim N(0,1)\)DPQR
Cauchyx∈ℝ; location μ, scale σ\(f(x)=\dfrac{1}{\pi\sigma\left[1+\left(\dfrac{x-\mu}{\sigma}\right)^2\right]}\)DPQR
Chix>0; degrees of freedom ν\(f(x)=\dfrac{2^{1-\nu/2}x^{\nu-1}e^{-x^2/2}}{\Gamma(\nu/2)}\)DPQR
ChiSquarex>0; degrees of freedom ν\(f(x)=\dfrac{x^{\nu/2-1}e^{-x/2}}{2^{\nu/2}\Gamma(\nu/2)}\)DPQR
Exponentialx≥0; scale θ\(f(x)=\dfrac{1}{\theta}e^{-x/\theta}\)DPQR
ExponentiallyModifiedGaussianx∈ℝ; normal μ,σ and exponential rate λ\(X=N(\mu,\sigma^2)+\operatorname{Exp}(\lambda)\)DPQR
Fx>0; degrees of freedom ν₁,ν₂\(f(x)=\dfrac{(\nu_1/\nu_2)^{\nu_1/2}x^{\nu_1/2-1}}{B(\nu_1/2,\nu_2/2)(1+\nu_1x/\nu_2)^{(\nu_1+\nu_2)/2}}\)DPQR
FellerParetox≥μ; minimum μ, shapes α,γ,τ, scale θ\(U=\dfrac{((x-\mu)/\theta)^\gamma}{1+((x-\mu)/\theta)^\gamma},\quad U\sim\operatorname{Beta}(\tau,\alpha)\)DPQR
FoldedNormalx≥0; normal μ,σ and side scales a₁,a₂\(f(x)=\dfrac{\phi((x/a_1-\mu)/\sigma)}{a_1\sigma}+\dfrac{\phi((-x/a_2-\mu)/\sigma)}{a_2\sigma}\)DPQR
evd.Fretchetx>μ; location μ, scale σ, shape α\(z=\dfrac{x-\mu}{\sigma},\qquad f(x)=\dfrac{\alpha}{\sigma}z^{-\alpha-1}e^{-z^{-\alpha}}\)DPQR
Gammax>0; shape α, scale θ\(f(x)=\dfrac{x^{\alpha-1}e^{-x/\theta}}{\Gamma(\alpha)\theta^\alpha}\)DPQR
GeneralizedBetaSecondKindx>0; scale b, shape a,p,q\(f(x)=\dfrac{a(x/b)^{ap-1}}{bB(p,q)\left[1+(x/b)^a\right]^{p+q}}\)DPQR
GeneralizedFx>0; log-location μ, log-scale σ, shapes Q,PFor \(P>0\), let \(\delta=\sqrt{Q^2+2P}\), \(s_1=\dfrac{2}{Q^2+2P+Q\delta}\), \(s_2=\dfrac{2}{Q^2+2P-Q\delta}\), and \(w=\dfrac{\delta(\log x-\mu)}{\sigma}\). Then \(f(x)=\dfrac{\delta(s_1/s_2)^{s_1}e^{s_1w}}{\sigma x\left(1+s_1e^w/s_2\right)^{s_1+s_2}B(s_1,s_2)}\). The \(P=0\) limit is generalized gamma; \(P=Q=0\) is log-normal.DPQR
GeneralizedGammax>0; scale b, powers d,k\(f(x)=\dfrac{d\,x^{dk-1}e^{-(x/b)^d}}{b^{dk}\Gamma(k)}\)DPQR
evd.GeneralizedParetox≥μ, 1+ξ(x−μ)/σ>0\(f(x)=\dfrac{1}{\sigma}\left[1+\xi\dfrac{x-\mu}{\sigma}\right]^{-1/\xi-1}\)DPQR
evd.GEVz=1+ξ(x−μ)/σ>0\(f(x)=\dfrac{1}{\sigma}z^{-1/\xi-1}e^{-z^{-1/\xi}}\)DPQR
Gompertzx≥0; shape a, rate b\(h(x)=be^{ax},\qquad f(x)=h(x)\exp\!\left[-\dfrac{b(e^{ax}-1)}{a}\right]\)DPQR H
evd.Gumbelx∈ℝ; location μ, scale σ\(z=\dfrac{x-\mu}{\sigma},\qquad f(x)=\dfrac{1}{\sigma}e^{-z-e^{-z}}\)DPQR
HalfCauchyx≥0; scale σ\(f(x)=\dfrac{2}{\pi\sigma[1+(x/\sigma)^2]}\)DPQR
HalfNormalx≥0; scale σ\(f(x)=\dfrac{2}{\sigma}\phi\!\left(\dfrac{x}{\sigma}\right)\)DPQR
HalfTx≥0; df ν, scale σ\(f(x)=\dfrac{2}{\sigma}t_\nu(x/\sigma)\)DPQR
Huberx∈ℝ; location μ, scale σ, threshold c\(f(x)\propto e^{-\rho_c((x-\mu)/\sigma)}\), with quadratic center and linear tailsDPQR
InvGammax>0; shape α, scale β\(f(x)=\dfrac{\beta^\alpha x^{-\alpha-1}e^{-\beta/x}}{\Gamma(\alpha)}\)DPQR
InvNormalx>0; mean μ, dispersion σ (λ=1/σ²)\(f(x)=\dfrac{1}{\sqrt{2\pi\sigma^2x^3}}\exp\!\left[-\dfrac{(x/\mu-1)^2}{2\sigma^2x}\right]\)DPQR
Kumaraswamy0<x<1; shapes a,b\(f(x)=abx^{a-1}(1-x^a)^{b-1}\)DPQR
Laplacex∈ℝ; location μ, scale b\(f(x)=\dfrac{1}{2b}\exp\!\left(-\dfrac{|x-\mu|}{b}\right)\)DPQR
Levyx>μ; location μ, scale c\(f(x)=\sqrt{\dfrac{c}{2\pi}}\,\dfrac{\exp[-c/(2(x-\mu))]}{(x-\mu)^{3/2}}\)DPQR
Lindleyx≥0; rate θ\(f(x)=\dfrac{\theta^2(1+x)e^{-\theta x}}{1+\theta}\)DPQR
Logisticx∈ℝ; location μ, scale s\(z=\dfrac{x-\mu}{s},\qquad f(x)=\dfrac{e^{-z}}{s(1+e^{-z})^2}\)DPQR
LogLogisticx>0; shape a, scale b\(f(x)=\dfrac{(a/b)(x/b)^{a-1}}{[1+(x/b)^a]^2}\)DPQR
LogNormalx>0; log-mean μ, log-SD σ\(f(x)=\dfrac{1}{x\sigma}\phi\!\left(\dfrac{\ln x-\mu}{\sigma}\right)\)DPQR
LogitNormal0<x<1; logit-mean μ, logit-SD σ\(\operatorname{logit}(X)\sim N(\mu,\sigma^2)\)DPQR
Makehamx≥0; scale a, shape b, constant ε\(S(x)=\exp\!\left[-\varepsilon x-\dfrac{b}{a}(e^{ax}-1)\right],\quad f(x)=(\varepsilon+be^{ax})S(x)\)DPQR
Maxwellx≥0; rate λ\(f(x)=\sqrt{\dfrac{2}{\pi}}\,\lambda^{3/2}x^2e^{-\lambda x^2/2}\)DPQR
MaxwellBoltzmannx≥0; component scale σ\(f(x)=\sqrt{\dfrac{2}{\pi}}\,\dfrac{x^2}{\sigma^3}e^{-x^2/(2\sigma^2)}\)DPQR
Nakagamix≥0; shape m, spread Ω\(f(x)=\dfrac{2m^m x^{2m-1}e^{-mx^2/\Omega}}{\Gamma(m)\Omega^m}\)DPQR
NonCentralBeta0<x<1; shapes α,β, noncentrality λ\(f(x)=\sum_{j=0}^{\infty}\operatorname{Pois}(j;\lambda/2)\operatorname{BetaPDF}(x;\alpha+j,\beta)\)DPQR NCP
NonCentralChiSquarex≥0; df ν, noncentrality λ\(f(x)=\sum_{j=0}^{\infty}\operatorname{Pois}(j;\lambda/2)\,f_{\chi^2_{\nu+2j}}(x)\)DPQR
NonCentralFx≥0; df ν₁,ν₂, noncentrality λ\(X=\dfrac{\chi^2_{\nu_1}(\lambda)/\nu_1}{\chi^2_{\nu_2}/\nu_2}\)DPQR
NonCentralTx∈ℝ; df ν, noncentrality δ\(X=\dfrac{Z+\delta}{\sqrt{V/\nu}},\quad Z\sim N(0,1),\quad V\sim\chi^2_\nu\)DPQR
Normalx∈ℝ; mean μ, SD σ\(f(x)=\dfrac{1}{\sigma}\phi\!\left(\dfrac{x-\mu}{\sigma}\right)\)DPQR R variants
PhaseTypex≥0; initial vector π, transient rate matrix T\(f(x)=\boldsymbol\pi e^{Tx}(-T\mathbf1)\), with optional mass \(1-\boldsymbol\pi\mathbf1\) at zeroDPQR atom
PositiveNormalx≥0; underlying mean μ, SD σ\(f(x)=\dfrac{\phi((x-\mu)/\sigma)}{\sigma\Phi(\mu/\sigma)}\)DPQR
evd.Rayleighx≥0; scale σ\(f(x)=\dfrac{x}{\sigma^2}e^{-x^2/(2\sigma^2)}\)DPQR
evd.ReverseWeibullx<μ; location μ, scale σ, shape k\(z=\dfrac{\mu-x}{\sigma},\qquad f(x)=\dfrac{k}{\sigma}z^{k-1}e^{-z^k}\)DPQR
Ricex≥0; component SD σ, offset ν\(f(x)=\dfrac{x}{\sigma^2}e^{-(x^2+\nu^2)/(2\sigma^2)}I_0\!\left(\dfrac{x\nu}{\sigma^2}\right)\)DPQR
SinhArcsinhx∈ℝ; μ,σ and tail powers ν,τ\(w=\operatorname{asinh}\!\left(\dfrac{x-\mu}{\sigma}\right),\quad r=\dfrac{e^{\tau w}-e^{-\nu w}}{2},\quad F(x)=\Phi(r)\)DPQR
SkewedTx∈ℝ; df ν, skew γ\(f(x)=\begin{cases}\dfrac{2t_\nu(x/\gamma)}{\gamma+\gamma^{-1}},&x\ge0,\\[3pt]\dfrac{2t_\nu(\gamma x)}{\gamma+\gamma^{-1}},&x<0.\end{cases}\)DPQR
Slashx∈ℝ; location μ, scale σ\(X=\mu+\sigma Z/U,\quad Z\sim N(0,1),\ U\sim\operatorname{Unif}(0,1)\)DPQR
Tx∈ℝ; degrees of freedom ν\(f(x)=\dfrac{\Gamma((\nu+1)/2)}{\sqrt{\nu\pi}\Gamma(\nu/2)}\left(1+\dfrac{x^2}{\nu}\right)^{-(\nu+1)/2}\)DPQR
Triangulara≤x≤b; mode c\(f(x)=\begin{cases}\dfrac{2(x-a)}{(b-a)(c-a)},&a\le x\le c,\\[3pt]\dfrac{2(b-x)}{(b-a)(b-c)},&c<x\le b.\end{cases}\)DPQR
TukeyLambdashape λ; finite support when λ>0\(Q(p)=\dfrac{p^\lambda-(1-p)^\lambda}{\lambda}\), with the logistic limit at \(\lambda=0\)DPQR
Tweediefamily-dependent; mean μ, dispersion φ, power ξ\(\operatorname{Var}(X)=\phi\mu^\xi\); exponential-dispersion density via identities, series, or integrationDPQR likelihood
Uniforma≤x≤b\(f(x)=\dfrac{1}{b-a}\)DPQR
Weibullx≥0; shape k, scale λ\(f(x)=\dfrac{k}{\lambda}\left(\dfrac{x}{\lambda}\right)^{k-1}e^{-(x/\lambda)^k}\)DPQR
Wienery>τ; boundary α, nondecision τ, bias β, drift δ\(t=y-\tau,\qquad f(y)=\dfrac{\pi}{\alpha^2}e^{-\delta\alpha\beta-\delta^2t/2}\sum_{k=1}^{\infty}k\sin(k\pi\beta)e^{-k^2\pi^2t/(2\alpha^2)}\) (upper-response component)DPR

Discrete scalar distributions

DistributionSupport & parametersDefining formulaAPI
finance.DelaporteDistributionx=0,1,…; Poisson λ, NB shape r and success p\(N=P+B,\quad P\sim\operatorname{Pois}(\lambda),\quad \Pr(B=j)=\dfrac{\Gamma(j+r)}{\Gamma(r)j!}p^r(1-p)^j,\quad P\perp B\)DPQR atom
finance.FiniteGridDistributionfinite equally spaced grid; origin x₀, step h, weights wⱼ\(x_j=x_0+jh,\qquad \Pr(X=x_j)=\dfrac{w_j}{\sum_{\ell}w_\ell},\quad j=0,\ldots,m-1\)DPQR atom
finance.PolyaAeppliDistributionx=0,1,…; cluster rate λ, geometric success p\(N=\sum_{j=1}^{K}Y_j,\quad K\sim\operatorname{Pois}(\lambda),\quad \Pr(Y_j=m)=p(1-p)^{m-1},\quad m=1,2,\ldots\)DPQR atom
BetaBinomialx=0,…,n; mean μ, dispersion σ, size n\(\Pr(X=x)=\binom{n}{x}\dfrac{B(x+\mu/\sigma,\;n-x+(1-\mu)/\sigma)}{B(\mu/\sigma,\;(1-\mu)/\sigma)}\)DPQR
BetaNegativeBinomialx≥0; size r, beta shapes α,β\(\Pr(X=x)=\dfrac{\Gamma(r+x)}{x!\Gamma(r)}\dfrac{B(\alpha+r,\beta+x)}{B(\alpha,\beta)}\)DPQR
Binomialx=0,…,n; size n, success p\(\Pr(X=x)=\binom{n}{x}p^x(1-p)^{n-x}\)DPQR state
Categoricalfinite supplied outcomes xᵢ and weights wᵢ\(\Pr(X=x_i)=\dfrac{w_i}{\sum_j w_j}\)DPQR
DiscreteLaplacex=μ+k, k∈ℤ; 0<p<1\(\Pr(X=\mu+k)=\dfrac{1-p}{1+p}p^{|k|}\)DPQR
DiscreteWeibullx=0,1,…; 0<q<1, shape β\(\Pr(X=x)=q^{x^\beta}-q^{(x+1)^\beta}\)DPQR
Empiricalobserved values x₁,…,xₙ\(\Pr(X=x)=\dfrac{\#\{i:x_i=x\}}{n}\); quantile is the type-1 inverse ECDFDPQR instance
Geometricx=0,1,…; success p\(\Pr(X=x)=p(1-p)^x\)DPQR
HurdleNegativeBinomialx≥0; NB mean μ, size k, zero probability π\(\Pr(X=0)=\pi,\quad \Pr(X=x)=\dfrac{(1-\pi)\operatorname{NB}(x;\mu,k)}{1-\operatorname{NB}(0;\mu,k)},\ x>0\)DPQR
HurdlePoissonx≥0; rate λ, zero probability π\(\Pr(X=0)=\pi,\quad \Pr(X=x)=\dfrac{(1-\pi)\operatorname{Pois}(x;\lambda)}{1-e^{-\lambda}},\ x>0\)DPQR
HyperGeometricinteger x; red r, black b, draws n\(\Pr(X=x)=\dfrac{\binom{r}{x}\binom{b}{n-x}}{\binom{r+b}{n}}\)DPQR state
Logarithmicx=1,2,…; 0<p<1\(\Pr(X=x)=-\dfrac{p^x}{x\ln(1-p)}\)DPQR
NegBinomialx≥0; size k and probability p or mean μ\(\Pr(X=x)=\dfrac{\Gamma(x+k)}{\Gamma(k)\Gamma(x+1)}p^k(1-p)^x\)DPQR μ variants
NegativeHypergeometricx=r,…,n+r; black n, white m, stop r\(\Pr(X=x)=\dfrac{\binom{x-1}{r-1}\binom{m+n-x}{m-r}}{\binom{m+n}{n}}\)DPQR
Poissonx=0,1,…; mean λ\(\Pr(X=x)=e^{-\lambda}\dfrac{\lambda^x}{x!}\)DPQR state
PoissonBinomialx=0,…,n; Bernoulli probabilities p₁,…,pₙ\(\Pr(X=x)=[z^x]\prod_i\bigl[(1-p_i)+p_i z\bigr]\)DPQR
PoissonInverseGaussianx≥0; mixture mean μ, dispersion φ\(X\mid\Lambda\sim\operatorname{Pois}(\Lambda),\quad \Lambda\sim\operatorname{InvNormal}(\mu,\sqrt{\phi}),\quad \operatorname{Var}(X)=\mu+\phi\mu^3\)DPQR
Skellamx∈ℤ; Poisson means μ₁,μ₂\(X=N_1-N_2,\quad N_i\sim\operatorname{Pois}(\mu_i)\)DPQR
ZeroInflatedNegativeBinomialx≥0; NB mean μ, size k, inflation π\(\Pr(0)=\pi+(1-\pi)\operatorname{NB}(0),\quad \Pr(x)=(1-\pi)\operatorname{NB}(x),\ x>0\)DPQR
ZeroInflatedPoissonx≥0; rate λ, inflation π\(\Pr(0)=\pi+(1-\pi)e^{-\lambda},\quad \Pr(x)=(1-\pi)\operatorname{Pois}(x;\lambda),\ x>0\)DPQR
ZeroTruncatedNegativeBinomialx=1,2,…; NB mean μ, size k\(\Pr(X=x)=\dfrac{\operatorname{NB}(x;\mu,k)}{1-\operatorname{NB}(0;\mu,k)}\)DPQR
ZeroTruncatedPoissonx=1,2,…; rate λ\(\Pr(X=x)=\dfrac{e^{-\lambda}\lambda^x}{x!(1-e^{-\lambda})}\)DPQR
Zipfx=1,…,N; exponent s\(\Pr(X=x)=\dfrac{x^{-s}}{\sum_{k=1}^{N}k^{-s}}\)DPQR

Multivariate and matrix distributions

For random vectors there is no canonical scalar quantile. Normal, Student t, Cauchy, log-normal, Dirichlet, Laplace, and power-exponential laws expose rectangular probabilities with numerical error/status results. The three multivariate count laws use exact inclusive rectangle probabilities. Quantiles are explicitly named.

DistributionSupport & parametersDefining formulaAPI
BivariateLogistic(x₁,x₂)∈ℝ²; locations μᵢ, scales sᵢ\(F(x_1,x_2)=\left[1+e^{-(x_1-\mu_1)/s_1}+e^{-(x_2-\mu_2)/s_2}\right]^{-1}\)DP–R
BivariatePoisson(x,y)∈ℕ₀²; rates λ₁,λ₂,λ₀\(X=U+W,\quad Y=V+W,\quad U,V,W\ \text{independent Poisson}(\lambda_1,\lambda_2,\lambda_0)\)DP–R
Dirichletxᵢ≥0, Σxᵢ=1; concentrations αᵢ\(f(\mathbf x)=\dfrac{\Gamma(\sum_i\alpha_i)}{\prod_i\Gamma(\alpha_i)}\prod_i x_i^{\alpha_i-1}\)DP–R
DirichletMultinomialxᵢ∈ℕ₀, Σxᵢ=n; size n, αᵢ\(\Pr(\mathbf x)=\dfrac{n!}{\prod_i x_i!}\dfrac{\Gamma(\alpha_0)}{\Gamma(n+\alpha_0)}\prod_i\dfrac{\Gamma(x_i+\alpha_i)}{\Gamma(\alpha_i)}\)DP–R
Multinomialxᵢ∈ℕ₀, Σxᵢ=n; size n, weights pᵢ\(\Pr(\mathbf x)=\dfrac{n!}{\prod_i x_i!}\prod_i p_i^{x_i}\)DP–R
MultivariateCauchyx∈ℝᵏ; location μ, scale Σ\(f(\mathbf x)=\dfrac{\Gamma((k+1)/2)}{\Gamma(1/2)\pi^{k/2}|\Sigma|^{1/2}[1+q(\mathbf x)]^{(k+1)/2}}\)DP–R Q*
finance.MultivariateFinancialDistributionx∈ℝᵏ; GH/NIG/VG, stable, or NTS parameters, location μ, skew β, covariance Σ\(\mathbf X=\boldsymbol\mu+W\boldsymbol\beta+\sqrt W\,A\mathbf Z\) (GH/VG/NTS), or \(\mathbf X=\boldsymbol\mu+\sqrt{2W}\,A\mathbf Z\) (stable), where \(\mathbf Z\sim N_k(\mathbf0,I)\) and \(AA^{\mathsf T}=\Sigma\)R projection
MultivariateHypergeometricxᵢ counts; populations mᵢ, draws n\(\Pr(\mathbf x)=\dfrac{\prod_i\binom{m_i}{x_i}}{\binom{\sum_i m_i}{n}},\qquad \sum_i x_i=n\)DP–R
MultivariateLaplacex∈ℝᵏ; location μ, covariance scale Σ\(\mathbf X=\boldsymbol\mu+\sqrt{W}\,\mathbf Z,\quad W\sim\operatorname{Exp}(1),\quad \mathbf Z\sim N_k(\mathbf0,\Sigma)\)DP–R
MultivariateLogNormalxᵢ>0; log-mean μ, log-covariance Σ\(\log\mathbf X\sim N_k(\boldsymbol\mu,\Sigma),\qquad f_{\mathbf X}(\mathbf x)=\dfrac{f_N(\log\mathbf x)}{\prod_i x_i}\)DP–R Q*
MultivariateNormalx∈ℝᵏ; mean μ, covariance Σ\(f(\mathbf x)=\dfrac{\exp[-q(\mathbf x)/2]}{(2\pi)^{k/2}|\Sigma|^{1/2}}\)DP–R Q*
MultivariatePowerExponentialx∈ℝᵏ; location μ, scatter Σ, shape β\(f(\mathbf x)=C(k,\beta)|\Sigma|^{-1/2}\exp\!\left[-\dfrac{q(\mathbf x)^\beta}{2}\right]\)DP–R Q*
MultivariateStudentTx∈ℝᵏ; location μ, scale Σ, df ν\(f(\mathbf x)=\dfrac{\Gamma((\nu+k)/2)}{\Gamma(\nu/2)(\nu\pi)^{k/2}|\Sigma|^{1/2}}\left[1+\dfrac{q(\mathbf x)}{\nu}\right]^{-(\nu+k)/2}\)DP–R Q*
Wishartpositive-definite k×k matrix; df ν, scale Σ or Cholesky L\(f(X)=\dfrac{|X|^{(\nu-k-1)/2}e^{-\operatorname{tr}(\Sigma^{-1}X)/2}}{2^{\nu k/2}|\Sigma|^{\nu/2}\Gamma_k(\nu/2)}\)DPR P*

Copulas

Copulas operate on the unit hypercube. JDistlib 0.7.0+ composes them with continuous marginals through CopulaDistribution and discrete or mixed marginals through MixedCopulaDistribution.

CopulaParametersDefining formula or constructionAPI
IndependenceCopuladimension d≥1\(C(\mathbf u)=\prod_{i=1}^{d}u_i\)DP–R τ
GaussianCopulapositive-definite correlation R\(C(\mathbf u)=\Phi_R(\Phi^{-1}(u_1),\ldots,\Phi^{-1}(u_d))\)DP–R τ
StudentTCopulapositive-definite correlation R, df ν>0\(C(\mathbf u)=T_{R,\nu}(T_\nu^{-1}(u_1),\ldots,T_\nu^{-1}(u_d))\)DP–R τ
ClaytonCopulaθ≥0\(C_\theta(\mathbf u)=\left[\sum_{i=1}^{d}u_i^{-\theta}-d+1\right]^{-1/\theta}\) for \(\theta>0\); \(C_0(\mathbf u)=\prod_i u_i\)DP–R τ
GumbelCopulaθ≥1\(C(\mathbf u)=\exp\!\left\{-\left[\sum_{i=1}^{d}(-\log u_i)^\theta\right]^{1/\theta}\right\}\)DP–R τ
FrankCopulafinite θ; θ<0 only when d=2\(C_\theta(\mathbf u)=-\dfrac1\theta\log\!\left[1+\dfrac{\prod_{i=1}^{d}(e^{-\theta u_i}-1)}{(e^{-\theta}-1)^{d-1}}\right]\) for \(\theta\ne0\); \(C_0(\mathbf u)=\prod_i u_i\)DP–R τ
JoeCopulabivariate; θ≥1\(C(u,v)=1-\left[(1-u)^\theta+(1-v)^\theta-(1-u)^\theta(1-v)^\theta\right]^{1/\theta}\)DP–R τ tail
BB1Copulabivariate; θ≥0, δ≥1\(C_{\theta,\delta}(u,v)=\left\{1+\left[(u^{-\theta}-1)^\delta+(v^{-\theta}-1)^\delta\right]^{1/\delta}\right\}^{-1/\theta}\) for \(\theta>0\), with the Gumbel limit at \(\theta=0\)DP–R τ tail
RotatedCopulabivariate base C; 90°, 180° survival, or 270°\(C^{90}(u,v)=v-C(1-u,v),\quad C^{180}(u,v)=u+v-1+C(1-u,1-v),\quad C^{270}(u,v)=u-C(u,1-v)\)DP–R τ tail
CVineCopulatriangular simplified C-vine pair array\(c(\mathbf u)=\prod_{j=1}^{d-1}\prod_{k=j+1}^{d}c_{j,k\mid1:(j-1)}\!\left(u_{j\mid1:(j-1)},u_{k\mid1:(j-1)}\right)\)D P* – R fit
DVineCopulatriangular simplified D-vine pair array\(c(\mathbf u)=\prod_{\ell=1}^{d-1}\prod_{i=1}^{d-\ell}c_{i,i+\ell\mid i+1:i+\ell-1}\!\left(u_{i\mid i+1:i+\ell-1},u_{i+\ell\mid i+1:i+\ell-1}\right)\)D P* – R fit
MixedCopulaDistributiondeclared continuous/discrete marginals\(F_{\mathbf X}(\mathbf x)=C(F_1(x_1),\ldots,F_d(x_d))\); for continuous margins, \(f_{\mathbf X}(\mathbf x)=c(\mathbf u)\prod_i f_i(x_i)\); for discrete margins, \(\Pr(\mathbf X=\mathbf x)=\Delta_1\cdots\Delta_d C(\mathbf u)\), with \(\Delta_i\) over \([F_i(x_i^-),F_i(x_i)]\)D/P – R status

Exact statistics and derived laws

These classes expose the distribution of a test statistic, order statistic, or sample extreme. Their “density” is a mass function when the statistic is discrete.

DistributionSupport & parametersDefining formulaAPI
Ansariinteger Ansari–Bradley rank statistic; sample sizes m,n\(\Pr(A=a)=\dfrac{\#\{\text{rank allocations with score }a\}}{\binom{m+n}{m}}\)DPQR
evd.Extrememinimum or maximum of n IID draws from supplied F\(F_{\max}(x)=F(x)^n,\qquad F_{\min}(x)=1-[1-F(x)]^n\)DPQR
Kendallinversion count 0,…,n(n−1)/2 (with τ conversions)\(\Pr(K=k)=\dfrac{M(n,k)}{n!}\), where \(M\) is the Mahonian inversion countDPQR τ conversion
evd.Orderj-th order statistic of n IID draws from supplied F\(f_{j:n}(x)=\dfrac{n!}{(j-1)!(n-j)!}f(x)F(x)^{j-1}[1-F(x)]^{n-j}\)DPQR
SignRankWilcoxon signed-rank statistic; sample size n\(\Pr(W=w)=\dfrac{\#\{A\subseteq\{1,\ldots,n\}:\sum_{i\in A}i=w\}}{2^n}\)DPQR instance
SpearmanSpearman rank statistic; permutation size n\(S=\sum_i(i-R_i)^2,\qquad R\ \text{a uniform random permutation}\)DPQR approximations
Tukeystudentized range q; ranges r, means c, df ν\(Q=\dfrac{\max_i\bar X_i-\min_i\bar X_i}{S/\sqrt n}\), with the requested range multiplicityDPQR
WilcoxonMann–Whitney form of the rank-sum statistic, 0,…,mn; sample sizes m,n\(\Pr(W=w)=\dfrac{\#\{\text{two-sample rank allocations with }U=w\}}{\binom{m+n}{m}}\)DPQR instance

Scope notes

Aliases and related APIs

Represented without duplicate classes

Bernoulli is Binomial with size 1; Erlang is Gamma with integer shape; Wald is InvNormal; and Lomax/Pareto variants can be expressed through evd.GeneralizedPareto after parameter conversion.

Not counted as distributions

The package also includes special functions, integration and optimization, random engines, vector math, splines, and goodness-of-fit tests. Browse the JavaDoc index for those supporting APIs.

Sources and verification

R src/nmath, CRAN-package provenance, parameter choices, test sources, and screened candidates are recorded in the distribution provenance ledger.