class Statistics::Distributions::Normal
- Statistics::Distributions::Normal
- Statistics::Distributions::ContinuousDistribution
- Statistics::Distributions::Distribution(Float64)
- Reference
- Object
Overview
Represents a normal distribution.
See wikipedia for more details.
Defined in:
lib/distributions.crConstant Summary
-
PDF_COEFFICIENT =
1 / (Math.sqrt(TWO_PI))
-
TWO_PI =
2 * Math::PI
Constructors
-
.new(mean : Float64 = 0, std : Float64 = 1)
Creates a normal distribution with the given
mean
andstd
.
Instance Method Summary
-
#pdf(x)
The Probability Density Function (PDF) of a continuous random variable.
-
#rand : Float64
Samples a random variable with the given distribution.
Instance methods inherited from class Statistics::Distributions::ContinuousDistribution
pdf(x)
pdf
Instance methods inherited from class Statistics::Distributions::Distribution(Float64)
rand : T
rand
Constructor Detail
Creates a normal distribution with the given mean
and std
.
Instance Method Detail
def pdf(x)
#
Description copied from class Statistics::Distributions::ContinuousDistribution
The Probability Density Function (PDF) of a continuous random variable.
def rand : Float64
#
Description copied from class Statistics::Distributions::Distribution(Float64)
Samples a random variable with the given distribution.