How to obtain k and λ of this Erlang distribution?

800 Views Asked by At

I have a dataset that represents the difference, in milliseconds, between an input event (a key pressed in a keyboard) and the next one.

I have grouped the data in sets of 25ms, e.g. (0, 25], (25, 50]. When plotted as an histogram this is the result:
enter image description here

  • It ranges from 0ms to 2150ms.
  • Some of the values of the long tail could be ignored.
  • The most frequent set is [75, 100).

Due to its shape, and the nature of the dataset, I am assuming this is an Erlang distribution (which may not be the case).

Questions:
- Is this an Erlang distribution?
- In layman's terms, how could I obtain the k and λ of this Erlang distribution?

1

There are 1 best solutions below

0
On

This is the first time I learn about this distribution but, if the probability density function is given by $$\frac{\lambda ^k x^{k-1} e^{-\lambda x}}{(k-1)!}$$ it goes through a maximum for $$x_*=\frac{k-1}{\lambda }$$ and, for this value, the value of the probability density function is given by $$\frac{(k-1)^{k-1}}{\lambda~ e^{k-1}~(k-1)! }$$ So, if we guess $x_*$, you have a guess of $\lambda$ as a function of $k$ and you have to solve for $k$ the equation which gives the maximum value.

I hope and wish this could help you for the generation of reasonable and consitent estimates of the parameters.