Time between arrivals Distribution

3.8k Views Asked by At

I am simulating a hair parlor queue with m number of queues and 3 different types of services (queues). I was doing the time between arrival with a uniform distribution with a min value and a max value and a random, however a friend told me that i should use poisson distribution,(http://en.wikipedia.org/wiki/Poisson_distribution)

Then I read some theory in the Discrete Event Simulation book of JBanks and online almost every one use the poisson distribution I understand that you need x time in order to know the probability number of customers arriving in that time however is not suitable for me asking each time because is a does simulation the clock change.

What distribution should i use or what can i do for the time between arrivals?

Example tba: time between arrival , at: arrival time

  1. customer:1 tba:0.5 clock:0.0 at:0.5
  2. customer:2 tba:1.0 clock:0.5 at:1.5
  3. customer:3 tba:3.0 clock:0.5 at:4.5
1

There are 1 best solutions below

3
On

If you assume that customers arrive at a constant rate $\lambda$, then the Poisson distribution is distribution of the number of customers arrived at a time $t$: $$P_t(n)=\frac{(\lambda t)^n}{n!}\mathrm e^{-\lambda t}.$$

The distribution of time to wait before a customer arrives is exponentially distributed : $$p(t)=\lambda\mathrm e^{-\lambda t}.$$ Edit This is the answer to your question. The waiting time between two arrivals of customers is exponentially distributed.

Proof

At $t=0$, we have $P_0(0)=1$ and $P_n(0)=0$ for $n\geq1$.

Suppose that we have $n+1$ customer arrived at time $t+\mathrm dt$. What has happened since time $t$ ? We have two possibilities: either a new customer as arrived (so there were only $n$ customer at time $t$) or not. This is summed up into this equation $$P_{n+1}(t+\mathrm dt)=P_n(t)P_1(\mathrm dt)+P_{n+1}(t)P_0(\mathrm dt).$$ Let us expand to the first order in $\mathrm dt$ to get $$ P_{n+1}(t)+\partial_tP_{n+1}(t)\mathrm dt=P_n(t)P_1(\mathrm dt)+P_{n+1}(t)P_0(\mathrm dt).\tag{1}$$

According to the assumption that the rate of arrival $\lambda$ is constant the probability to have one customer arriving after a short time $\mathrm dt$ is $$P_1(\mathrm dt)=\lambda\mathrm dt.$$ We conclude that $P_0(\mathrm dt)=1-\lambda\mathrm dt$.

Plugging this into equation (1), we obtain immmediately for $n\geq0$ $$\partial_t P_{n+1}(t)=\lambda\left(P_n(t)-P_{n+1}(t)\right).\tag{2}$$ and for $P_0$ we have $$\partial_tP_0(t)=-\lambda P_0(t).$$ We obtain then that $P_0(t)=\mathrm e^{-\lambda t}$. The time distribution for the waiting time between two arrivals is the same as the time distribution of the first arrival, so this is given by $$p(t)=\partial_t(-P_0(t))=\lambda\mathrm e^{-\lambda t}$$ as announced. Solving the equations (2) by induction yields the distribution of the number of customer at time $t$. As we have seen the induction is proven for $n=0$. Let us assume $P_n(t)=\frac{(\lambda t)^n}{n!}\mathrm e^{-\lambda t}$. The using (2) we have $$\partial_tP_{n+1}(t)=\lambda\frac{(\lambda t)^n}{n!}\mathrm e^{-\lambda t}- \lambda P_{n+1}(t)$$ The solution of this first order ordinary differential equation is standard. We get $$P_{n+1}(t)=\mathrm e^{-\lambda t}\int_0^t\mathrm e^{\lambda u}\lambda\frac{(\lambda u)^n}{n!}\mathrm e^{-\lambda u}\mathrm du=\frac{(\lambda t)^{n+1}}{(n+1)!}\mathrm e^{-\lambda t}.$$ And we have proven the statement.