# Minimum length of confidence interval

Let $X_1,...,X_n$ be iid Normally distributed, with mean $\mu$, and variance $\sigma^2$.

Using the pivot $\frac{(n-1)S^2}{\sigma^2}$, where $S^2$ is the unbiased sample variance, the exercise asks me to

Find expressions for $k_1,k_2$, if the confidence interval of the form $[k_1S^2,k_2S^2]$ has minimum length.

Well I formulated the problem as an optimization problem.

$\displaystyle \min_{ 0.95 = F\left(\frac{n-1}{k_1}\right)-F\left(\frac{n-1}{k_2}\right)}(k_2-k_1)$

where $F(x)$ is the distribution function for a $\chi^2(n-1)$.

Using Lagrange multiplier, I get two conditions:

$$\frac{k_1^2}{k_2^2}=\frac{f\left(\frac{n-1}{k_1}\right)}{f\left(\frac{n-1}{k_2}\right)}$$

and $$0.95 = F\left(\frac{n-1}{k_1}\right)-F\left(\frac{n-1}{k_2}\right)$$.

However, I cannot seem to do anything with them to solve in order to $k_1,k_2$...

So, where did I go wrong? How do we solve this exercise?

Any help will be appreciated.

Since the $\chi^2$ density is unimodal, you can use the fact that the maximum probability interval $[a,b]$ of length $L$ occurs where $f(a)=f(b)$ and $b-a=L$ where $f$ is the density. Thus, you want to find $a,b:f(a)=f(b),F(b)-F(a)=.95$