1
$\begingroup$

In the following lines of code, we are trying to compute the L-moment estimates of the parameters of the Kumaraswamy distribution. But as you notice, neither NSolve nor Reduce work. Interestingly, Mathematica has inbuilt method of moments which very similar to solving the following two equations

 Reduce[
   l1 - (β Gamma[1 + 1/α] Gamma[β])/Gamma[1 + 1/α + β] == 0 && 
   l2 - l1 + 2 (β Gamma[1 + 1/α] Gamma[2 β])/Gamma[1 + 1/α + 2 β] == 0, 
   {α, β}]
 Reduce[
   0.5296881355 - (β Gamma[1 + 1/α] Gamma[β])/Gamma[1 + 1/α + β] == 0 && 
   -0.4161213389 + (2 β Gamma[1 + 1/α] Gamma[2 β])/Gamma[1 + 1/α + 2 β] == 0, 
   {α, β}]
$\endgroup$
  • 1
    $\begingroup$ Why not use FindRoot? $\endgroup$ – Carl Woll May 8 '18 at 18:10
  • $\begingroup$ @CarlWoll : That is working too! $\endgroup$ – nutan May 8 '18 at 19:21
6
$\begingroup$

This

NMinimize[
  Norm[ 0.5296881355-(β Gamma[1+1/α] Gamma[β])/ Gamma[1+1/α+β]]+
  Norm[-0.4161213389 + (2 β Gamma[1 + 1/α] Gamma[2 β])/Gamma[1 + 1/α + 2 β]],
  {α, β}]

returns this

  {2.22045*^-16, {α->2.4188, β->2.75976}}

in an instant.

That technique can also often provide useful information when there likely is no solution by showing that it found a significantly non-zero minimum

|improve this answer|||||
$\endgroup$

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.