class Statistics::Distributions::Exponential

Overview

Represents the probability distribution of the time between events in a Poisson point process, i.e., a process in which events occur continuously and independently at a constant average rate.

See wikipedia for more details.

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(lambda : Float64) #

Creates an exponential distribution with a rate parameter lambda.


Instance Method Detail

def pdf(x) #

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.