Previous Up Next

20.4.12  Beta distribution

The probability density function for the beta distribution.

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

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

The betad command computes the density function for the beta distribution.

Example

betad(2,1,0.3)
     
0.6           
The cumulative distribution function for the beta distribution.

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 7.3.16).

Examples

betad_cdf(2,3,0.2)
     
0.1808           
betad_cdf(2,3,0.25,0.5)
     
0.42578125           
The inverse distribution function for the beta distribution.

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

Example

betad_icdf(2,3,0.2)
     
0.212317128278           

Previous Up Next