# Continuous-Service M/M/1 Queuing Systems
## 4 The System and Queue Time Distributions
### The Queue Time Distribution  
We establish the queue time distribution in this subsection. We start off with finding the CDF of the queue time distribution. Let \(Y\) be a random variable representing the amount of time a _real_ customer spends in the queue (queue time). Employing similar logic in Section 4.1, we have similar situations as follows. For example, when \(N=0\), a new real customer who arrives into the queue will have to spend \(Y=S\) (service time for the imaginary customer currently under service) in the queue before the customer enters into service. When \(N=1\), an arriving real customer into the queue will have to stay in the queue for \(Y=S\) (service time for the real customer currently under service). If \(N=2\), then a real customer entering into the queue stays for \(Y=S+S\) (service time for the real customer currently under service plus service time for the real customer currently waiting in queue). Then, when \(N=3\), we have \(Y=S+S+S\); and so on. We now look into \(N=-1\), a new real customer arriving into the queue will need to stay for \(Y=S+S\) (service time for the imaginary customer currently under service plus service time for the real customer currently waiting in queue) before leaving the queue. Similarly, if \(N=-2\), we have \(Y=S+S+S\); and so forth. We again employ the Law of Total Probabilities for conditional probabilities. Likewise, applying the steady-state distribution of our systems, the results of the Erlang distribution, and the results in Appendix A, we work out the probability that a real customer spends less than a \(t\) amount of time in the queue as follows. \[P(Y\leq t)=P(Y=S\leq t|N=0)P(N=0)+P(Y=S\leq t|N=1)P(N=1)+\] \[P(Y=S+S\leq t|N=-1)P(N=-1)+P(Y=S+S\leq t|N=2)P(N=2)+\] \[P(Y=S+S+S\leq t|N=-2)P(N=-2)+P(Y=S+S+S\leq t|N=3)P(N=3)+\cdots\] \[=\Big{(}1-\frac{c^{-\mu}(\mu t)^{0}}{0!}\Big{)}(\pi_{0}+\pi_{1})+ \Big{(}1-\frac{c^{-\mu}(\mu t)^{0}}{0!}-\frac{c^{-\mu}(\mu t)^{1}}{1!}\Big{)}( \pi_{-1}+\pi_{2})+\] \[\Big{(}1-\frac{c^{-\mu}(\mu t)^{0}}{0!}-\frac{c^{-\mu}(\mu t)^{1 }}{1!}-\frac{c^{-\mu}(\mu t)^{2}}{2!}\Big{)}(\pi_{-2}+\pi_{3})+\cdots\] \[=(\pi_{0}+\pi_{1}+\pi_{-1}+\pi_{2}+\pi_{-2}+\pi_{3}+\cdots)-\frac {c^{-\mu}(\mu t)^{0}}{0!}(\pi_{0}+\pi_{1}+\pi_{-1}+\pi_{2}+\pi_{-2}+\pi_{3}+ \cdots)-\] \[\frac{c^{-\mu}(\mu t)^{1}}{1!}(\pi_{-1}+\pi_{2}+\pi_{-2}+\pi_{3} +\cdots)-\frac{c^{-\mu}(\mu t)^{2}}{2!}(\pi_{-2}+\pi_{3}+\cdots)-\cdots\] \[=1-\frac{c^{-\mu}(\mu t)^{0}}{0!}-\frac{c^{-\mu}(\mu t)^{1}}{1!}( \rho)-\frac{c^{-\mu}(\mu t)^{2}}{2!}\Big{(}\rho^{2}\Big{)}-\cdots\] \[=1-e^{-\mu t}\Big{[}1+\frac{(\mu t)^{2}}{1!}+\frac{(\mu t)^{2}}{ 2!}+\cdots\Big{]}\] \[=1-e^{-\mu t}\Big{[}e^{\rho t}\Big{]}\] \[P(Y=S+S\leq t|N=-1)P(N=-1)+P(Y=S+S\leq t|N=2)P(N=2)+\]0 Hence, the CDF of the queue time \(Y\) for our continuous-service M/M/1 queuing systems is \[P(Y=S+S\leq t|N=-1)P(N=-1)+P(Y=S+S\leq t|N=2)P(N=2)+\]1  
To obtain the PDF of the queue time \(Y\), we find the derivative of Equation (22), which yields the following PDF. \[P(Y=S+S\leq t|N=-1)P(N=-1)+P(Y=S+S\leq t|N=2)P(N=2)+\]2We may now find the expectation of \(Y\), the average time a real customer spends in the queue, denoted by \(W_{q}\). In fact, Equation (23) is an exponential distribution with parameter \((1-\rho)\mu\). Consequently,  
\[P(Y=S+S\leq t|N=-1)P(N=-1)+P(Y=S+S\leq t|N=2)P(N=2)+\]3  
Hence, the average time a real customer spends in queue, \(W_{q}\), is  
\[P(Y=S+S\leq t|N=-1)P(N=-1)+P(Y=S+S\leq t|N=2)P(N=2)+\]4  
For similar reason discussed in Section 4.1, we note that our result is greater than that of the standard M/M/1 system, which is \(W_{q}=\frac{\rho^{2}}{\lambda(1-\rho)}\)[25], and that our result is equal to the average system time for the standard M/M/1 system. As a matter of fact, Equation (24) may be easily verified by Little's Law, \(L_{q}=\lambda W_{q}\)[25]. We now calculate values for \(W\) and \(W_{q}\) using Equations (21) and (24), respectively, for \(\rho\) = 0.25, 0.50 and 0.75, and \(\mu\) = 10.