jxxcarlson / elm-stat / StatRandom

The goal of this module is to provide commonly used probability distributions.

Discrete distributions

bernoulliBool : Basics.Float -> Random.Generator Basics.Bool

A discrete generator that follows the bernoulli distribution and returns true or false with the given probability.

bernoulliInt : Basics.Float -> Random.Generator Basics.Int

A discrete generator that follows the bernoulli distribution and returns 1 or 0 with the given probability.

binomial : Basics.Float -> Basics.Int -> Random.Generator Basics.Int

A discrete generator that follows the binomial distribution with the given probability for n number of trials.

poisson : Basics.Float -> Basics.Int -> Random.Generator Basics.Int

A discrete generator that follows the poisson distribution with the given lambda and for n number of trials.

geometric : Basics.Float -> Basics.Int -> Random.Generator Basics.Int

A discrete generator that follows the geomtric distribution with the given probability for n number of trials.

Continous distributions

normal : Basics.Float -> Basics.Float -> Random.Generator Basics.Float

Create a generator of floats that is normally distributed with given mean and standard deviation.

standardNormal : Random.Generator Basics.Float

A generator that follows a standard normal distribution.

exponential : Basics.Float -> Random.Generator Basics.Float

A generator that follows the exponential distribution with the given lambda.

beta : Basics.Float -> Basics.Float -> Random.Generator Basics.Float

A generator that follows the beta distribution with the given alpha and beta parameters.

Data Structures

generateList : Basics.Int -> Random.Generator a -> Random.Generator (List a)

Generates a list with the given size. (same as Random.list)

generateMatrix : Basics.Int -> Basics.Int -> Random.Generator a -> Random.Generator (List (List a))

Generates a matrix with the given form.