Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

betainc

Incomplete beta function

Syntax

I = betainc(X,Z,W)
I = betainc(X,Z,W,tail)

Description

I = betainc(X,Z,W) computes the incomplete beta function for corresponding elements of the arrays X, Z, and W. The elements of X must be in the closed interval [0,1]. The arrays Z and W must be nonnegative and real. All arrays must be the same size, or any of them can be scalar.

I = betainc(X,Z,W,tail) specifies the tail of the incomplete beta function. Choices are:

'lower' (the default)

Computes the integral from 0 to x

'upper'

Computes the integral from x to 1

These functions are related as follows:

1-betainc(X,Z,W) = betainc(X,Z,W,'upper')
Note that especially when the upper tail value is close to 0, it is more accurate to use the 'upper' option than to subtract the 'lower' value from 1.

Examples

collapse all

Compute the incomplete beta function corresponding to the elements of Z according to the parameters X and W.

format long

X = 0.5;
Z = (0:10)';
W = 3;

I = betainc(X,Z,W)
I =

   1.000000000000000
   0.875000000000000
   0.687500000000000
   0.500000000000000
   0.343750000000000
   0.226562500000000
   0.144531250000000
   0.089843750000000
   0.054687500000000
   0.032714843750000
   0.019287109375000

More About

collapse all

Incomplete Beta Function

The incomplete beta function is

Ix(z,w)=1B(z,w)0xtz1(1t)w1dt

where B(z,w), the beta function, is defined as

B(z,w)=01tz1(1t)w1dt=Γ(z)Γ(w)Γ(z+w)

and Γ(z) is the gamma function.

Tall Array Support

This function fully supports tall arrays. For more information, see Tall Arrays.

See Also

|

Introduced before R2006a

Was this topic helpful?