Skip to content

Chi-squared distribution

A chi-squared variable sums independent squared standard normals. See its density, degrees of freedom and an exact normal-sample variance check for P&L.

The chi-squared distribution is the distribution of a sum of independent squared standard-normal random variables. It describes how much total squared variation a Gaussian model produces by chance. In finance, it supplies an exact reference distribution for a sample-variance statistic when observations are independent and identically distributed normal variables. That condition is part of the result, not an automatic property of daily P&L.
For a positive integer ν\nu, let Z1,…,ZνZ_1,\ldots,Z_\nu be independent variables with the standard normal distribution. Then
Q=∑i=1νZi2∼χν2.Q=\sum_{i=1}^{\nu}Z_i^2\sim\chi^2_\nu.
The parameter ν\nu, pronounced “nu,” is the number of degrees of freedom. Each term is dimensionless, so QQ is dimensionless too. Squaring removes the signs: a large negative shock contributes just as much as an equally large positive shock. The statistic measures magnitude, not direction.

The shape and the scale

The density of the central chi-squared law is

fν(q)=qν/2−1e−q/22ν/2Γ(ν/2),q>0,f_\nu(q)=\frac{q^{\nu/2-1}e^{-q/2}}{2^{\nu/2}\Gamma(\nu/2)},\qquad q>0,
with zero probability on negative values. Here Γ\Gamma is the gamma function. Equivalently, this is a gamma distribution with shape ν/2\nu/2 and scale 22; a rate parameterisation uses rate 1/21/2. This density also defines the family for any positive real ν\nu, although the literal construction as ν\nu squared normals requires integer ν\nu.

Its mean and variance are

E[Q]=ν,Var(Q)=2ν.\mathbb{E}[Q]=\nu,\qquad \text{Var}(Q)=2\nu.
For example, summing four independent squared standard normals gives χ42\chi^2_4, with mean 4 and variance 8. These are moments of the statistic, not USD P&L moments. Since a standard normal has second moment 11 and fourth moment 33, each square has variance 3−1=23-1=2; independence lets the four variances add.
At low degrees of freedom the distribution is strongly right-skewed. Its boundary density diverges as q↓0q\downarrow0 for 0<ν<20<\nu<2, equals 1/21/2 at zero for ν=2\nu=2, and approaches zero there for ν>2\nu>2. None of these cases has an atom at zero. A density height, even an infinite limiting height, is not a point probability. These shape properties and the density formula are tabulated in the NIST distribution handbook.

Five P&L observations, four degrees of freedom

Consider an original synthetic risk-monitoring example. Before observing five one-period P&L values in USD, a team specifies an iid normal model with unknown mean and a null population variance of

σ02=4 USD2.\sigma_0^2=4\ \text{USD}^2.
The observed sample variance, calculated around the sample mean with divisor n−1n-1, is S2=8 USD2S^2=8\ \text{USD}^2. The team wants an upper-sided check for increased variance.
Under the null model, the exact sampling distribution is
Q=(n−1)S2σ02∼χn−12,qobserved=4×84=8.Q=\frac{(n-1)S^2}{\sigma_0^2}\sim\chi^2_{n-1}, \qquad q_{\mathrm{observed}}=\frac{4\times8}{4}=8.
The USD-squared units cancel. The statistic is 8, not “USD 8” or “8 USD-squared.” The degrees of freedom are 4, not 5: estimating the mean imposes the constraint ∑i(Xi−Xˉ)=0\sum_i(X_i-\bar X)=0 on the five centred deviations. The residuals themselves are dependent; under normality an orthogonal change of coordinates expresses their sum of squares through four independent standard-normal coordinates.

For this particular degree count, the density simplifies to f4(q)=qe−q/2/4f_4(q)=qe^{-q/2}/4. Its upper-tail integral is especially convenient:

P(χ42≥q)=e−q/2(1+q2),q≥0.\mathbb{P}(\chi^2_4\ge q)=e^{-q/2}\left(1+\frac q2\right),\qquad q\ge0.
Therefore the upper-sided p-value is
P(χ42≥8)=5e−4=0.0915781944…≈9.16%.\mathbb{P}(\chi^2_4\ge8)=5e^{-4} =0.0915781944\ldots\approx9.16\%.
Under the synthetic iid normal P&L null model, the chi-squared density with four degrees of freedom has mean 4. The shaded upper tail from the observed statistic 8 has probability 0.091578, about 9.16%; the density height at 8 is 0.036631. The sample variance is 8 USD squared and the null variance is 4 USD squared.
Under the synthetic iid normal P&L null model, the chi-squared density with four degrees of freedom has mean 4. The shaded upper tail from the observed statistic 8 has probability 0.091578, about 9.16%; the density height at 8 is 0.036631. The sample variance is 8 USD squared and the null variance is 4 USD squared.
Original analytical plot for the synthetic example. The shaded probability includes the small tail beyond the displayed range; the plotted density is not renormalised. Density height at the cutoff is not the tail probability.
If a 5% significance level was fixed in advance, this upper-sided hypothesis test does not reject the stated variance. That does not establish that the variance equals 4 USD-squared. The 9.16% is the chance, under the complete null model, of obtaining a sample variance at least this large in another five-observation sample. It is not the probability that the null variance is true, nor a posterior probability that the variance exceeds a threshold. A two-sided variance question needs a two-sided rule; the upper tail alone answers a different question. NIST describes these separate variance-test alternatives.

When the reference law changes

Normality supplies the exact finite-sample variance law. Heavy-tailed P&L, serial dependence, changing conditional volatility or selection of the window after seeing its results can invalidate this calculation. Merely retaining the divisor n−1n-1 does not restore it. The chi-squared family also appears as an asymptotic reference for other statistics, including goodness-of-fit tests; those have their own assumptions and degree counts.
The squared-normal construction above is central: the normal coordinates have mean zero and variance one. Squaring shifted normal coordinates generally produces a noncentral chi-squared law, while correlated or differently scaled coordinates need further analysis. “Sum of squares” alone does not identify a distribution.
For the derivation of the variance law and the loss of one degree of freedom, read The Sampling Distribution of S-squared and Cochran's Theorem, especially Theorem 2. The full lesson requires membership, with a public preview available. The same variance pivot can be inverted to form a confidence interval for population variance under the stated normal model.

Sources

Last updated
  • chi squared
  • normal theory
  • sample variance
  • degrees of freedom
  • statistical inference
← Back to the glossaryBack to top ↑