- Story. Any outcome in a given range has equal probability.
- Example. Anything in which all possibilities are equally likely. This is, perhaps surprisingly, rarely encountered.
- Parameters. The Uniform distribution is not defined on an infinite or semi-infinite domain, so lower and upper bounds,
and
, respectively, are necessary parameters.
- Support. The Uniform distribution is supported on the interval
.
- Probability density function.
- Usage
Package |
Syntax |
NumPy |
np.random.uniform(alpha, beta) |
SciPy |
scipy.stats.uniform(alpha, beta) |
Stan |
uniform(alpha, beta) |
- Related distributions.
- The Uniform distribution on the interval [0, 1] (i.e.,
and
) is a special case of the Beta distribution where the parameters for the Beta distribution are
(not to be confused with the
and
used to parametrize the Uniform distribution).
params = [dict(name='α', start=-2, end=3, value=0, step=0.01),
dict(name='β', start=-2, end=3, value=1, step=0.01)]
app = distribution_plot_app(x_min=-2,
x_max=3,
scipy_dist=st.uniform,
params=params,
title='Uniform')
bokeh.io.show(app, notebook_url=notebook_url)