Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

f(x,a,b) at x = 0
0
probability density f(x,a,b)
Probability density f(x,a,b) 0
Lower cumulative probability P(x,a,b) 0
Upper cumulative probability Q(x,a,b) 1
x f(x,a,b)
0 0
0.01 0.117612
0.02 0.230496
0.03 0.338724
0.04 0.442368
0.05 0.5415
0.06 0.636192
0.07 0.726516
0.08 0.812544
0.09 0.894348
0.1 0.972
0.11 1.045572
0.12 1.115136
0.13 1.180764
0.14 1.242528
0.15 1.3005
0.16 1.354752
0.17 1.405356
0.18 1.452384
0.19 1.495908
0.2 1.536
0.21 1.572732
0.22 1.606176
0.23 1.636404
0.24 1.663488
0.25 1.6875
0.26 1.708512
0.27 1.726596
0.28 1.741824
0.29 1.754268
0.3 1.764
0.31 1.771092
0.32 1.775616
0.33 1.777644
0.34 1.777248
0.35 1.7745
0.36 1.769472
0.37 1.762236
0.38 1.752864
0.39 1.741428
0.4 1.728
0.41 1.712652
0.42 1.695456
0.43 1.676484
0.44 1.655808
0.45 1.6335
0.46 1.609632
0.47 1.584276
0.48 1.557504
0.49 1.529388
0.5 1.5
0.51 1.469412
0.52 1.437696
0.53 1.404924
0.54 1.371168
0.55 1.3365
0.56 1.300992
0.57 1.264716
0.58 1.227744
0.59 1.190148
0.6 1.152
0.61 1.113372
0.62 1.074336
0.63 1.034964
0.64 0.995328
0.65 0.9555
0.66 0.915552
0.67 0.875556
0.68 0.835584
0.69 0.795708
0.7 0.756
0.71 0.716532
0.72 0.677376
0.73 0.638604
0.74 0.600288
0.75 0.5625
0.76 0.525312
0.77 0.488796
0.78 0.453024
0.79 0.418068
0.8 0.384
0.81 0.350892
0.82 0.318816
0.83 0.287844
0.84 0.258048
0.85 0.2295
0.86 0.202272
0.87 0.176436
0.88 0.152064
0.89 0.129228
0.9 0.108
0.91 0.088452
0.92 0.070656
0.93 0.054684
0.94 0.040608
0.95 0.0285
0.96 0.018432
0.97 0.010476
0.98 0.004704
0.99 0.001188
1 0

What is the Beta Distribution Calculator?

The Beta distribution is a continuous probability distribution defined on the interval [0, 1], governed by two positive shape parameters, a and b. It is widely used in Bayesian statistics (as a conjugate prior for probabilities), reliability analysis, project scheduling (PERT), and modelling proportions. This calculator evaluates the probability density function \(f(x)\), the lower cumulative probability \(P(x)\) (the cumulative distribution function), and the upper cumulative probability \(Q(x)\) (the survival function) across a grid of x values, and draws a line plot of the chosen function.

How to use it

Choose which function to compute, enter the shape parameters a and b (both must be greater than 0), then set the starting x, the step size, and the number of rows. The tool evaluates the selected function at \(x = \text{initialX}\), \(\text{initialX} + \text{step}\), \(\text{initialX} + 2\cdot\text{step}\), and so on. With the defaults (start 0, step 0.01, 101 rows) you get a full sweep from \(x = 0.00\) to \(x = 1.00\). The result shows the value at the first x, a complete table, and a graph.

The formula explained

The density is $$f(x,a,b) = \frac{x^{\,a-1}\,(1-x)^{\,b-1}}{B(a,b)},$$ where the beta function $$B(a,b)=\frac{\Gamma(a)\,\Gamma(b)}{\Gamma(a+b)}$$ normalises the area to 1. For numerical stability we work with the log-gamma function (Lanczos approximation) so \(B(a,b)\) is computed as \(\exp\!\big(\ln\Gamma(a) + \ln\Gamma(b) - \ln\Gamma(a+b)\big)\). The lower cumulative probability equals the regularized incomplete beta function \(I_x(a,b)\), computed with the Numerical Recipes continued-fraction method (betacf/betai). The upper cumulative probability is simply \(Q = 1 - P\).

Advertisement
Beta distribution density curve with shaded area showing lower cumulative probability
The lower cumulative probability \(P(x)\) is the shaded area under the PDF up to x.
Beta distribution probability density curves for several shape parameter pairs on the interval 0 to 1
Beta PDF shapes change dramatically with parameters a and b.

Worked example

Take \(a = 2\), \(b = 3\), \(x = 0.3\). Here $$B(2,3) = \frac{1\cdot 2}{24} = 0.0833333,$$ so $$f(0.3) = 12 \cdot 0.3 \cdot 0.7^2 = 12 \cdot 0.147 = 1.764.$$ The lower cumulative probability \(P(0.3) = I_{0.3}(2,3) = 0.3483\), and the upper cumulative probability \(Q(0.3) = 1 - 0.3483 = 0.6517\).

Key Formulas & Moments

The Beta distribution is a continuous probability distribution defined on the support interval \([0,1]\), governed by two positive shape parameters \(a>0\) and \(b>0\). Its probability density function is

$$f(x)=\frac{x^{a-1}\,(1-x)^{b-1}}{B(a,b)},\qquad 0\le x\le 1.$$

The normalizing constant \(B(a,b)\) is the beta function, which is expressed through gamma functions as

$$B(a,b)=\int_0^1 t^{a-1}(1-t)^{b-1}\,dt=\frac{\Gamma(a)\,\Gamma(b)}{\Gamma(a+b)}.$$

The principal moments and shape descriptors are summarized below.

Quantity Formula Conditions
Mean \(\mu=\dfrac{a}{a+b}\) all \(a,b>0\)
Variance \(\sigma^2=\dfrac{ab}{(a+b)^2\,(a+b+1)}\) all \(a,b>0\)
Mode \(\dfrac{a-1}{a+b-2}\) \(a>1,\ b>1\)
Skewness \(\gamma_1=\dfrac{2\,(b-a)\,\sqrt{a+b+1}}{(a+b+2)\,\sqrt{ab}}\) all \(a,b>0\)

For example, with \(a=2\) and \(b=5\) the mean is \(\mu=\dfrac{2}{2+5}=\dfrac{2}{7}\approx 0.2857\) and the variance is \(\sigma^2=\dfrac{2\cdot 5}{(7)^2(8)}=\dfrac{10}{392}\approx 0.0255\). Since both parameters exceed 1, the mode is \(\dfrac{2-1}{2+5-2}=\dfrac{1}{5}=0.2\). When \(a=b\) the distribution is symmetric about \(x=0.5\) and the skewness is zero; when \(b>a\) it is right-skewed and when \(a>b\) it is left-skewed. The special case \(a=b=1\) reduces to the standard uniform distribution on \([0,1]\).

Advertisement

Definitions & Glossary

Shape parameter a
The first positive shape parameter (\(a>0\)). It controls the behaviour of the density near \(x=0\): values \(a<1\) push mass toward 0 (density diverges), \(a=1\) gives a finite endpoint, and \(a>1\) makes the density vanish at 0. Larger \(a\) relative to \(b\) shifts the mean toward 1.
Shape parameter b
The second positive shape parameter (\(b>0\)). It governs the density near \(x=1\) in the mirror-image way that \(a\) governs the behaviour near 0. Larger \(b\) relative to \(a\) shifts the mean toward 0.
Probability density function f(x)
The relative likelihood of the random variable taking the value \(x\), given by \(f(x)=\dfrac{x^{a-1}(1-x)^{b-1}}{B(a,b)}\) for \(0\le x\le 1\) and 0 elsewhere. The area under \(f(x)\) over \([0,1]\) equals 1.
Lower cumulative probability P(x) / CDF
The cumulative distribution function, \(P(x)=\Pr(X\le x)=\displaystyle\int_0^x f(t)\,dt\). It equals the regularized incomplete beta function \(I_x(a,b)\) and increases monotonically from 0 at \(x=0\) to 1 at \(x=1\).
Upper cumulative probability Q(x) / survival function
The complementary (tail) probability, \(Q(x)=\Pr(X> x)=1-P(x)\). It decreases from 1 at \(x=0\) to 0 at \(x=1\).
Beta function B(a,b)
The normalizing constant of the distribution, \(B(a,b)=\int_0^1 t^{a-1}(1-t)^{b-1}\,dt=\dfrac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}\). It is symmetric: \(B(a,b)=B(b,a)\).
Gamma function \(\Gamma(z)\)
The continuous extension of the factorial, defined by \(\Gamma(z)=\int_0^\infty t^{z-1}e^{-t}\,dt\), with \(\Gamma(n)=(n-1)!\) for positive integers \(n\) and the recurrence \(\Gamma(z+1)=z\,\Gamma(z)\).
Regularized incomplete beta function \(I_x(a,b)\)
The ratio \(I_x(a,b)=\dfrac{1}{B(a,b)}\displaystyle\int_0^x t^{a-1}(1-t)^{b-1}\,dt\), which ranges from 0 to 1 and is exactly the CDF of the Beta distribution, so \(P(x)=I_x(a,b)\).

FAQ

What range can x take? The Beta distribution lives on [0, 1]; outside that interval the density is 0.

What do a and b control? They shape the curve: \(a = b = 1\) gives the uniform distribution, large values concentrate mass near the mean \(\frac{a}{a+b}\), and values below 1 push mass toward the edges.

Why might the density be very large near the edges? When \(a < 1\) the density diverges as x approaches 0, and when \(b < 1\) it diverges as x approaches 1; these endpoints are handled with limit rules.

Last updated: