# Confidence Intervals

1. Nov 14, 2012

### Artusartos

Let X1, X2, ... , Xn be a random sample from $$N(\mu, \sigma^2)$$, where both parameters $$\mu$$ and $$\sigma^2$$ are unknown. A confidence interval for $$\sigma^2$$ can be found as follows. We know that $$(n-1)S^2/\sigma^2$$ is a random varible with $$X^2(n-1)$$ distribution. Thus we can find constants a and b so that $$P((n-1)S^2/\sigma^2 < b) = 0.975$$ and $$P(a< (n-1)S^2/\sigma^2 < b)=0.95$$.

a) Show that this second probability statement can be written as

$$P((n-1)S^2/b < \sigma^2 < (n-1)S^2/a) = 0.95$$.

I could do this by flipping all of them, changing the signs...and then mulitplying all of them by (n-1)S^2.

b) If n=9 adn s^2 = 7.93, find a 95% confidence interval for $$\sigma^2$$.

Here, I just substitute n=9 and s^2=7.93 to the formula, right?

c) If $$\mu$$ is known, how would you modify the preceding procedure for finding a confidence interval for $$\sigma^2$$.

I am confused with this one...so can anybody give me a hint or something?

2. Nov 14, 2012

### haruspex

The n-1 in the equations comes from the fact that μ is unknown, and so is estimated from the same data used to estimate σ. If μ is known it becomes n instead. Whether that also changes it from chi-square I'm not certain, but I wouldn't think so.

3. Nov 14, 2012

### Artusartos

Thanks...

Can you explain why the n-1 comes from the fact that mu is unkown...and why it would be different if we knew what mu was?

4. Nov 14, 2012

### haruspex

If you take a sample from a population, its mean is not likely to be exactly the same as the mean of the population. If you estimate the variance by taking the differences between the sample values and the mean of the sample then you are likely to be underestimating the variance of the population. It turns out that it tends to underestimate σ2 in the ratio (n-1)/n. That's why you divide by n-1 instead of n when calculating $\hat{σ}^2$ as an estimate of the variance of the population.
Similarly, when you look at the distribution of the estimator $\hat{σ}^2$, it is chi-square with n-1 degrees of freedom. This is because one degree of freedom of the data has been lost by subtracting off the mean of the data. If you know the mean you don't lose that degree of freedom.

5. Nov 14, 2012

### Artusartos

Thank you so much...but how would I know that "it tends to underestimate σ2 in the ratio (n-1)/n"?

6. Nov 14, 2012

### haruspex

This can be figured out from first principles. If you assume a population has variance σ2, and propose taking a sample size N and calculating $s = \frac{1}{N}\sum{X_i^2}-\left(\frac{1}{N}\sum{X_i}\right)^2$, then you can calculate that E = (1-1/N)σ2.