The input and output processes in a single-server queue 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$)
 A: 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
