class Statistics::Distributions::Uniform

Overview

Represents a continuous uniform distribution.

See [wikipedia](https://en.wikipedia.org/wiki/Uniform_distribution_(continuous).

Defined in:

lib/distributions.cr

Constructors

Instance Method Summary

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

def self.new(min : Float64, max : Float64) #

Creates a uniform distribution within the interval [min, max].


[View source]

Instance Method Detail

def pdf(x) #

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


[View source]
def rand : Float64 #
Description copied from class Statistics::Distributions::Distribution(Float64)

Samples a random variable with the given distribution.


[View source]