[R] Incomplete Beta

(Ted Harding) Ted.Harding at nessie.mcc.ac.uk
Tue Dec 13 19:40:21 CET 2005

On 13-Dec-05 Prof Brian Ripley wrote:
> On Tue, 13 Dec 2005 Ted.Harding at nessie.mcc.ac.uk wrote:
>> On 13-Dec-05 Thomas Lumley wrote:
>>> On Tue, 13 Dec 2005, Albert Sorribas wrote:
>>>> Is there any function available in R for computing the incomplete
>>>> Beta
>>>> function?
>>> pbeta().  The incomplete Beta function is the cdf of the Beta
>>> distribution
>> But don't forget to multiply by beta(,):
>>  ibeta(x,a,b) <- function(x,a,b){ pbeta(x,a,b)*beta(a,b) }
>> !
> Depends on which definition you use, as ?pbeta explains.  Thomas'
> advice was correct rather than yours for Abramowitz and Stegun's
< definition, for  example.

Hmmm ... In my edition (1964, Dover repr. 1966),
Section 6.6 "Incomplete Beta Function":

6.6.1 B_x(a,b) = the definition I was using

6.6.2 I_x(a,b) = B_x(a,b)/B(a,b)

the latter referring on to Chapter 26 "Probability Functions",
Section 26.5 "Incomplete Beta Function" which reproduces the
second (6.6.2) definition.

There has clearly long been ambiguity here. A&S use "Incomplete
Beta Function" in 26.5 where I (and others) would prefer "Beta
Distribution". They do the same sort of thing for the
Incomplete Gamma Function in 6.5, where their 6.5.1 is
the analogue for Gamma of 6.6.2 for Beta, and their 6.5.2
the analogue of 6.6.1. Their use of it in Chap 26 "Probability
Functions" is in relation to the "Chi-Square Probability Function"
(see esp. 26.4.19).

But the Father (or more accurately the Midwife) of the Incomplete
Beta Function was Karl Pearson, whose Introduction (1933) to
the Tables of the Incomplete Beta Function states:

  "The function I proposed to have tabled was to be a *probability
   integral*; that is to say, if we represent by B(p,q) the
   complete B-function, = Int[0,1] x^(p-1) (1-x)^(q-1) dx,
   and by B_x(p,q) the incomplete B-function, or Int[0,x]...dx,
   [= A&S 6.6.1] we tabled the ratio

      I_x(p,q) = B_x(p,q)/B(p,q) = ... "

   [= A&S 6.6.2]

and the Table of Contents lists "Table I: Incomplete Beta Function
Ratio" (though the title page of the Table section simply calls
it "Incomplete Beta Function"). However, on balance it seems that
Pearson meant to reserve "Incomplete Beta Function" for the simple
integral, not normalised to the "Ratio".

My reasons for preferring the terminology "Incomplete ... Function"
for the incomplete integral *not* divided by the normalising constant
(for both Beta and Gamma), and using "Distribution" for the incomplete
integral divided by the constant (i.e. Pearson's "Ratio"), are several,
but in summary:

1. The Beta and Gamma functions (not normalised) are fundamental
   mathematical functions in their own right; likewise their
   incomplete versions.

2. When needed in probability applications, then of course they
   need to be normalised; but then why not simply call them

3. (1) and (2) encapsulate in the terminology an essential distinction,
   and using (2) instead of (1) could lead to interesting inferences
   (e.g. that the complete Beta function is identially 1).

I.e. the Beta function should not change its definition as x passes
from 1 - epsilon to 1. And similarly for the Gamma.

Granted there is non-uniformity of usage; but this does lead to
confusion, which could be avoided by simply sticking to the
distinction between "Incomplete ... Function" and "... Distribution".

Best wishes,

E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 13-Dec-05                                       Time: 18:40:17
------------------------------ XFMail ------------------------------

More information about the R-help mailing list