2
$\begingroup$

I need to calculate $\text{B}_x(a,b)$ on the cheap, without too many coefficients and loops. For the complete $\text{B}(a,b)$, I can use $\Gamma(a)\Gamma(b)/\Gamma(a+b)$, and Stirling's approximation for $\Gamma(.)$. Is there a way to calculate the incomplete beta function using Stirling's approximation?

  • 2
    To give a *genuinely* useful answer, you need to specify the specific ranges of $a$, $b$, and $x$ you are interested in. Methods that, for instance, work nicely for "human-sized" $a$ and $b$ (e.g. Eric's suggestion) fail spectacularly when either of $a$ or $b$ is large. If $x$ is outside $[0,1]$, special methods are needed, too...2011-07-27
  • 1
    FWIW: due to the properties of ${}_2 F_1$, incomplete beta satisfies three term recurrence relations, which might be helpful if you'll be fixing some parameters. If for instance your goal is to numerically compute the CDF for the $\mathbf F$ or Student $t$ distributions, there are specially adapted methods for that as well.2011-07-27

2 Answers 2