Chi-squared distribution
Definition taught in Statistical inference, part of Statistical inference
Chi-squared distribution
| Type | Definition |
| Taught in | Statistical inference |
| Part | Statistical inference |
| Properties | 3 |
| Worked examples | 3 |
If Z_1,\ldots,Z_m are independent standard normal variables, then V=Z_1^2+\cdots+Z_m^2 has the chi-squared distribution with m degrees of freedom, written \chi^2_m. It is the gamma law with shape m/2 and rate 1/2, so \mathbb{E} V=m and \operatorname{Var} V=2m.
Properties
Normal sample theorem
Main article: Normal sample theorem
If X_1,\ldots,X_n are a random sample from \operatorname{N}(\mu,\sigma^2), then
- \overline X is \operatorname{N}(\mu,\sigma^2/n),
- (n-1)s^2/\sigma^2 is \chi^2_{n-1}, and
- \overline X and s^2 are independent.
Pearson chi-squared approximation
Main article: Pearson chi-squared approximation
If p_i=\pi_i for every i, the Pearson statistic T has approximately the \chi^2_{k-1} distribution for large n.
Pearson test with estimated parameters
Main article: Pearson test with estimated parameters
Let (X_1,\ldots,X_k) be multinomial with cell probabilities p_i(\theta), where \theta has r free coordinates. If \widehat\theta is the maximum likelihood estimator of \theta from the counts and \widehat p_i=p_i(\widehat\theta), then
\sum_{i=1}^k\frac{(X_i-n\widehat p_i)^2}{n\widehat p_i}
is approximately \chi^2_{k-1-r} for large n.
Examples
Aspirin tablet weights
Worked example from Confidence intervals
A label states that tablet weights have standard deviation 1.0 mg. A sample of 25 tablets has s=1.3 mg.
Question. Give 95% confidence intervals for \sigma^2 and for \sigma, assuming normal weights. Is the label believable?
Solution. With 24 degrees of freedom, \chi^2_{24;0.025}=12.40 and \chi^2_{24;0.975}=39.36. Since (n-1)s^2=24\times1.69=40.56,
\left(\frac{40.56}{39.36},\ \frac{40.56}{12.40}\right)=(1.03,\ 3.27)
for \sigma^2, and (1.02,\ 1.81) mg for \sigma. The interval for \sigma excludes the stated 1.0 mg, so the data cast doubt on the label at the 95% level.
Tuning-fork variability
Worked example from Hypothesis tests
Tuning-fork frequencies have been \operatorname{N}(\mu,1.1). A new process is meant to reduce the variance. A batch of 7 new forks has sample variance 0.488.
Question. Is there evidence that the new process has smaller variance?
Solution. Test H_0:\sigma^2=1.1 against H_1:\sigma^2<1.1 with 6s^2/1.1, which is \chi^2_6 under H_0. Its value is 6\times0.488/1.1=2.66, and the p-value is \mathbb{P}(\chi^2_6\le2.66)=0.15. At level 0.05 the critical region is (0,\ 1.635], and 2.66 is not in it. There is not enough evidence that the new process is less variable. With only 7 forks, the sample variance would have to be below 0.30 to reject.
The square of a standard normal
Worked example from Functions of random variables and limit theorems
Let X\sim\operatorname{N}(0,1) and Y=X^2.
Question. Find the density of Y.
Solution. The map x\mapsto x^2 is not monotone, so work with the distribution function. For y>0,
F_Y(y)=\mathbb{P}(-\sqrt y\le X\le\sqrt y)=\Phi(\sqrt y)-\Phi(-\sqrt y)=2\Phi(\sqrt y)-1.
Differentiating, with \Phi'=\varphi the standard normal density,
f_Y(y)=2\varphi(\sqrt y)\cdot\frac1{2\sqrt y}=\frac{1}{\sqrt{2\pi}}\,y^{-1/2}e^{-y/2},\qquad y>0.
That is the \operatorname{Gamma}(1/2,1/2) density, the chi-squared law with one degree of freedom, since \Gamma(1/2)=\sqrt\pi.
Used in
- Taught in Statistical inference, where the derivation and examples are.
- All 4 questions on Statistical inference
See also
Random sample · Statistic · Moments of the sample mean and variance · Student t distribution · F distribution · Normal sample theorem