- Story. Say you wait for two multistep processes to happen. The individual steps of each process happen at the same rate, but the first multistep process requires
steps and the second requires
steps. The fraction of the total waiting time take by the first process is Beta distributed.
- Example.
- Parameters. There are two parameters, both strictly positive:
and
, defined in the above story.
- Support. The Beta distribution has support on the interval [0, 1].
- Probability density function.

where

is the Beta function.
- Usage
Package |
Syntax |
NumPy |
np.random.beta(alpha, beta) |
SciPy |
scipy.stats.beta(alpha, beta) |
Stan |
weibull(alpha, sigma) |
- Related distributions.
- The Uniform distribution on the interval [0, 1] is a special case of the Beta distribution with
.
- Notes.
- The story of the Beta distribution is difficult to parse. Most importantly for our purposes, the Beta distribution allows us to put probabilities on unknown probabilities. It is only defined on
, and
here can be interpreted as a probability, say of a Bernoulli trial.
- The case where
is not technically a probability distribution because the PDF cannot be normalized. Nonetheless, it can be used as an improper prior, and this prior is known a Haldane prior, names after biologist J. B. S. Haldane. The case where
is sometimes called a Jeffreys prior.
params = [dict(name='α', start=0.01, end=10, value=1, step=0.01),
dict(name='β', start=0.01, end=10, value=1, step=0.01)]
app = distribution_plot_app(x_min=0,
x_max=1,
scipy_dist=st.beta,
params=params,
x_axis_label='θ',
title='Beta')
bokeh.io.show(app, notebook_url=notebook_url)