Consider an $M/M/1$ queue with the arrival rate $\lambda>0$ and the service rate $\mu>\lambda$ (so that it is stable), in the stationary regime. Let $A\_t$ be the number of arrivals in the time interval $[0,t]$ and $D\_t$ be the number of departures in that time interval; then both $A\_t$ and $D\_t$ have Poisson distribution with mean $\lambda t$ (the second one due to Burke's theorem), but they are of course not independent.


Question: what is $\mathop{\mathrm{Cov}}(A\_t,D\_t)$? (Probably, this is known, but I couldn't find the reference$\dots$)



The input and output processes in a single-server queue
Let $\eta\_t$ be the number of customers in the system at time $t$ and $\rho=\lambda/\mu<1$ be the load. It holds that $\eta\_0+A\_t-D\_t = \eta\_t$, so $A\_t-D\_t = \eta\_t-\eta\_0$. Write
$$
A\_t D\_t = \frac{1}{2}(A\_t^2 + D\_t^2 - (A\_t-D\_t)^2),
$$
from which we obtain (recall that both $A\_t$ and $D\_t$ are Poisson($\lambda t$))
$$
\mathop{\mathrm{Cov}}(A\_t,D\_t) = \lambda t - \frac{1}{2}\mathbb{E}(\eta\_t-\eta\_0)^2,
$$
thus expressing $\mathop{\mathrm{Cov}}(A\_t,D\_t)$ in terms of $\mathop{\mathrm{Cov}}(\eta\_0,\eta\_t)$.


Note that the second term in the above expression is bounded, and moreover converges to $\mathop{\mathrm{Var}} \eta\_0 = \frac{\rho}{(1-\rho)^2}$ as $t\to\infty$ due to asymptotic independence of $\eta\_0$ and $\eta\_t$.


For a fixed $t$, the explicit expression for $\mathop{\mathrm{Cov}}(\eta\_0,\eta\_t)$ can be found in e.g. Section 2 of the following paper:
Reynolds, J. F. (1975). The covariance structure of queues and related processes – a survey of recent work. Advances in Applied Probability, 7(02), 383–415, DOI:10.2307/1426082


