3

How could one approximate Inverse Incomplete gamma function Г(s,x) by some simple analytical function f(s,Г)? That means write something like x = f(s,Г) = 12*log(123.45*Г) + Г + 123.4^s .

(I need at least ideas or references.)

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
klm123
  • 12,105
  • 14
  • 57
  • 95
  • Did you read http://en.wikipedia.org/wiki/Incomplete_gamma_function#Asymptotic_behavior ? – quant_dev Jul 15 '11 at 13:19
  • I have to apologize. I wrote Incomplete gamma function but meant Inverse incomplete gamma function. I've fixed the question. – klm123 Jul 15 '11 at 13:30

3 Answers3

5

You can look at the code in Boost: http://www.boost.org/doc/libs/1_35_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma.html and see what they're using.

EDIT: They also have inverses: http://www.boost.org/doc/libs/1_35_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma_inv.html

quant_dev
  • 6,181
  • 1
  • 34
  • 57
1

I've found out that x = f(s,Г) with given s can be nicely approximated by x = p0*(1-Г)^p1*ln(Г*p2). At least it worked for me with s <= 15 in region 0.001 < Г < 0.999.

Here p0,p1,p2 - is constants, which are chosen by approximation of f(s,Г) after you have chosen s.

klm123
  • 12,105
  • 14
  • 57
  • 95
  • What are p0, p1 and p2 and why doesn't s appear in your expression? – Museful Jun 27 '14 at 20:53
  • because "with given s". p_i will depend on s. – klm123 Jun 27 '14 at 21:28
  • I see. Do I understand correctly that the procedure for finding p0, p1, p2 is numerical/iterative so then this cannot be used as a 2D analytic approximation? Or can they be found as functions of s? Do you mind if I ask how you found this approximation? (I'm trying to find a rough analytic 2D approximation of the incomplete gamma function.) – Museful Jun 27 '14 at 22:12
  • 1
    @tennenrishin, I can't judge about 2D approximation. [But if you need limited amount of s's (which is integer) than you can do it obviously]. I used ROOT software: http://en.wikipedia.org/wiki/ROOT – klm123 Jun 27 '14 at 22:20
0

There's a pretty good implementation in Cephes. There's also a D translation that I think fixes a few bugs in the Cephes version.

dsimcha
  • 67,514
  • 53
  • 213
  • 334
  • gammaIncompleteComplInv in "D translation" is implemented by numerical methods ("the routine performs up to 10 Newton iterations to find the root of incompleteGammaCompl(a,x) - p = 0." (c) ). I think this can't help me to find simple formula with 2-5 parameters. – klm123 Jul 15 '11 at 14:34