# Solving minimum length confidence interval problem

I'm trying to find the minimum length of a confidence interval for the variance from a sample iid with normal distribution.

I tried

Solve[
CDF[ChiSquareDistribution[n - 1], (n - 1)/k1] -
CDF[ChiSquareDistribution[n - 1], (n - 1)/k2] == 0.95 &&
(n - 1)/(2*k1) - (n - 1)/(2*k2) == (n/2 - 3)*Log[k1/k2], {k1, k2}]


When running the command I get:

Solve::inex: Solve was unable to solve the system with inexact coefficients or the system obtained by direct rationalization of inexact numbers present in the system. Since many of the methods used by Solve require exact input, providing Solve with an exact version of the system may help.

Is there a way to make this work?

Any help would be appreciated

I don't think you can get a solution by just throwing the problem at Solve. If you make a minor change in the argument you give to Solve (substituting 95/100 for 0get.95), you will get a message you may find more meaningful.

 Solve[
CDF[ChiSquareDistribution[n - 1], (n - 1)/k1] -
CDF[ChiSquareDistribution[n - 1], (n - 1)/k2] == 95/100 &&
(n - 1)/(2*k1) - (n - 1)/(2*k2) == (n/2 - 3)*Log[k1/k2], {k1, k2}]


Solve::nsmet: This system cannot be solved with the methods available to Solve. >>

• I've tried numerically solving the problem, and it doesn't seem to work either. So, Mathematica cannot solve equations with distribution functions? Aug 1 '14 at 11:20
• I'm sure there are many "equations with distribution functions" that nobody can solve, and I don't know what subset of the ones that can be solved Mathematica can do. I'm only saying that Solve can't solve this particular set of equations. The Documentation Center has a lot to say about equation solving. Make a search on "equation solving". Aug 1 '14 at 12:05
• Ok. Many thanks. ;) Aug 1 '14 at 12:09