0
$\begingroup$

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?

For more info about this statistics problem check this minimum length confidence interval problem

Any help would be appreciated

$\endgroup$
1
$\begingroup$

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. >>

$\endgroup$
  • $\begingroup$ I've tried numerically solving the problem, and it doesn't seem to work either. So, Mathematica cannot solve equations with distribution functions? $\endgroup$ – An old man in the sea. Aug 1 '14 at 11:20
  • $\begingroup$ 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". $\endgroup$ – m_goldberg Aug 1 '14 at 12:05
  • $\begingroup$ Ok. Many thanks. ;) $\endgroup$ – An old man in the sea. Aug 1 '14 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.