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.


Cumulative distribution function of the beta distribution

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.


stats::betaCDF(a, b)


stats::betaCDF(a, b) returns a procedure representing the cumulative distribution function


of the beta distribution with shape parameters a > 0, b > 0.

The procedure f := stats::betaCDF(a, b) can be called in the form f(x) with an arithmetical expression x. The return value of f(x) is either a floating-point number or a symbolic expression:

  • If x can be converted to a real floating-point number and a and b can be converted to positive floating-point numbers, then the return value f(x) is a floating-point number.

  • For numerical values x ≤ 0 and x ≥ 1, the floating-point numbers 0.0, respectively 1.0, are returned even if a and b are symbolic quantities.

  • The call f(- infinity ) returns 0.0; the call f( infinity ) return 1.0.

  • In all other cases, f(x) returns the symbolic call stats::betaCDF(a, b)(x).

Numerical values of a and b are only accepted if they are positive.

Environment Interactions

The function is sensitive to the environment variable DIGITS which determines the numerical working precision.


Example 1

We evaluate the cumulative distribution function with a = 5 and b = 7 at various points:

f := stats::betaCDF(5, 7):
f(-infinity), f(-PI), f(1/sqrt(10)), f(0.75), f(1), f(infinity)

Nonpositive numerical values of a or b lead to an error:

stats::betaCDF(-5, 7)(0.75)
Error: First shape parameter must be positive. [stats::betaCDF]
the first shape parameter must be positive [stats::betaCDF] 
delete f:

Example 2

For symbolic arguments, symbolic calls of stats::betaCDF are returned, unless x ≤ 0 or x ≥ 1 can be decided:

f := stats::betaCDF(a, b):
f(-2), f(0), f(1/3), f(0.4), f(1), f(PI), f(x)

When positive real numbers are assigned to a and b, the call f(x) returns a floating-point number if x is numerical:

a := 2: b := PI: 
f(-2), f(1/3), f(0.4),  f(PI)

delete f, a, b:


a, b

The shape parameters of the beta distribution: arithmetical expressions representing positive real values.

Return Values


Was this topic helpful?