Previous Up Next

8.4.12 The beta distribution

The probability density function for the beta distribution: betad

The beta distribution depends on two parameters, a>0 and b>0; the value of the density function at x in [0,1] is

betad(a,b,x) = Γ(a+b)xa−1(1−x)b−1/(Γ(a)Γ(b)) (9)

(see Section ‍5.8.13).
The betad command computes the density function for the beta distribution.

Example

Input:

betad(2,1,0.3)

Output:

0.6

The cumulative distribution function for the beta distribution: betad_cdf

The betad_cdf command computes the cumulative distribution function for the beta distribution.

It turns out that

betad_cdf(a,b,x) = β(a,b,x)Γ(a+b)/(Γ(a)Γ(b))

where β(a,b,x) = ∫0x ta−1(1−t)b−1 dt (see Section ‍5.8.16).

Examples

The inverse distribution function for the beta distribution: betad_icdf

The betad_icdf command computes the inverse distribution for the beta distribution.

Example

Input:

betad_icdf(2,3,0.2)

Output:

0.212317128278

Previous Up Next