View Source Chi2fit.Distribution.Utilities (Chi-SquaredFit v2.0.2)

Provides various distributions.

Link to this section Summary

Functions

Returns the model for a name.

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]}

Link to this section Types

@type model() :: any()

Link to this section Functions

Link to this function

guess(sample, n \\ 100, list \\ ["exponential", "poisson", "normal", "erlang", "wald", "sep", "weibull", "frechet", "nakagami", "tw1", "tw2"])

View Source
@spec 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
@spec 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,
"frechet" - 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),
"tw" / "tw1" - The Tracy-Widom distributions TW1,
"tw2" - The Tracy-Widom distributions TW2,
"tw4" - The Tracy-Widom distributions TW4,
"wishart" - The Wishart distribution.

options

Options

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

examples

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]}