Generalized chi-squared distribution explained

In probability theory and statistics, the generalized chi-squared distribution (or generalized chi-square distribution) is the distribution of a quadratic form of a multinormal variable (normal vector), or a linear combination of different normal variables and squares of normal variables. Equivalently, it is also a linear sum of independent noncentral chi-square variables and a normal variable. There are several other such generalizations for which the same term is sometimes used; some of them are special cases of the family discussed here, for example the gamma distribution.

Definition

The generalized chi-squared variable may be described in multiple ways. One is to write it as a weighted sum of independent noncentral chi-square variables

{{\chi}'}2

and a standard normal variable

z

:[1] [2]

\tilde{\chi}(\boldsymbol{w},\boldsymbol{k},\boldsymbol{λ},s,m)=\sumiwi{{\chi}'}2(ki,λi)+sz+m.

Here the parameters are the weights

wi

, the degrees of freedom

ki

and non-centralities

λi

of the constituent non-central chi-squares, and the coefficients

s

and

m

of the normal. Some important special cases of this have all weights

wi

of the same sign, or have central chi-squared components, or omit the normal term.

Since a non-central chi-squared variable is a sum of squares of normal variables with different means, the generalized chi-square variable is also defined as a sum of squares of independent normal variables, plus an independent normal variable: that is, a quadratic in normal variables.

Another equivalent way is to formulate it as a quadratic form of a normal vector

\boldsymbol{x}

:

\tilde{\chi}=q(\boldsymbol{x})=\boldsymbol{x}'

Q2

\boldsymbol{x}+\boldsymbol{q1}'\boldsymbol{x}+q0

.

Here

Q2
is a matrix,

\boldsymbol{q1}

is a vector, and

q0

is a scalar. These, together with the mean

\boldsymbol{\mu}

and covariance matrix

\Sigma

of the normal vector

\boldsymbol{x}

, parameterize the distribution.

For the most general case, a reduction towards a common standard form can be made by using a representation of the following form:[3]

X=(z+a)TA(z+a)+cTz=(x+b)TD(x+b)+dTx+e,

where D is a diagonal matrix and where x represents a vector of uncorrelated standard normal random variables.

Parameter conversions

A generalized chi-square variable or distribution can be parameterized in two ways. The first is in terms of the weights

wi

, the degrees of freedom

ki

and non-centralities

λi

of the constituent non-central chi-squares, and the coefficients

s

and

m

of the added normal term. The second parameterization is using the quadratic form of a normal vector, where the paremeters are the matrix
Q2
, the vector

\boldsymbol{q1}

, and the scalar

q0

, and the mean

\boldsymbol{\mu}

and covariance matrix

\Sigma

of the normal vector. The parameters of the first expression (in terms of non-central chi-squares, a normal and a constant) can be calculated in terms of the parameters of the second expression (quadratic form of a normal vector).[4]

The parameters of the second expression (quadratic form of a normal vector) can also be calculated in terms of the parameters of the first expression (in terms of non-central chi-squares, a normal and a constant).

There exists Matlab code to convert from one set of parameters to another.

Computing the PDF/CDF/inverse CDF/random numbers

The probability density, cumulative distribution, and inverse cumulative distribution functions of a generalized chi-squared variable do not have simple closed-form expressions. But there exist several methods to compute them numerically: Ruben's method,[5] Imhof's method, IFFT method,[6] ray method, and ellipse approximation.

Numerical algorithms [7] and computer code (Fortran and C, Matlab, R, Python, Julia) have been published that implement some of these methods to compute the PDF, CDF, and inverse CDF, and to generate random numbers.

The following table shows the best methods to use to compute the CDF and PDF for the different parts of the generalized chi-square distribution in different cases:

\tilde{\chi}

type
part best cdf/pdf method(s)
ellipse:

wi

same sign,

s=0

body Ruben, Imhof, IFFT, ray
finite tail Ruben, ray (if

λi=0

), ellipse
infinite tail Ruben, ray
not ellipse:

wi

mixed signs, and/or

s0

body Imhof, IFFT, ray
infinite tails ray

Applications

The generalized chi-squared is the distribution of statistical estimates in cases where the usual statistical theory does not hold, as in the examples below.

In model fitting and selection

If a predictive model is fitted by least squares, but the residuals have either autocorrelation or heteroscedasticity, then alternative models can be compared (in model selection) by relating changes in the sum of squares to an asymptotically valid generalized chi-squared distribution.[8]

Classifying normal vectors using Gaussian discriminant analysis

If

\boldsymbol{x}

is a normal vector, its log likelihood is a quadratic form of

\boldsymbol{x}

, and is hence distributed as a generalized chi-squared. The log likelihood ratio that

\boldsymbol{x}

arises from one normal distribution versus another is also a quadratic form, so distributed as a generalized chi-squared.

In Gaussian discriminant analysis, samples from multinormal distributions are optimally separated by using a quadratic classifier, a boundary that is a quadratic function (e.g. the curve defined by setting the likelihood ratio between two Gaussians to 1). The classification error rates of different types (false positives and false negatives) are integrals of the normal distributions within the quadratic regions defined by this classifier. Since this is mathematically equivalent to integrating a quadratic form of a normal vector, the result is an integral of a generalized-chi-squared variable.

In signal processing

The following application arises in the context of Fourier analysis in signal processing, renewal theory in probability theory, and multi-antenna systems in wireless communication. The common factor of these areas is that the sum of exponentially distributed variables is of importance (or identically, the sum of squared magnitudes of circularly-symmetric centered complex Gaussian variables).

If

Zi

are k independent, circularly-symmetric centered complex Gaussian random variables with mean 0 and variance
2
\sigma
i
, then the random variable

\tilde{Q}=

k
\sum
i=1
2
|Z
i|

has a generalized chi-squared distribution of a particular form. The difference from the standard chi-squared distribution is that

Zi

are complex and can have different variances, and the difference from the more general generalized chi-squared distribution is that the relevant scaling matrix A is diagonal. If
2
\mu=\sigma
i
for all i, then

\tilde{Q}

, scaled down by

\mu/2

(i.e. multiplied by

2/\mu

), has a chi-squared distribution,

\chi2(2k)

, also known as an Erlang distribution. If
2
\sigma
i
have distinct values for all i, then

\tilde{Q}

has the pdf[9]

f(x;

2)
k,\sigma
k

=

k
\sum
i=1
-x
2
\sigma
i
e
2
\sigma
k
\prod
j=1,ji
\left(1-
2
\sigma
j
2
\sigma
i
\right)
i

forx\geq0.

If there are sets of repeated variances among

2
\sigma
i
, assume that they are divided into M sets, each representing a certain variance value. Denote

r=(r1,r2,...,rM)

to be the number of repetitions in each group. That is, the mth set contains

rm

variables that have variance
2
\sigma
m.
It represents an arbitrary linear combination of independent

\chi2

-distributed random variables with different degrees of freedom:

\tilde{Q}=

M
\sum
m=1
2
\sigma
m/2*

Qm,Qm\sim

2(2r
\chi
m)

.

The pdf of

\tilde{Q}

is[10]

f(x;r,

2
\sigma
1,

...

2
\sigma
M)

=

M
\prod
m=1
1
2rm
\sigma
m
M
\sum
k=1
rk
\sum
l=1
\Psik,l,r
(rk-l)!
rk-l
(-x)
-x
2
\sigma
k
e

,forx\geq0,

where

\Psik,l,r=

rk-1
(-1)
\sum
i\in \Omegak,l

\prodj\binom{ij+rj-1}{i

-
j} \left(1
2
\sigma
j
1
2
\sigma
k
-(rj+ij)
\right)

,

with

i=[i1,\ldots,i

T
M]
from the set

\Omegak,l

ofall partitions of

l-1

(with

ik=0

) defined as

\Omegak,l=\left\{[i1,\ldots,im]\inZm;

M
\sum
j=1

ij=l-1,ik=0,ij\geq0forallj\right\}.

See also

References

  1. Davies, R.B. (1973) Numerical inversion of a characteristic function. Biometrika, 60 (2), 415 - 417
  2. Davies, R.B. (1980) "Algorithm AS155: The distribution of a linear combination of χ2 random variables", Applied Statistics, 29, 323 - 333
  3. Sheil, J., O'Muircheartaigh, I. (1977) "Algorithm AS106: The distribution of non-negative quadratic forms in normal variables",Applied Statistics, 26, 92 - 98
  4. 2012.14331 . Das . Abhranil . Wilson S Geisler . Methods to integrate multinormals and compute classification measures . 2020 . stat.ML .
  5. Ruben . Harold . Probability content of regions under spherical normal distributions, IV: The distribution of homogeneous and non-homogeneous quadratic functions of normal variables. . The Annals of Mathematical Statistics . 1962 . 542-570.
  6. 2404.05062 . Das . Abhranil . New methods to compute the generalized chi-square distribution . 2024.
  7. Imhof . J. P. . Computing the Distribution of Quadratic Forms in Normal Variables . Biometrika . 419–426 . 10.2307/2332763 . 1961. 48 . 3/4 . 2332763 .
  8. Jones, D.A. (1983) "Statistical analysis of empirical models fitted by optimisation", Biometrika, 70 (1), 67 - 88
  9. D. Hammarwall, M. Bengtsson, B. Ottersten (2008) "Acquiring Partial CSI for Spatially Selective Transmission by Instantaneous Channel Norm Feedback", IEEE Transactions on Signal Processing, 56, 1188–1204
  10. E. Björnson, D. Hammarwall, B. Ottersten (2009) "Exploiting Quantized Channel Norm Feedback through Conditional Statistics in Arbitrarily Correlated MIMO Systems", IEEE Transactions on Signal Processing, 57, 4027–4041

External links