Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.


share|improve this question
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 '13 at 16:04
    
@user64079: references are always welcome. Thanks! –  Stijn Feb 26 '13 at 16:45
add comment

1 Answer

up vote 2 down vote accepted

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

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.