# BETAINC

## Purpose:

Calculates the regularized incomplete beta function.

## Syntax:

BETAINC(x, a, b, "tail")

x

-

A series or real number where 0 <= x <= 1.

a

-

A series or real number > 0.

b

-

A series or real number > 0.

"tail"

-

Optional. A string, the upper or lower function flag.

 "lower": lower incomplete beta function (default) "upper": upper incomplete beta function

## Returns:

A scalar or series.

## Example:

betainc(.3, .4, .5)

returns 0.440684.

## Example:

betainc({0.0, 0.5, 1.0}, 0.1, 0.2)

returns the regularized incomplete beta function values {0.0, 0.67057, 1.0}.

## Example:

betai(0..0.01..1, 8, 10);

xlabel("x");ylabel("I_x(8,10)");label("Incomplete Beta Function")

returns a series consisting of the regularized incomplete beta function for 101 values of x between 0 and 1, with a = 8 and b = 10.

## Remarks:

The beta function is defined as:

The beta function is related to the gamma function by:

The incomplete beta function is a generalization of the beta function and defined as:

BETAINC computes the regularized incomplete beta function:

For positive integer values a and b:

and

"Tail" specifies the upper or lower incomplete beta function where "lower" computes the integral from 0 to x and "upper" computes the integral from x to 1.

1 - betainc(x, a, b) = betainc(x, a, b, "upper")

If the inputs x, a and b are series, they must all be of the same size.

The cumulative density function for the probability of success p for a random variable X from a binomial distribution of sample size n is:

BETAINC can be abbreviated as BETAI

See BETAINCINV to compute the inverse incomplete beta function.

BETAINCINV

EXPINT

GAMMA

GAMMAINCINV

GRANDBINOMIAL