Chi-SquaredFit v1.0.0-beta.9 Chi2fit.Distribution View Source

Provides various distributions.

Link to this section Summary

Link to this section Functions

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()) :: any()

Returns the model for a name.

The kurtosis is the so-called ‘excess kurtosis’.

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’.

Examples

iex> ~M(3 4 5)
%Distribution.Uniform{pars: [3, 4, 5]}

iex> ~M(3 4 5)u
%Distribution.Uniform{pars: [3, 4, 5]}

iex> ~M()d
%Distribution.Dice{mode: :regular}

iex> ~M()dgk
%Distribution.Dice{mode: :gk4}

iex> ~M(1.2)p
%Distribution.Poisson{pars: [1.2], period: 1.0}

iex> ~M(1.2 5.4)w
%Distribution.Weibull{pars: [1.2, 5.4]}

iex> ~M(1.2 5.4)wald
%Distribution.Wald{pars: [1.2, 5.4]}