DistWeibull

class pydsol.core.distributions.DistWeibull(stream: StreamInterface, alpha: float, beta: float)[source]

Bases: DistContinuous

The Weibull distribution with a shape parameter alpha and a scale parameter beta. For more information on this distribution see https://mathworld.wolfram.com/WeibullDistribution.html.

__init__(stream: StreamInterface, alpha: float, beta: float)[source]

Construct a new Weibull distribution. The Weibull distribution USES a shape parameter alpha and a scale parameter beta.

Parameters:
  • stream (StreamInterface) – the random stream to use for this distribution

  • alpha (float) – the shape parameter of the Weibull distribution

  • beta (float) – the scale parameter of the Weibull distribution

Raises:
  • TypeError – when stream is not implementing StreamInterface:

  • TypeError – when alpha is not a float or int:

  • TypeError – when beta is not a float or int:

  • ValueError – when alpha <= 0 or beta <= 0:

draw() float[source]

Draw a value from the Weibull distribution.

probability_density(x: float) float[source]

Returns the probability density value for value x.

property alpha: float

Return the parameter value alpha

property beta: int

Return the parameter value beta

property stream: StreamInterface

Return the current random stream for this distribution.