Ticket #823 (closed defect: fixed)

Opened 21 months ago

Last modified 16 months ago

betainc function in scipy.special

Reported by: EndaKelly Owned by: somebody
Priority: normal Milestone: 0.7.1
Component: scipy.special Version:
Keywords: betainc Cc:

Description (last modified by cdavid) (diff)

The betainc function in scipy is not the incomplete beta function, but the regularised incomplete beta function, and is identical to the cdf of the beta distribution, which is already implemented in scipy by btdtr. To get the incomplete beta function from betainc you need to multiply it by the beta function itself. The "help" documentation is correct for the regularised incomplete beta function.

Fixed in r5745, backported in r5746.

Change History

Changed 16 months ago by cdavid

  • milestone set to 0.7.1

Changed 16 months ago by cdavid

  • status changed from new to closed
  • resolution set to fixed
  • description modified (diff)

It looks like depending on the reference, the incomplete beta includes the 'regularization' term or not. For example, matlab betainc also returns the regularized incomplete beta (using your definition).

I will add a reference in the docstring, though, to make it clear there are several definitions out there.

Note: See TracTickets for help on using tickets.