Evaluates the PDF of the Beta distribution.

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)

\graph x=0:1 a=1:3:3 b=1:3:3 .height=300

Parameters

x
the value at which to evaluate the function, must be in range 0..1
a
the 1st number of degrees of freedom, must be strictly positive
b
the 2nd number of degrees of freedom, must be strictly positive
GPL Licence — free for non commercial use. See Licence details.

Interactive Calculator

x
a
b
Result