Chi-SquaredFit v0.8.8 Chi2fit.Distribution View Source

Provides various distributions.

Link to this section Summary

Functions

The Bernoulli distribution

Distribution for flipping coins

Constant distribution

Distribution simulating a dice (1..6)

Distribution simulating the dice in the GetKanban V4 simulation game

The Erlang distribution

The Erlang cumulative distribution function

The exponential distribution

Fréhet or inverse Weibull distribution

The Fréchet distribution, also known inverse Weibull distribution

Returns the model for a name

Nakagami distribution

The Nakagami distribution

The normal or Gauss distribution

The normal or Gauss cumulative distribution

The Poisson distribution

The Skew Exponential Power cumulative distribution (Azzalini)

Uniform distribution

Uniform distribution

Wald or Inverse Gauss distribution

The Wald (Inverse Gauss) cumulative distribution function

The Weibull distribution

The Weibull cumulative distribution function

Link to this section Types

Link to this type cdf() View Source
cdf() :: number :: number()
Link to this type distribution() View Source
distribution() :: ... :: term()

Link to this section Functions

Link to this function bernoulli(value) View Source
bernoulli(value :: number()) :: distribution()

The Bernoulli distribution.

Distribution for flipping coins.

Constant distribution.

Distribution simulating a dice (1..6)

Link to this function dice_gk4(avg) View Source
dice_gk4([] | number()) :: distribution()

Distribution simulating the dice in the GetKanban V4 simulation game.

Link to this function erlang(k, lambda) View Source
erlang(k :: integer(), lambda :: number()) :: distribution()

The Erlang distribution.

Link to this function erlangCDF(k, lambda) View Source
erlangCDF(k :: number(), lambda :: number()) :: cdf()

The Erlang cumulative distribution function.

Link to this function exponential(rate) View Source
exponential(Keyword.t()) :: distribution()

The exponential distribution.

Link to this function frechet(scale, shape) View Source
frechet(scale :: number(), shape :: number()) :: distribution()

Fréhet or inverse Weibull distribution.

Link to this function frechetCDF(scale, shape) View Source
frechetCDF(scale :: float(), shape :: float()) :: cdf()

The Fréchet distribution, also known inverse Weibull distribution.

Link to this function guess(sample, n \\ 100, list \\ ["exponential", "poisson", "normal", "erlang", "wald", "sep", "weibull", "frechet", "nakagami"]) View Source
guess(sample :: [number()], n :: integer(), list :: [String.t()] | String.t()) ::
  [any()]

Guesses what distribution is likely to fit the sample data

Link to this function model(name, options \\ []) View Source
model(name :: String.t(), options :: Keyword.t()) :: [
  fun: cdf(),
  df: pos_integer()
]

Returns the model for a name.

Supported disributions:

"wald" - The Wald or Inverse Gauss distribution,
"weibull" - The Weibull distribution,
"exponential" - The exponential distribution,
"poisson" - The Poisson distribution,
"normal" - The normal or Gaussian distribution,
"fechet" - The Fréchet distribution,
"nakagami" - The Nakagami distribution,
"sep" - The Skewed Exponential Power distribution (Azzalini),
"erlang" - The Erlang distribution,
"sep0" - The Skewed Exponential Power distribution (Azzalini) with location parameter set to zero (0).

Options

Available only for the SEP distribution, see ‘sepCDF/5’.

Link to this function nakagami(scale, shape) View Source
nakagami(scale :: number(), shape :: number()) :: distribution()

Nakagami distribution.

Link to this function nakagamiCDF(scale, shape) View Source
nakagamiCDF(scale :: float(), shape :: float()) :: cdf()

The Nakagami distribution.

Link to this function normal(mean, sigma) View Source
normal(mean :: number(), sigma :: number()) :: distribution()

The normal or Gauss distribution

Link to this function normalCDF(mean, sigma) View Source
normalCDF(mean :: number(), sigma :: number()) :: cdf()

The normal or Gauss cumulative distribution

The Poisson distribution.

For the implementation, see https://en.wikipedia.org/wiki/Poisson_distribution, ‘Generating Poisson-distributed random variables’

Link to this function sepCDF(a, b, lambda, alpha, options \\ []) View Source
sepCDF(
  a :: float(),
  b :: float(),
  lambda :: float(),
  alpha :: float(),
  options :: Keyword.t()
) :: cdf()

The Skew Exponential Power cumulative distribution (Azzalini).

Options

:method - the integration method to use, :gauss and :romberg types are supported, see below :tolerance - re-iterate until the tolerance is reached (only for :romberg) :points - the number of points to use in :gauss method

Integration methods

:gauss - n-point Gauss rule, :gauss2 - n-point Guass rule with tanh transformation, :gauss3 - n-point Gauss rule with linear transformstion, :romberg - Romberg integration, :romberg2 - Romberg integration with tanh transformation, :romberg3 - Romberg integration with linear transformstion.

Uniform distribution.

Link to this function uniform(min, max) View Source
uniform(min :: integer(), max :: integer()) :: distribution()

Uniform distribution.

Link to this function wald(mu, lambda) View Source
wald(mu :: number(), lambda :: number()) :: distribution()

Wald or Inverse Gauss distribution.

Link to this function waldCDF(mu, lambda) View Source
waldCDF(number(), number()) :: cdf()

The Wald (Inverse Gauss) cumulative distribution function.

Link to this function weibull(alpha, beta) View Source
weibull(number(), number() | Keyword.t()) :: distribution()

The Weibull distribution.

Link to this function weibullCDF(k, lambda) View Source
weibullCDF(number(), number()) :: cdf()

The Weibull cumulative distribution function.