class

Statistics::Distributions::Normal

Inherits Statistics::Distributions::ContinuousDistribution / Statistics::Distributions::Distribution / Reference / Object

Represents a normal distribution.

See wikipedia for more details.

Constants

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 and std.

Source

Instance methods

pdf(x)

The Probability Density Function (PDF) of a continuous random variable.

Source
rand

Samples a random variable with the given distribution.

Source