[Math] Determining the balance equations for a Poisson Process

stochastic-processes

I'm trying to do an exercise (not homework) and I fail to understand the solution the reader is giving me.

Consider a gas station with one gas pump. Cars arrive at the gas station according to a Poisson process with an arrival rate of 20 cars per hour. An arriving car finding $n$ cars at the station immediately leaves with probability $q_n = \frac{n}{4}$ and joins the queue with probability $1-q_n$, where $n=0,1,2,3,4$. Cars are served in order of arrival. The service time (ie. the time for pumping and paying) is exponential and the mean service time is 3 minutes.

Determine the stationary distribution of the number of cars at the gas station.

Converting everything to minutes we have arrival rate $\lambda = \frac{1}{3}$ and service rate $\mu = \frac{1}{3}$.

Now, the reader I use gives as solution:

Solve the global balance equation $ \lambda q_n p_n = \mu p_{n+1}, n=0,1,2,3$.

Here, $p_n = P(L = n)$ is the probability that there are $n$ people in the system (either in the queue or in service).

I fail to see how these balance equations are obtained. If I were to make a guess then I'd say "there are $\lambda$ amount of cars coming to the gas station per minute, of which $1-q_n\lambda$ goes to the gas station queue, which happens with probability $p_n$. The amount of cars leaving is $\mu p_{n+1}$ because a car was added to the queue so there were $p_{n+1}$ cars, so $\lambda(1-q_n)p_n = \mu p_{n+1}$" I'm sure this doesn't make any sense but I'm having a hard time getting a feel for this equation. Any help is appreciated.


Best Answer

Their equations $\lambda q_n p_n = \mu p_{n+1}$ are clearly wrong, and your equations $\lambda(1-q_n)p_n = \mu p_{n+1}$ are correct. They accidentally switched $q_n$ and $1-q_n$.

Related Question