PLAYGROUND

DISTRIBUTIONS / CONTINUOUS / CHI SQUARE 3P

Chi Square 3P distribution

Portrait

The three-parameter chi-square distribution is a shifted and rescaled chi-square. It keeps the standardized interpretation of a sum of squares while allowing the observed origin and unit to differ.

Historical trail

The 3P suffix is a common software parameterization convention used in reliability and distribution libraries. Its mathematical history is Pearson’s chi-square, not a separate newly named family.

Two useful connections

  • It becomes standard chi-square when location is zero and scale is one. Because it is a transformed Gamma family, it also retains links with Gamma, Erlang, and F, although parameter interpretations change with scale.
  • The distinction between “shifted” and “noncentral” is conceptual: one changes the axis after generation; the other changes the mechanism generating the squares.

A use case

It can describe data whose physical origin is not zero. In classical variance inference, however, a free shift removes the exact statistic interpretation and should not be added without a mechanism.

Diagnostic advice

A good fit with free loc can hide that the data are not actually a sum of squares; comparing Gamma and Weibull alternatives is useful.

A sum of squares after changing ruler and origin

Chi Square 3P takes a standard Chi Square variable, multiplies it by a scale, and adds location. The positive skewed silhouette remains, but observed values are no longer literally a sum of squared standard Normal variables.

This distinction prevents a common confusion. Shifting changes the axis after squares are generated; a Noncentral Chi Square changes Normal means before squaring. Only the latter describes a test statistic under an alternative. The 3P form can model skewed measurements with their own threshold and unit, but degrees of freedom become a phenomenological shape parameter when location or scale depart from the classical construction.

Decision guide

A good candidate when: a sum-of-squares mechanism applies after subtracting a known baseline or origin that need not be zero.

Compare it with: standard Chi-square before estimating a shift. If loc has no substantive meaning, a 3P Gamma can describe the shape without implying theoretical degrees of freedom.

References

  • SciPy reference: scipy.stats.chi2 — definition and parameterization
  • Johnson, N. L., Kotz, S. & Balakrishnan, N. (1994). Continuous Univariate Distributions, 2nd ed., Vol. 1. Wiley.
  • Pearson, K. (1900). On the criterion that a given system of deviations from the probable in the case of a correlated system of variables is such that it can be reasonably supposed to have arisen from random sampling. Philosophical Magazine, 50, 157–175.

Chi Square 3P Distribution: equations and calculator

Distribution defintion

X∼χ3P2(df,Loc,Sc)X\sim\mathrm{\chi^{2}_{3P}}\left(\text{df},\text{Loc},\text{Sc}\right)

Distribution domain

x∈(Loc,∞)x\in\left(\text{Loc},\infty\right)

Parameters domain and parameters constraints

df∈N+,Loc∈R,Sc∈R+\text{df}\in\mathbb{N}^{+},\text{Loc}\in\mathbb{R},\text{Sc}\in\mathbb{R}^{+}

Cumulative distribution function

FX(x)=γ(df2, z(x)2)Γ(df2)=P(df2, z(x)2)F_{X}\left(x\right)=\frac{\gamma(\frac{\text{df}}{2},\,\frac{z(x)}{2})}{\Gamma(\frac{\text{df}}{2})}=\text{P}\left(\frac{\text{df}}{2},\,\frac{z(x)}{2}\right)

Probability density function

fX(x)=1Sc12df/2Γ(df/2) xdf/2−1e−z(x)/2f_{X}\left(x\right)=\frac{1}{\text{Sc}}\frac{1}{2^{\text{df}/2}\Gamma(\text{df}/2)}\,x^{\text{df}/2-1} e^{-z(x)/2}

Percent point function/Sample

FX−1(u)=2P−1(df2,u)F^{-1}_{X}\left(u\right)=2\text{P}^{-1}\left(\frac{\text{df}}{2},u\right)

Non-central parametric moments

μ~k′=E[X~k]=∫0∞xkfX~(x)dx=df(df+2)⋯(df+2k−2)=2kΓ(k+df2)Γ(df2)\tilde{\mu}'_{k}=E[\tilde{X}^k]=\int_{0}^{\infty}x^{k}f_{\tilde{X}}\left(x\right)dx=\text{df}(\text{df}+2)\cdots(\text{df}+2k-2)=2^k\frac{\Gamma\left(k+\frac{\text{df}}{2}\right)}{\Gamma\left(\frac{\text{df}}{2}\right)}

Parametric mean

Mean(X)=Loc+Sc⋅μ~1′=Loc+Sc⋅df\mathrm{Mean}(X)=\text{Loc}+\text{Sc}\cdot\tilde{\mu}'_{1}=\text{Loc}+\text{Sc}\cdot \text{df}

Parametric variance

Variance(X)=Sc2⋅(μ~2′−μ~1′2)=2⋅df⋅Sc2\mathrm{Variance}(X)=\text{Sc}^{2}\cdot(\tilde{\mu}'_{2}-\tilde{\mu}'^{2}_{1})=2\cdot \text{df}\cdot \text{Sc}^{2}

Parametric skewness

Skewness(X)=μ~3′−3μ~2′μ~1′+2μ~1′3(μ~2′−μ~1′2)1.5=8df\mathrm{Skewness}(X)=\frac{\tilde{\mu}'_{3}-3\tilde{\mu}'_{2}\tilde{\mu}'_{1}+2\tilde{\mu}'^{3}_{1}}{(\tilde{\mu}'_{2}-\tilde{\mu}'^{2}_{1})^{1.5}}=\sqrt{\frac{8}{\text{df}}}

Parametric kurtosis

Kurtosis(X)=μ~4′−4μ~1′μ~3′+6μ~1′2μ~2′−3μ~1′4(μ~2′−μ~1′2)2=3+12df\mathrm{Kurtosis}(X)=\frac{\tilde{\mu}'_{4}-4\tilde{\mu}'_{1}\tilde{\mu}'_{3}+6\tilde{\mu}'^{2}_{1}\tilde{\mu}'_{2}-3\tilde{\mu}'^{4}_{1}}{(\tilde{\mu}'_{2}-\tilde{\mu}'^{2}_{1})^{2}}=3+\frac{12}{\text{df}}

Parametric median

Median(X)=Loc+Sc×2P−1(df2,12)\mathrm{Median}(X)=\text{Loc}+\text{Sc}\times 2\text{P}^{-1}\left(\frac{\text{df}}{2},\frac{1}{2}\right)

Parametric mode

Mode(X)=Loc+Sc×max(df−2,0)\mathrm{Mode}(X)=\text{Loc}+\text{Sc}\times \text{max}(\text{df}-2,0)

Additional information and definitions

X~∼χ2(df)\tilde{X}\sim\mathrm{\chi^{2}}\left(\text{df}\right)
Loc:Location parameter\text{Loc}:\text{Location parameter}
Sc:Scale parameter\text{Sc}:\text{Scale parameter}
z(x)=(x−Loc)/Scz\left(x\right)=\left(x-\text{Loc}\right)/\text{Sc}
u:Uniform[0,1] random varibleu:\text{Uniform[0,1] random varible}
P(a,x)=γ(a,x)Γ(a):Regularized lower incomplete gamma function\text{P}\left(a,x\right)=\frac{\gamma(a,x)}{\Gamma(a)}:\text{Regularized lower incomplete gamma function}
P−1(a,u):Inverse of regularized lower incomplete gamma function\text{P}^{-1}\left(a,u\right):\text{Inverse of regularized lower incomplete gamma function}
γ(a,x):Lower incomplete gamma function\gamma\left(a,x\right):\text{Lower incomplete gamma function}
Γ(x):Gamma function\Gamma\left(x\right):\text{Gamma function}