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.
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.
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
of the same sign, or have central chi-squared components, or omit the normal term.
Another equivalent way is to formulate it as a quadratic form of a normal vector
For the most general case, a reduction towards a common standard form can be made by using a representation of the following form:[5] where D is a diagonal matrix and where x represents a vector of uncorrelated standard normal random variables.
A generalized chi-square variable or distribution can be parameterized in two ways.
The second parameterization is using the quadratic form of a normal vector, where the paremeters are the matrix
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).
[6] There exists Matlab code to convert from one set of parameters to another.
The probability density, cumulative distribution, and inverse cumulative distribution functions of a generalized chi-squared variable do not have simple closed-form expressions.
[6] Numerical algorithms [5][2][8][4] 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: [6] 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.
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.
is a normal vector, its log likelihood is a quadratic form of
[4] 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.
[4] 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).
are k independent, circularly-symmetric centered complex Gaussian random variables with mean 0 and variance
, then the random variable has a generalized chi-squared distribution of a particular form.
The difference from the standard chi-squared distribution is that
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.
has the pdf[9] If there are sets of repeated variances among
, assume that they are divided into M sets, each representing a certain variance value.
It represents an arbitrary linear combination of independent
-distributed random variables with different degrees of freedom: The pdf of