# Determining the balance equations for a Poisson Process

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.

-

1
I am studying Masters in Applied Statistics and doing the course Stochastic Models and Forecasting, similar topic to what your doing. I have some reference books below: Reference books such as Introduction to probability models by sheldon Ross and probability and Random Processes by Geoffry Grimmett and David Stirzaker, Third Edition, These books are good, but one by Ross is better to read and has explanations, easier to understand – user64079 Feb 26 at 16:04
@user64079: references are always welcome. Thanks! – Stijn Feb 26 at 16:45

## 1 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$.

-
That's nice to know. Thanks. Now I want to make sure I can make the equation rigorous. Could you perhaps comment on how I got the equation, especially on the right hand side? – Stijn Apr 27 '11 at 17:51
Your chain is a "birth and death" process with birth rates $\lambda_n=\lambda (1-q_n)$ and death rates $\mu_n=\mu$. Solving the detailed balance equations $\lambda(1-q_n)p_n = \mu p_{n+1}$ proves that the process is reversible, and that the $p_n$'s are the stationary probabilities. The intuition for the balance equations is that, in the long run, the rate of transitions from $n$ to $n+1$ must equal the rate of transitions from $n+1$ to $n$. – Byron Schmuland Apr 27 '11 at 18:20
I will definitely look into that. Thanks for the help. – Stijn Apr 27 '11 at 18:50

1
@Stijn This ought to be explained in your textbook, assuming you are using one. If anything is unclear, let me know. Feel free to email me directly if you like, go to my profile page for contact info. – Byron Schmuland Apr 27 '11 at 18:53
I'm taking a Queueing Theory course which uses a reader rather than a full fledged text book so it kind of squeezes in different concepts, which I may or may not have seen before, in not a whole lot of text. I'm planning to look up some birth & death-process basics but if I have questions in the future I'll happily take you up on that offer. Thanks a lot! – Stijn Apr 27 '11 at 21:37
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 27, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9537986516952515, "perplexity_flag": "head"}