Evaluates the PDF of the generalized Beta distribution.

You're viewing an older version of this page (#177). View the current version.

View versions (2)

Interface

#include <codecogs/statistics/distributions/continuous/beta/pdf.h>

using namespace Statistics::Distributions::Continuous::Beta;

The density of the Beta distribution is defined by

P(x) = \frac{(1-x)^{\beta-1} x^{\alpha-1}}{B(\alpha, \beta)}
(1)

or

P(x) = \frac{\Gamma(\alpha + \beta)}{\Gamma(\alpha) \Gamma(\beta)} (1-x)^{\beta-1} x^{\alpha-1}
(2)

When \alpha and \beta are equal the function is symmetric about x=0.5, with it becoming increasingly skewed with larger and larger differences. \alpha = \beta =1 is a uniform distribution, while \alpha = 1, \beta =2 produces a straight line of gradient -2, and \alpha = 2, \beta =1 produces a straight line with a gradient of 2.

As a general rule values of \alpha >1, \beta >1 produces a closed distributions, i.e \graph x=0:0.99 a=3 b=3:9:4 .size=medium

While values of \alpha <1, \beta <1 produce cupped shaped distributions which tend to infinity at either extreme, i.e. \graph x=0.1:0.9 a=0.2:0.8:7 b=0.5 .size=medium

References

Cephes Math Library Release 2.8: June, 2000

Parameters

x
quantile in the range 0<=x<=1.
a
1st degrees of freedom. a>=0.
b
2nd degrees of freedom. b>=0..
GPL Licence — free for non commercial use. See Licence details.

Interactive Calculator

x
a
b
Result