HuntsvilleEngineers mark
HE Reference Shelf — huntsvilleengineers.com
The Reference Shelf · Probability, Statistics & Reliability

Chi-square distribution

The distribution you get when you square a bunch of independent bell-curve numbers and add them up — which is exactly what a variance is made of, so it's the ruler behind every "how sure are we about the spread" question.

Also known as: chi-squared · χ² distribution

The formula

The probability density for χ² with k degrees of freedom, for x ≥ 0:

f(x; k) = x^(k/2 − 1) · e^(−x/2) / ( 2^(k/2) · Γ(k/2) )

Reading: the e^(−x/2) pulls the tail down, the x^(k/2−1) pulls the low end up, and Γ(k/2) in the denominator is just the normalizing constant that makes the area equal 1. Γ is the gamma function — the factorial extended to non-integers.

The defining property, which is where it actually comes from:

Q = Z₁² + Z₂² + ... + Z_k²     where each Zᵢ is a standard normal N(0,1)

Reading: add up k squared standard-normal numbers and the sum is χ² with k degrees of freedom. That's the whole origin.

Mean, variance, mode, and a shape number worth memorizing:

mean = k
variance = 2·k
mode = max(k − 2, 0)
skewness = √(8/k)

Reading: it lives entirely on the positive side, it's lopsided to the right, and the lopsidedness fades as √(8/k) — so at k = 5 it's badly skewed (skew ≈ 1.27) and by k = 100 it's nearly symmetric (skew ≈ 0.28) and starting to look normal.

The tie to sample variance — the reason engineers care:

(n − 1) · s² / σ²   ~   χ² with (n − 1) degrees of freedom

Reading: if you draw n samples from a normal population, scale the sample variance by (n−1)/σ² and you get a χ² random variable. Turn that around and you get a confidence interval on the true variance.

The CDF is the regularized lower incomplete gamma function:

F(x; k) = P( k/2 , x/2 )

Reading: that P(a, z) is what tables and calculators evaluate; there's no closed-form elementary expression, which is why people historically reached for a table and now reach for CHISQ.DIST or scipy.stats.chi2.

Where you meet it

  • Variance confidence limits on a bench. You machine 12 parts, measure a critical dimension, and get a sample standard deviation. Your customer wants a bound on the true spread, not just the one you happened to measure. The two-sided 95% interval on σ² is (n−1)s² / χ²(0.975, n−1) up to (n−1)s² / χ²(0.025, n−1). Note the swap: the upper chi-square critical value gives the lower variance limit.
  • MTBF confidence bounds after a reliability test. Run a box on a life test, count failures, and the exponential-model lower confidence bound on MTBF is 2T / χ²(1−α, 2r+2) for a time-terminated test, where T is total unit-hours and r is the number of failures. This is the number that goes on the reliability slide at the design review.
  • Goodness-of-fit at a test review board. You binned measured data and want to argue it follows a claimed distribution. Pearson's χ² statistic sums (observed − expected)² / expected across bins, and you compare it to a chi-square critical value. Same math shows up when a supplier claims their defect counts fit a Poisson.
  • Gyro and IMU acceptance. Allan-variance and repeatability specs are variance specs. When you demonstrate a noise floor from a finite run, the uncertainty on that variance estimate is chi-square, and ignoring it is how a marginal unit passes on a lucky sample.

How it works

Everything follows from the squares. A variance is an average of squared deviations, and squares of normal numbers are chi-square, so the sampling distribution of a variance estimate is chi-square scaled by a constant. That single fact carries the whole subject.

The degrees of freedom is the count of independent squared terms left after you spend some on estimating other things. Sum k raw standard normals and you get k df. But estimate the mean from the same data first and you've used one up — that's the n−1 in the sample-variance result, and forgetting it (dividing by n instead of n−1, or looking up df = n) is the classic mistake. It biases your variance low and your confidence interval too tight.

The asymmetry is the second thing people get wrong. The distribution is right-skewed, so a confidence interval on variance is not symmetric about the point estimate. With n = 10 and a sample variance of 4, the 95% interval on the true variance runs from about 1.89 to 13.33 — the upper reach is far longer than the lower. If you build a symmetric ± interval out of habit, you'll quote the wrong bounds, and on the conservative side of a spec that costs you real margin. The skew is worst at low df, which is exactly the small-sample regime where engineers most need the interval.

Limits of validity. The (n−1)s²/σ² ~ χ² result assumes the underlying data is genuinely normal and independent. Heavy tails, autocorrelation between samples, or a drifting process all break it, and the break is not gentle — variance estimates are sensitive to outliers, so a single fat-tailed point can throw the interval badly. The MTBF version leans on the exponential (constant-hazard) assumption; if your parts wear out or have infant mortality, the hazard isn't constant, the exponential model is wrong, and the chi-square bound is answering a question you didn't ask. Weibull, not chi-square, is where you go then.

The degrees-of-freedom bookkeeping in reliability trips people up. Time-terminated (you stop the clock at a fixed time) uses 2r + 2 df for the lower MTBF bound; failure-terminated (you stop at the r-th failure) uses 2r. The extra +2 credits you for the test time that ran past the last failure. Mix them up and your demonstrated MTBF is off. The clean edge case: zero failures still gives a finite lower bound, 2T / χ²(1−α, 2), because 2r+2 = 2 when r = 0 — a fixed-length clean run still buys you a number.

As k grows the distribution creeps toward normal (that √(8/k) skew heading to zero), which is why large-sample variance work can lean on normal approximations and small-sample work cannot.

History

The distribution showed up more than once before it got its name. Irénée-Jules Bienaymé wrote down a version as early as 1838 while studying sums arising from binomial trials, and returned to it in 1852 in a least-squares context. [6] Later the German geodesist Friedrich Robert Helmert derived the sampling distribution of the sample variance from a normal population in papers of 1875–76 — which is the chi-square in everything but name. [1][2] For decades German statisticians called it the Helmert distribution in his honor. [1] But neither derivation moved the mainstream; they were answers looking for a question the field hadn't fully asked yet.

The question arrived with Karl Pearson. In 1900 Pearson published the chi-squared goodness-of-fit test, and in one paper he tied together the distribution, a statistic computed from data, and a decision procedure for whether observations fit a model. [1][2] That bundle — a curve, a number, and a rule for what to do with it — is what made it stick, and it's why the Greek letter χ (Pearson's notation) rides on the whole thing to this day. Helmert and Bienaymé had the mathematics; Pearson gave working analysts a tool they could pick up and use, which is usually the difference between a result that's cited and one that's used.

Related tools

  • /tools/bearing-life-l10
  • /tools/half-life-decay

Sources

  1. https://en.wikipedia.org/wiki/Chi-squared_distribution
  2. https://www.ebsco.com/research-starters/science/chi-squared-distribution
  3. https://dlmf.nist.gov/8.2
  4. https://www.quanterion.com/confidence-bounds-on-the-mean-time-between-failure-mtbf-for-a-time-truncated-test/
  5. https://accendoreliability.com/confidence-intervals-for-mtbf/
  6. Lancaster, H. O. (1966). "Forerunners of the Pearson χ²." Australian Journal of Statistics 8(3): 117–126. https://doi.org/10.1111/j.1467-842X.1966.tb00170.x

Written by HE in our own words from the cited sources — engineering judgment included, your stamp still required. All entries →

★ The Reference Shelf

Reading is free. The shelf is for cardholders.

Your library card is an email address: pin it to your shelf, print the card, take the FE/PE quick-reference pack, read the Huntsville history. The shelf remembers what you reach for.

Already on the list? Enter with your subscribed email →