Distribution of Queue Length at Next Arrival

201 Views Asked by At

I'm trying to figure out the following:

Suppose that an $M/M/1$ is at stationarity (arrival rate $\lambda$, service rate $\mu$).

Suppose that $B$ is the next person to arrive in the queue.

What is the distribution of the number of people in the queue when $B$ arrives?

2

There are 2 best solutions below

4
On

Assuming balance conditions exist ($\mu>\lambda$), just use them

Let $\pi_i$ be the probability of being in state $i$

We have the following system then:

$\pi_1 =\pi_0 (\lambda/\mu) , ..., \pi_i=\pi_0(\lambda/\mu)^i$

Sum of the probabilities of all of the states should be 1

$\sum_{i=0}^\infty \pi_i=\sum_{i=0}^\infty \pi_0(\lambda/\mu)^i = \pi_0 1/(1-(\lambda/\mu))=1$ Then $\pi_0=1-(\lambda/\mu)$

You are interested in expected number of jobs in the system (If you are not convinced please search Poisson Arrivals See Time Averages, PASTA)

Anyway $\sum_{i=0}^\infty i\pi_i=\sum_{i=0}^\infty i\pi_i=\sum_{i=0}^\infty i\pi_0(\lambda / \mu)^i=\pi_0(\lambda / \mu)\sum_{i=0}^\infty i(\lambda / \mu)^{i-1}$ and $\sum_{i=0}^\infty i(\lambda / \mu)^{i-1}$ is the derivative of $\sum_{i=0}^\infty (\lambda / \mu)^{i}$ wrt $(\lambda / \mu)$

From here you can conclude

$\sum_{i=0}^\infty i(\lambda / \mu)^{i-1}=1/(1-(\lambda / \mu))^2$

So expected number of jobs $E=\pi_0(\lambda / \mu)/(1-(\lambda / \mu))^2=(1-(\lambda / \mu))(\lambda / \mu)/(1-(\lambda / \mu))^2=(\lambda / \mu)/(1-(\lambda / \mu))=\lambda/(\mu-\lambda)$

0
On

I believe the distribution of the people in the queue when $B$ arrives will be $X_{t}-N_{t}$, where $X_{t} \sim \pi$ (the distribution at stationarity), $N_{t} \sim Pois(\mu A_{t})$ and $A_{t}\sim Exp(\lambda) $.

Intuitively, this can be thought of as the number of people in the queue at stationarity ($X_{t}$) minus the number of people who leave the queue before $B$ arrives ($N_{t})$ which will take a time $A_{t}$.