2
$\begingroup$

I need to calculate these ratios:

$$\frac{\mathrm{B}_{x,y}(\alpha + 1,\beta)}{\mathrm{B}_{x,y}(\alpha,\beta)} \tag{1}$$

where $\alpha,\beta > 0$ and $0\le x\le y \le 1$. Here $\mathrm{B}_{x,y}(\alpha,\beta)$ is the incomplete Beta function, defined as:

$$\mathrm{B}_{x,y}(\alpha,\beta) = \int_x^y t^{\alpha-1}(1-t)^{\beta-1}\mathrm{d}t$$

For large values of the parameters $\alpha,\beta$ , the numerator and the denominator can be very $\mathrm{B}_{x,y}(\alpha,\beta)$ can get very large or very small, resulting in over/underflow.

Is there a way that I can compute the ratio (1) avoiding these over/underflows?

$\endgroup$
  • $\begingroup$ What are the ranges of values for $\alpha$ and $\beta$? How close can $x$ and $y$ be to each other? $\endgroup$ – Kirill Aug 20 '14 at 18:29
  • $\begingroup$ @Kirill Say that $0 < \alpha,\beta < 10000$, and that $x,y$ can be arbitrarly close, or they can be appart (always inside the range $x,y\in[0,1]$. $\endgroup$ – becko Aug 20 '14 at 18:35
  • $\begingroup$ @Kirill Hopefully, there should be a scheme of calculation that works for all positive values of $\alpha,\beta$ and all $x,y$ in $0\le x \le y \le 1$ (as long as the ratio itself is representable in floating-point). $\endgroup$ – becko Aug 20 '14 at 18:50
  • $\begingroup$ Perhaps the simplest approach is to look at the source code of some open-source arbitrary-precision implementation of incomplete beta function (such as mpmath), and see what it does. Otherwise DLMF likely contains the necessary recurrence relations to implement this. $\endgroup$ – Kirill Aug 21 '14 at 3:27

Your Answer

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

Browse other questions tagged or ask your own question.