Solving a two equation system yields strange results



On 5/9/12 3:59 PM, Jason Filippou wrote:
> Thanks for the help. Indeed, even after changing eq1 into eq1 : b (k -
> 1) = a i ended up with a summation of parameterized terms in terms of
> a, and proceeded to do a number of substitutions of a which all appear
> to be minimized at 0.2.
> 
> This concludes my Maxima - related questions for now, yet I am at a
> loss as to what these results mean regarding the statistical nature of
> my problem, as I mentioned it a couple of e-mails ago. I find it hard
> to believe that one cannot choose the mean of a distribution such that
> approximately 98% of its mass is bounded within [0,1]. Perhaps the
> fact that the minimization does not fall below the 0.2 indiates that
> I'm approaching my problem in the wrong way.

Let's see if I understand your question.

You have a gamma distribution with parameter k and theta.  You want to
find k and theta such that the cdf is 98% for x = 1.  That means the
tail of the cdf is 2% so with maxima's gamma_incomplete function we have

gamma_incomplete(k, 1/theta)/gamma(k) = .02

We also have theta*(k-1) = 0.1, or theta = 0.1/(k-1).  Hence,

gamma_incomplete(k, (k-1)/0.1) = 0.02.

A quick plot shows that the root is somewhere between 1 and 2 and

find_root(gamma_incomplete(k,(k-1)/0.1) - 0.02, k, 1, 2)
-> 1.473593324038853

Does that sound right?  I suspect there's no analytical solution so this
might be the best you can do.

Ray