sample variance divided by variance is Chi Square

473 Views Asked by At

To estimate the sample variance, the following relation is often used:

$$\frac{(n-1)s^2}{\sigma^2} \sim \chi^2(n-1) $$

With $(n-1)$ being the degrees of freedom.

Could someone provide me a formal proof and some intuition for this relation?

1

There are 1 best solutions below

0
On

Simulation in R: Population mean estimated by sample mean.

set.seed(2021)
n = 5;  mu = 100;  sg = 15
q4 = replicate(n^5, 4*var(rnorm(n,mu,sg))/sg^2)
mean(q4)
[1] 4.000032  # aprx mean of CHISQ(4) = 4.

In the figure below the density function of $\mathsf{Chisq}(\nu=4)$ fits the simulated values, while the density function of $\mathsf{Chisq}(\nu=5)$ does not.

enter image description here

hdr = "Mean estimated: CHISQ(4)"
hist(q4, prob=T, br=20, ylim=c(0,.25), col="skyblue2", main=hdr)
 curve(dchisq(x,4), add=T, lwd=2)
 curve(dchisq(x,5), add=T, lwd=2, col="red", lty="dotted")

Population mean known:

set.seed(320)
n = 5;  mu = 100;  sg = 15
q5 = replicate(n^5, sum((rnorm(n,mu,sg)-mu)^2)/sg^2)
mean(q5)
[1] 5.109602  # aprx mean of CHISQ(5) = 5

enter image description here

hdr = "Mean known: CHISQ(5)"
hist(q5, prob=T, br=20, ylim=c(0,.20), col="skyblue2", main=hdr)
 curve(dchisq(x,5), add=T, lwd=2, col="red", lty="dotted")