- Story. Distribution of
if
is exponentially distributed. For
, the longer we have waited, the more likely the event is to come, and vice versa for
.
- Example. This is a model for aging. The longer an organism lives, the more likely it is to die.
- Parameters. There are two parameters, both strictly positive: the shape parameter
, which dictates the shape of the curve, and the scale parameter
, which dictates the rate of arrivals of the event.
- Support. The Weibull distribution has support on the positive real numbers.
- Probability density function.
- Usage
Package |
Syntax |
NumPy |
np.random.weibull(alpha) * sigma |
SciPy |
`scipy.stats.weibull_min(alpha, loc=0, scale=sigma) |
Stan |
weibull(alpha, sigma) |
- Related distributions.
- The special case where
is the Exponential distribution with parameter
.
- Notes.
- SciPy has a location parameter, which should be set to zero, with
being the scale parameter.
- NumPy only provides a version of the Weibull distribution with
. Sampling out of the Weibull distribution may be accomplished by multiplying the resulting samples by
.
params = [dict(name='α', start=0.1, end=5, value=1, step=0.01),
dict(name='σ', start=0.1, end=3, value=1.5, step=0.01)]
app = distribution_plot_app(x_min=0,
x_max=8,
scipy_dist=st.weibull_min,
params=params,
transform=lambda a, s: (a, 0, s),
x_axis_label='y',
title='Weibull')
bokeh.io.show(app, notebook_url=notebook_url)