Difference between revisions of "Chi-squared distribution"
m |
|||
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[category: | + | [[category:Continuous distributions]] |
− | [[ | + | [[category:Semi-bounded distributions]] |
+ | [[category:Unimodal distributions]] | ||
+ | [[category:Univariate distributions]] | ||
+ | {{ReleaseBar}} | ||
− | + | The '''''<math>\Chi^2</math>-squared distribution''''' is a [[:category:Continuous distributions|continuous]], [[:category:Semi-bounded distributions|positive only]], [[:category:Unimodal distributions|unimodal]] probability distribution that describes the sum of independent [[Normal distribution|normally-distributed]] random variables. | |
− | + | <center>[[image:ChiSquared(3).png]]</center> | |
− | + | The [[Chi-squared distribution]] with «dof» degrees of freedom describes the distribution of a Chi-Squared metric defined as | |
− | + | :<math>\Chi^2 \sum_{i=1}^n {y_i}^2</math> | |
− | + | where each ''y<sub>i</sub>'' is independently sampled from a standard normal distribution and ''«dof» = n - 1'' . The distribution is defined over nonnegative values. | |
+ | The Chi-squared distribution is commonly used for analyses of second moments, such as analyses of variance and contingency table analyses. The ratio of two chi-squared-distributed variables follows an [[F-distribution]]. | ||
+ | |||
+ | == Functions == | ||
+ | === <div id="ChiSquared">ChiSquared(dof)</div> === | ||
+ | The distribution function. Use this to define a chance variable or other uncertain quantity with an F-distribution with «dof» degrees of freedom. | ||
+ | |||
+ | === <div id="DensChiSquared">Dens{{Release||5.1|_}}ChiSquared(x, dof)</div> === | ||
+ | The analytic probability density at «x». Equal to | ||
+ | :<math>p(x) = {1\over{2^{d/2} \Gamma(d/2)}} x^{d/2-1} e^{-x/2}</math> | ||
+ | where <math>d</math> is «dof» and <math>\Gamma(x)</math> is the <code>[[GammaFn]](x)</code>. | ||
+ | |||
+ | === <div id="CumChiSquared">CumChiSquared(x, dof)</div> === | ||
+ | The analytic cumulative density up to «x». This is the probability that a random sample will be less than or equal to «x». | ||
+ | |||
+ | === <div id="CumChiSquaredInv">CumChiSquaredInv(p, dof)</div> === | ||
+ | The inverse cumulative density (quantile function), which computes the p<sup>th</sup> fractile/quantile/percentile value x, which has a «p» probability of being greater than or equal to a random variate draw from a chi-squared distribution with «dof» degrees of freedom. | ||
+ | |||
+ | == Statistics == | ||
+ | Theoretical statistics (i.e., in the absence of sampling error) are: | ||
+ | * [[Mean]] = dof | ||
+ | * Mode = k-2 when k>2, 0 otherwise | ||
+ | * [[Median]] = ... | ||
+ | * [[Variance]] = 2 * dof | ||
+ | * [[Skewness]] = <math>\sqrt{ 8 / dof}</math> | ||
+ | * [[Kurtosis]] = 12 / dof | ||
+ | |||
+ | == Examples == | ||
Suppose | Suppose | ||
:<code>Variable V := ChiSquared(k)</code> | :<code>Variable V := ChiSquared(k)</code> | ||
Line 17: | Line 47: | ||
:<code>Variable S := (V/k)*(W/m)</code> | :<code>Variable S := (V/k)*(W/m)</code> | ||
− | <code>S</code> is distributed as an F distribution with <code>k</code> and <code>m</code> degrees of freedom. | + | <code>S</code> is distributed as an [[F-distribution]] with <code>k</code> and <code>m</code> degrees of freedom. |
The F distribution is useful for the analysis of ratios of variance, such as a one-factor between-subjects analysis of variance. | The F distribution is useful for the analysis of ratios of variance, such as a one-factor between-subjects analysis of variance. | ||
− | |||
− | |||
− | |||
== See Also == | == See Also == | ||
* [[Dens_ChiSquared]] | * [[Dens_ChiSquared]] | ||
* [[CumChiSquared]] | * [[CumChiSquared]] | ||
+ | * [[Normal]] | ||
+ | * [[Gamma]] -- very closely related distribution. | ||
+ | * [[Rayleigh]] | ||
+ | * [[F-distribution]] | ||
* [[Parametric continuous distributions]] | * [[Parametric continuous distributions]] | ||
* [[Distribution Densities Library]] | * [[Distribution Densities Library]] |
Latest revision as of 20:37, 10 October 2018
Release: |
4.6 • 5.0 • 5.1 • 5.2 • 5.3 • 5.4 • 6.0 • 6.1 • 6.2 • 6.3 • 6.4 • 6.5 |
---|
The [math]\displaystyle{ \Chi^2 }[/math]-squared distribution is a continuous, positive only, unimodal probability distribution that describes the sum of independent normally-distributed random variables.

The Chi-squared distribution with «dof» degrees of freedom describes the distribution of a Chi-Squared metric defined as
- [math]\displaystyle{ \Chi^2 \sum_{i=1}^n {y_i}^2 }[/math]
where each yi is independently sampled from a standard normal distribution and «dof» = n - 1 . The distribution is defined over nonnegative values.
The Chi-squared distribution is commonly used for analyses of second moments, such as analyses of variance and contingency table analyses. The ratio of two chi-squared-distributed variables follows an F-distribution.
Functions
ChiSquared(dof)
The distribution function. Use this to define a chance variable or other uncertain quantity with an F-distribution with «dof» degrees of freedom.
DensChiSquared(x, dof)
The analytic probability density at «x». Equal to
- [math]\displaystyle{ p(x) = {1\over{2^{d/2} \Gamma(d/2)}} x^{d/2-1} e^{-x/2} }[/math]
where [math]\displaystyle{ d }[/math] is «dof» and [math]\displaystyle{ \Gamma(x) }[/math] is the GammaFn(x)
.
CumChiSquared(x, dof)
The analytic cumulative density up to «x». This is the probability that a random sample will be less than or equal to «x».
CumChiSquaredInv(p, dof)
The inverse cumulative density (quantile function), which computes the pth fractile/quantile/percentile value x, which has a «p» probability of being greater than or equal to a random variate draw from a chi-squared distribution with «dof» degrees of freedom.
Statistics
Theoretical statistics (i.e., in the absence of sampling error) are:
- Mean = dof
- Mode = k-2 when k>2, 0 otherwise
- Median = ...
- Variance = 2 * dof
- Skewness = [math]\displaystyle{ \sqrt{ 8 / dof} }[/math]
- Kurtosis = 12 / dof
Examples
Suppose
Variable V := ChiSquared(k)
Variable W := ChiSquared(m)
Variable S := (V/k)*(W/m)
S
is distributed as an F-distribution with k
and m
degrees of freedom.
The F distribution is useful for the analysis of ratios of variance, such as a one-factor between-subjects analysis of variance.
See Also
- Dens_ChiSquared
- CumChiSquared
- Normal
- Gamma -- very closely related distribution.
- Rayleigh
- F-distribution
- Parametric continuous distributions
- Distribution Densities Library
Enable comment auto-refresher