# Kaniadakis Erlang distribution

The Kaniadakis Erlang distribution (or κ-Erlang Gamma distribution) is a family of continuous statistical distributions, which is a particular case of the κ-Gamma distribution, when $\alpha =1$ and $\nu =n=$ positive integer. The first member of this family is the κ-exponential distribution of Type I. The κ-Erlang is a κ-deformed version of the Erlang distribution. It is one example of a Kaniadakis distribution.

## Characterization
### Probability density function

The Kaniadakis κ-Erlang distribution has the following probability density function:
    $f_{_{\kappa }}(x)={\frac {1}{(n-1)!}}\prod _{m=0}^{n}\left[1+(2m-n)\kappa \right]x^{n-1}\exp _{\kappa }(-x)$
valid for $x\geq 0$ and $n={\textrm {positive}}\,\,{\textrm {integer}}$, where $0\leq |\kappa |<1$ is the entropic index associated with the Kaniadakis entropy.
The ordinary Erlang Distribution is recovered as $\kappa \rightarrow 0$.

### Cumulative distribution function

The cumulative distribution function of κ-Erlang distribution assumes the form:
    $F_{\kappa }(x)={\frac {1}{(n-1)!}}\prod _{m=0}^{n}\left[1+(2m-n)\kappa \right]\int _{0}^{x}z^{n-1}\exp _{\kappa }(-z)dz$
valid for $x\geq 0$, where $0\leq |\kappa |<1$. The cumulative Erlang distribution is recovered in the classical limit $\kappa \rightarrow 0$.

### Survival distribution and hazard functions

The survival function of the κ-Erlang distribution is given by:
   $S_{\kappa }(x)=1-{\frac {1}{(n-1)!}}\prod _{m=0}^{n}\left[1+(2m-n)\kappa \right]\int _{0}^{x}z^{n-1}\exp _{\kappa }(-z)dz$
The survival function of the κ-Erlang distribution enables the determination of hazard functions in closed form through the solution of the κ-rate equation:
   ${\frac {S_{\kappa }(x)}{dx}}=-h_{\kappa }S_{\kappa }(x)$
where $h_{\kappa }$ is the hazard function.

## Family distribution

A family of κ-distributions arises from the κ-Erlang distribution, each associated with a specific value of $n$, valid for $x\geq 0$ and $0\leq |\kappa |<1$. Such members are determined from the κ-Erlang cumulative distribution, which can be rewritten as:
    $F_{\kappa }(x)=1-\left[R_{\kappa }(x)+Q_{\kappa }(x){\sqrt {1+\kappa ^{2}x^{2}}}\right]\exp _{\kappa }(-x)$
where
    $Q_{\kappa }(x)=N_{\kappa }\sum _{m=0}^{n-3}\left(m+1\right)c_{m+1}x^{m}+{\frac {N_{\kappa }}{1-n^{2}\kappa ^{2}}}x^{n-1}$
    $R_{\kappa }(x)=N_{\kappa }\sum _{m=0}^{n}c_{m}x^{m}$
with
    $N_{\kappa }={\frac {1}{(n-1)!}}\prod _{m=0}^{n}\left[1+(2m-n)\kappa \right]$
    $c_{n}={\frac {n\kappa ^{2}}{1-n^{2}\kappa ^{2}}}$
    $c_{n-1}=0$
    $c_{n-2}={\frac {n-1}{(1-n^{2}\kappa ^{2})[1-(n-2)^{2}\kappa ^{2}]}}$
    $c_{m}={\frac {(m+1)(m+2)}{1-m^{2}\kappa ^{2}}}c_{m+2}\quad {\textrm {for}}\quad 0\leq m\leq n-3$

### First member

The first member ($n=1$) of the κ-Erlang family is the κ-Exponential distribution of type I, in which the probability density function and the cumulative distribution function are defined as:
    $f_{_{\kappa }}(x)=(1-\kappa ^{2})\exp _{\kappa }(-x)$
    $F_{\kappa }(x)=1-{\Big{\sqrt {1+\kappa ^{2}x^{2}}}+\kappa ^{2}x{\Big )}\exp _{k}({-x)}$

### Second member

The second member ($n=2$) of the κ-Erlang family has the probability density function and the cumulative distribution function defined as:
    $f_{_{\kappa }}(x)=(1-4\kappa ^{2})\,x\,\exp _{\kappa }(-x)$
    $F_{\kappa }(x)=1-\left(2\kappa ^{2}x^{2}+1+x{\sqrt {1+\kappa ^{2}x^{2}}}\right)\exp _{k}({-x)}$

### Third member

The second member ($n=3$) has the probability density function and the cumulative distribution function defined as:
    $f_{_{\kappa }}(x)={\frac {1}{2}}(1-\kappa ^{2})(1-9\kappa ^{2})\,x^{2}\,\exp _{\kappa }(-x)$
    $F_{\kappa }(x)=1-\left\{{\frac {3}{2}}\kappa ^{2}(1-\kappa ^{2})x^{3}+x+\left[1+{\frac {1}{2}}(1-\kappa ^{2})x^{2}\right]{\sqrt {1+\kappa ^{2}x^{2}}}\right\}\exp _{\kappa }(-x)$

## Related distributions

* The κ-Exponential distribution of type I is a particular case of the κ-Erlang distribution when $n=1$;
* A κ-Erlang distribution corresponds to am ordinary exponential distribution when $\kappa =0$ and $n=1$;