Occupancy at a Finite Time
In an M/M/\(\infty\) queue, every arriving customer begins service immediately, so the number in the system at time \(t\) depends on which earlier customers have completed service. At a finite time, the count has two distinct sources: customers who were present initially and are still in service, and arrivals since time zero who have not yet completed service. Separating these sources gives the transient occupancy distribution directly.
Work on a probability space \((\Omega,\mathcal{F},\mathbb{P})\). Let \((X_t)_{t\ge0}\) be the continuous-time occupancy process with state space \(S=\{0,1,2,\ldots\}\). Arrivals form a Poisson process of rate \(\lambda>0\). Each customer has an independent exponential service time with rate \(\mu>0\), independent also of the arrivals and of other customers' service times. Every customer receives service immediately. We use the natural filtration \((\mathcal{F}_t)_{t\ge0}\) generated by the arrivals and service completions up to time \(t\). For a fixed initial population \(m\in S\), \(\mathbb{P}_m\) denotes probability conditional on \(X_0=m\).
The binomial part counts survivors from the \(m\) initial customers. A customer already present at time zero has an exponential service time with rate \(\mu\), so its probability of remaining in service for at least \(t\) more time units is \(e^{-\mu t}=a\). The Poisson part counts later arrivals that have not completed service by the observation time. Its mean is not \(\lambda t\): an arrival earlier in the interval has had more time to finish service than one arriving near \(t\).
Proof. The initial customers have independent service times. Each survives to time \(t\) with probability \(a\), so their survivor count is binomial with parameters \(m\) and \(a\).
Now consider arrivals in \((0,t]\), and let \(Y_t\) be the number of those customers still in service at time \(t\). An arrival at time \(s\in(0,t]\) survives until \(t\) with probability \(e^{-\mu(t-s)}\). For \(t>0\), conditional on there being \(r\) arrivals in \((0,t]\), their arrival times have the distribution of \(r\) independent uniform points on \((0,t]\), when their order is ignored. For one such uniform arrival time \(U\), the probability generating function of its survival indicator is $$ g(U)=1+e^{-\mu(t-U)}(z-1). $$ Averaging over \(U\) gives \(\frac{1}{t}\int_0^t g(s)\,ds\). Conditional independence of service times therefore gives $$ \mathbb{E}_m[z^{Y_t}\mid N_t=r] =\left(\frac{1}{t}\int_0^t g(s)\,ds\right)^r, $$ where \(N_t\) is the number of arrivals by time \(t\). Since \(N_t\) is Poisson with mean \(\lambda t\), averaging over \(r\) yields $$ \mathbb{E}_m[z^{Y_t}] =e^{-\lambda t}\sum_{r=0}^{\infty} \frac{(\lambda t)^r}{r!} \left(\frac{1}{t}\int_0^t g(s)\,ds\right)^r =\exp\left(\lambda\int_0^t(g(s)-1)\,ds\right). $$ Substituting the expression for \(g\), the exponent becomes $$ \lambda(z-1)\int_0^t e^{-\mu(t-s)}\,ds =\frac{\lambda}{\mu}(1-e^{-\mu t})(z-1) =\theta(z-1). $$ This is the probability generating function of a Poisson random variable with mean \(\theta\). The service times and arrival process are independent of the initial customers' service times, so \(Y_t\) is independent of the initial survivor count. Multiplying the generating functions gives \((1-a+az)^m e^{\theta(z-1)}\). To obtain the probability of total occupancy \(k\), sum over the possible initial survivor counts \(j=0,\ldots,\min(m,k)\): the probability of \(j\) initial survivors is the binomial term, and the probability of \(k-j\) surviving arrivals is the Poisson term. At \(t=0\), no time has passed and the occupancy remains \(m\). \(\square\)
Moments and the Transition Law
The decomposition also gives the mean and variance without summing the probability mass function. The two counts are independent; a binomial random variable with parameters \(m,a\) has mean \(ma\) and variance \(ma(1-a)\), while a Poisson random variable with mean \(\theta\) has mean and variance \(\theta\). Consequently, for \(t\ge0\), $$ \mathbb{E}_m[X_t]=ma+\theta,\qquad \operatorname{Var}_m(X_t)=ma(1-a)+\theta. $$ In particular, starting empty sets \(m=0\), so the finite-time occupancy is Poisson with mean \(\frac{\lambda}{\mu}(1-e^{-\mu t})\), not generally \(\frac{\lambda}{\mu}\).
Proof. Given \(X_s=n\), the \(n\) customers in service have independent exponential remaining service times with rate \(\mu\). This follows from the memoryless property: for an exponential service time \(V\), \(\mathbb{P}(V>u+h\mid V>u)=e^{-\mu h}\). Thus the number of these customers still present after \(h\) time units is binomial with survival probability \(e^{-\mu h}\). Arrivals after time \(s\) are independent of the state at \(s\) and of those customers' service times. Applying the same arrival-survival calculation as in the theorem over an interval of length \(h\) gives a Poisson count with mean \(\lambda\int_0^h e^{-\mu(h-v)}\,dv=\frac{\lambda}{\mu}(1-e^{-\mu h})\). The two counts are independent by the model assumptions. If \(h=0\), the binomial count is \(n\) with probability \(1\), and the Poisson count is zero, so the statement also holds at the endpoint. \(\square\)
This transition law is consistent across successive intervals. To check this, write \(a_i=e^{-\mu h_i}\) and \(\theta_i=\frac{\lambda}{\mu}(1-a_i)\) for two interval lengths \(h_1,h_2\). The probability generating function after the first interval, starting from \(n\), is \((1-a_1+a_1z)^n e^{\theta_1(z-1)}\). To account for the second interval, substitute \(1-a_2+a_2z\) for \(z\) in this function and multiply by the second interval's arrival factor \(e^{\theta_2(z-1)}\). The initial-customer factor becomes \((1-a_1a_2+a_1a_2z)^n\), and the exponent's coefficient of \(z-1\) is $$ \theta_1a_2+\theta_2 =\frac{\lambda}{\mu}\big((1-a_1)a_2+(1-a_2)\big) =\frac{\lambda}{\mu}(1-a_1a_2). $$ Since \(a_1a_2=e^{-\mu(h_1+h_2)}\), this is precisely the generating function for one interval of length \(h_1+h_2\). The earlier arrivals' contribution is reduced by \(a_2\) because only the fraction surviving the second interval remains.
Worked Example: An Initially Empty Queue
Let \(\lambda=3\), \(\mu=2\), and \(t=\frac{\ln 2}{2}\), with \(X_0=0\). Find the finite-time occupancy distribution and its first two moments.
First compute the survival factor for an individual customer:
The mean number of surviving arrivals is therefore $$ \theta=\frac{3}{2}\left(1-\frac12\right)=\frac34. $$ There are no initial customers, so \(X_t\) is Poisson with mean \(\frac34\). In particular, $$ \mathbb{P}_0(X_t=0)=e^{-3/4},\qquad \mathbb{P}_0(X_t=1)=\frac34e^{-3/4},\qquad \mathbb{P}_0(X_t=2)=\frac{(3/4)^2}{2}e^{-3/4}=\frac{9}{32}e^{-3/4}. $$ Its mean and variance are both \(\frac34\). As a normalization check, the probability generating function is \(e^{(3/4)(z-1)}\), which equals \(1\) at \(z=1\); hence its probabilities sum to \(1\).
Worked Example: Two Customers Initially in Service
Let \(X_0=2\), \(\lambda=2\), \(\mu=1\), and \(t=\ln 2\). Compute the probabilities of occupancies \(0\), \(1\), and \(2\), and check the mean and variance.
Here \(a=e^{-\ln 2}=\frac12\), and $$ \theta=\frac{2}{1}\left(1-\frac12\right)=1. $$ The number of initial survivors has probabilities \(\mathbb{P}(0)=\frac14\), \(\mathbb{P}(1)=\frac12\), and \(\mathbb{P}(2)=\frac14\). The surviving-arrival count is Poisson with mean \(1\). For occupancy zero, both counts must be zero, giving \(\mathbb{P}_2(X_t=0)=\frac14e^{-1}\). For occupancy one, either there are no initial survivors and one surviving arrival, or one initial survivor and no surviving arrivals: $$ \mathbb{P}_2(X_t=1) =\frac14(e^{-1})+\frac12(e^{-1}) =\frac34e^{-1}. $$ For occupancy two, the possible initial-survivor counts are \(0,1,2\), so $$ \mathbb{P}_2(X_t=2) =\frac14\left(\frac{e^{-1}}{2}\right) +\frac12(e^{-1}) +\frac14(e^{-1}) =\frac78e^{-1}. $$ The mean is \(ma+\theta=2(\frac12)+1=2\), and the variance is \(ma(1-a)+\theta=2(\frac12)(\frac12)+1=\frac32\). These moment calculations check the two-component interpretation: the initial survivors contribute mean \(1\) and variance \(\frac12\), while new arrivals still in service contribute mean and variance \(1\).
Worked Example: One Initial Customer and Later Arrivals
Suppose \(X_0=1\), \(\lambda=2\), \(\mu=1\), and \(t=\ln 3\). Find the probabilities of occupancies \(0\) and \(1\), then calculate the mean and variance.
The initial customer survives with probability \(a=e^{-\ln 3}=\frac13\). The mean number of surviving arrivals is $$ \theta=\frac{2}{1}\left(1-\frac13\right)=\frac43. $$ For zero customers, the initial customer must depart and there must be no surviving arrivals: $$ \mathbb{P}_1(X_t=0)=\frac23e^{-4/3}. $$ For one customer, either the initial customer has departed and exactly one arrival survives, or the initial customer survives and no arrival survives: $$ \mathbb{P}_1(X_t=1) =\frac23\left(e^{-4/3}\frac43\right)+\frac13e^{-4/3} =\left(\frac89+\frac39\right)e^{-4/3} =\frac{11}{9}e^{-4/3}. $$ The mean is \(ma+\theta=\frac13+\frac43=\frac53\). The variance is $$ ma(1-a)+\theta =1\left(\frac13\right)\left(\frac23\right)+\frac43 =\frac29+\frac{12}{9} =\frac{14}{9}. $$ The two displayed probabilities are only the probabilities of occupancies \(0\) and \(1\); the remaining probability is assigned to occupancies \(2\) and above.
Stationary Occupancy Is Not the Finite-Time Law
The formula distinguishes a distribution at a specified time from a stationary distribution. For an initially empty queue, the finite-time law is Poisson with mean \(\frac{\lambda}{\mu}(1-e^{-\mu t})\). For \(t>0\), this mean is below \(\frac{\lambda}{\mu}\), because some arrivals have not yet occurred and some of those that have arrived have already completed service. As \(t\) increases, the initial survivors vanish and the surviving-arrival mean approaches \(\frac{\lambda}{\mu}\), matching the Poisson stationary occupancy discussed in the earlier material on M/M/\(\infty\) queues. For a fixed initial population \(m\), the same conclusion follows from \(a\to0\) and \(\theta\to\lambda/\mu\). The transient formula describes how the occupancy approaches that regime; it does not assume that the queue starts in stationarity.
Common mistake. Replacing the finite-time mean by \(\lambda/\mu\) at every \(t\) gives the stationary occupancy law, not the law from an empty initial state. For example, take \(\lambda=2\), \(\mu=1\), \(t=\ln 2\), and \(X_0=0\). Then \(a=e^{-\ln 2}=\frac12\), so the transient mean is \(\theta=2(1-\frac12)=1\), and the probability of an empty queue is \(e^{-1}\). Using the stationary mean \(2\) instead would give an empty-queue probability \(e^{-2}\), which is not the finite-time answer. The correction is to account for the observation time through the factor \(1-e^{-\mu t}\).
Check Your Understanding
For each question, distinguish initial survivors from surviving arrivals before combining the counts.
- Starting empty, write the occupancy distribution at time \(t\) in terms of \(\lambda,\mu,t\). What are its mean and variance?
- If \(m\) customers are initially present, what is the probability that exactly \(j\) of them remain after time \(t\)? State the allowed values of \(j\).
- For an initially empty queue with \(\lambda=1\), \(\mu=1\), and \(t=\ln 2\), compute the mean occupancy and the probability that the queue is empty.
- Explain why arrivals at different times in \((0,t]\) do not all have the same survival probability at time \(t\).
- Show how the transition law over intervals \(h_1\) and \(h_2\) gives the same generating function as one interval of length \(h_1+h_2\).