class Statistics::Distributions::Constant
- Statistics::Distributions::Constant
- Statistics::Distributions::DiscreteDistribution(Float64)
- Statistics::Distributions::Distribution(Float64)
- Reference
- Object
Overview
Represents a deterministic distribution taking a single value.
Defined in:
lib/distributions.crConstructors
-
.new(k rand : Float64)
Creates a degenerate distribution which only takes the value
k
.
Instance Method Summary
-
#pmf(x)
The Probability Mass Function (PMF) of a discrete random variable.
-
#rand : Float64
Samples a random variable with the given distribution.
Instance methods inherited from class Statistics::Distributions::DiscreteDistribution(Float64)
pmf(x)
pmf
Instance methods inherited from class Statistics::Distributions::Distribution(Float64)
rand : T
rand
Constructor Detail
Instance Method Detail
def pmf(x)
#
Description copied from class Statistics::Distributions::DiscreteDistribution(Float64)
The Probability Mass Function (PMF) of a discrete random variable.
def rand : Float64
#
Description copied from class Statistics::Distributions::Distribution(Float64)
Samples a random variable with the given distribution.