St · Statistics & Probability

What Is the Sum of Independent Chi-Squared Distributions?

Published By the 9to5Science editorial team

At a glance

  1. 1. Check independence

    Confirm that the chi-squared random variables are mutually independent; the simple addition rule depends on this assumption.

  2. 2. Add degrees of freedom

    For independent variables, add their degrees of freedom to get the distribution of their sum.

  3. 3. State the result

    The sum has a chi-squared distribution with the total degrees of freedom.

  4. 4. Check variations

    Dependence, unequal scale factors, or other modifications can change the result.

If you add independent chi-squared random variables, the result is another chi-squared random variable. Its degrees of freedom are the sum of the degrees of freedom of the terms. The key condition is independence: knowing only that each variable has a chi-squared distribution is not enough to guarantee the rule.

The addition rule

Let X1,…,XkX_1,\ldots,X_k be mutually independent, with

Xi∼χνi2,X_i \sim \chi^2_{\nu_i},

where νi\nu_i is the degrees of freedom for XiX_i. Then

∑i=1kXi∼χ∑i=1kνi2.\sum_{i=1}^{k} X_i \sim \chi^2_{\sum_{i=1}^{k}\nu_i}.

For two variables, this says that if X∼χa2X\sim\chi^2_a and Y∼χb2Y\sim\chi^2_b independently, then X+Y∼χa+b2X+Y\sim\chi^2_{a+b}. The degrees of freedom add; they are not averaged or multiplied.

Why the rule works

A chi-squared distribution with ν\nu degrees of freedom is a gamma distribution with shape ν/2\nu/2 and scale 22. Its moment-generating function is

MX(t)=(1−2t)−ν/2,t<12.M_X(t)=(1-2t)^{-\nu/2}, \qquad t<\frac12.

For independent random variables, the moment-generating function of a sum is the product of their moment-generating functions. Therefore,

MX1+⋯+Xk(t)=∏i=1k(1−2t)−νi/2=(1−2t)−(∑i=1kνi)/2.\begin{aligned} M_{X_1+\cdots+X_k}(t) &=\prod_{i=1}^{k}(1-2t)^{-\nu_i/2}\\ &=(1-2t)^{-\left(\sum_{i=1}^{k}\nu_i\right)/2}. \end{aligned}

This is the moment-generating function of a chi-squared distribution with ∑iνi\sum_i\nu_i degrees of freedom, which gives the result.

There is also a direct interpretation. A chi-squared variable with integer degrees of freedom ν\nu can be written as the sum of squares of ν\nu independent standard normal variables. If independent chi-squared variables are added, all those squared normal terms are pooled together, so their count—and thus the degrees of freedom—adds.

Worked example

Suppose X∼χ32X\sim\chi^2_3 and Y∼χ52Y\sim\chi^2_5, and suppose XX and YY are independent. Then

X+Y∼χ3+52=χ82.X+Y\sim\chi^2_{3+5}=\chi^2_8.

You can check the result using the mean and variance. A chi-squared variable with ν\nu degrees of freedom has mean ν\nu and variance 2ν2\nu. Thus, for the sum,

E[X+Y]=3+5=8,\mathbb{E}[X+Y]=3+5=8,

and, because of independence,

Var⁡(X+Y)=2(3)+2(5)=16.\operatorname{Var}(X+Y)=2(3)+2(5)=16.

Those are the mean and variance of χ82\chi^2_8. The distributional result is stronger than matching these two moments, but the check is useful for catching arithmetic mistakes.

When the rule does not apply

The variables are dependent. Without independence, the moment-generating function of the sum generally cannot be found by multiplying the individual moment-generating functions. The sum may still be chi-squared in a particular model, but you cannot conclude that just from the separate marginal distributions.

For example, if X∼χν2X\sim\chi^2_\nu and you define Y=XY=X, then both variables have the same chi-squared distribution, but X+Y=2XX+Y=2X. This is a scaled chi-squared variable, not generally χ2ν2\chi^2_{2\nu}.

The terms have different scale factors. A sum such as c1X1+c2X2c_1X_1+c_2X_2 does not generally follow the simple addition rule when the constants cic_i differ. The standard rule applies to an unscaled sum. If every term has the same positive multiplier cc, the result is cχ∑iνi2c\chi^2_{\sum_i\nu_i}, which is scaled chi-squared, not an ordinary chi-squared distribution unless c=1c=1.

The variables are noncentral chi-squared. For independent noncentral chi-squared variables with degrees of freedom νi\nu_i and noncentrality parameters λi\lambda_i, their sum is noncentral chi-squared with degrees of freedom ∑iνi\sum_i\nu_i and noncentrality parameter ∑iλi\sum_i\lambda_i. This is a related addition rule, but the result is not the ordinary central chi-squared distribution unless the total noncentrality is zero.

Common mistakes

  • Adding degrees of freedom without checking independence. Independence is the condition that supports the usual result.
  • Confusing a sum with a difference. The addition rule does not say that differences of chi-squared variables are chi-squared.
  • Ignoring coefficients. A weighted sum such as 2X+Y2X+Y is not covered by the unweighted addition rule.
  • Treating a matching mean and variance as proof. They are useful checks, but identifying a distribution requires a valid distributional argument, such as the moment-generating-function calculation above.

When the variables are independent and unscaled, add their degrees of freedom. If the setup includes dependence, weights, or noncentrality, identify that structure before choosing a distribution for the sum.

References

  1. Mathematical Statistics and Data Analysis, 3rd Edition — John A. Rice
  2. Statistical Inference, 2nd Edition — George Casella and Roger L. Berger

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.