uniform

final class boring_math.probability_distributions.distributions.uniform.Uniform

Bases: ContDist

Class for visualizing Uniform distributions

The Uniform distribution is a continuous probability distribution with probability density function

f(x) = 1/(b-a) for a < x < b

f(x) = 0 otherwise

where

μ = mu = (a+b)/2 = mean value

σ = sigma = (b-a)/2√3 = standard deviation

__init__(a: float = 0.0, b: float = 1.0)

init

Initialize storage containers for data.

__repr__() → str

repr string

returns:

The string ‘Uniform(λ)’ where λ is the number of expected events in an interval.

__str__() → str

user string

returns:

The string ‘Uniform: mean mu, standard deviation σ, start a, end b’ where mu is the mean and σ is the std deviation.

pdf(x: float) → float

PDF

Uniform probability distribution function.

cdf(x: float) → float

CDF

Uniform cumulative distribution function.

__add__(other: Self) → Self

Add together two compatible Uniform distributions.