# On distribution of the time between two consecutive events (either arrival or departure) in an M/M/1 queueing system

For an M/M/1 queueing system, distribution of the time ($$t_e$$) between two consecutive events (either arrival or departure) can be derived as follows with the independent assumption,

$$F(t_e\ge t)=F(t_a\ge t)\cdot F(t_d\ge t)=e^{-\lambda t}e^{-\mu t}=e^{-(\lambda+\mu)t}$$

where $$t_a$$ and $$t_d$$ are the time between two consecutive arrivals and departures respectively.

From the complementary CDF (CCDF) derived above, we can say that $$t_e$$ is also exponentially distributed (with mean $$1/(\lambda+\mu)$$).

However, if we derive the result using CDF rather than CCDF, the outcome is,

$$F(t_e\le t)=F(t_a\le t)\cdot F(t_d\le t)\\=(1-e^{-\lambda t})(1-e^{-\mu t})=1-e^{-\lambda t}-e^{-\mu t}+e^{-(\lambda+\mu)t}\\<1-e^{-(\lambda+\mu)t}=1-F(t_e\ge t)$$

From this point of view, it seems we cannot say $$t_e$$ is exponentially distributed.

Your first attempt uses the claim that $$\{ t_e \ge t \} = \{ t_a \ge t \} \cap \{ t_d \ge t \}. \tag{\dagger}$$ (Here the "$$\{...\}$$" notation just means "the event that [...] happens".)
In your second attempt, you look at $$\{t_e \le t\}$$. Since everything is with exponential times, "$$\le$$" or "<" doesn't matter; let's look at $$\{t_e < t\}$$. You then claim that $$\{ t_e < t \} = \{ t_a < t \} \cap \{ t_d < t \}. \tag{\ddagger}$$
However, these two displays, $$(\dagger, \ddagger)$$, are incompatible. Note that $$\{t_e \ge t\} = \{t_e < t\}^c$$. (Here $$\{...\}^c$$ means the complementary event.) But, for general sets/events $$A$$ and $$B$$, $$\text{if}\quad C = A \cap B \quad\text{then}\quad C^c = A^c \cup B^c.$$ Hence, applying this in your situation, assuming that $$(\dagger)$$ is the correct statement, we get $$\{t_e < t\} = \{t_e \ge t\}^c = \bigl( \{t_a \ge t\} \cap \{t_d \ge t\} \bigr)^c = \{t_a < t\} \cup \{t_d < t\},$$ which you then need to deal with -- basically, you deal with this by doing your first computation for the different parts, and using the independence of $$\{t_a \ge t\}$$ and $$\{t_d \ge t\}$$ (which you assumed in your first calculation).
• Thanks, it points out where I went wrong. Since the r.v. $t_e$ is the time till the next event, therefore $t_e\ge t$ means $t_a\ge t$ as well as $t_d\ge t$. However, for $t_e\le t$, at least one of $t_a\le t$ and $t_d\le t$ happens will guarantee $t_e\le t$. The probability, therefore, is equal to $1-P(t_a\ge t, t_d\ge t)=1-F(t_e\ge t)$. I see you applied de Morgan's law, but $C^c$ is not equal to $(A\cup B)\backslash(A\cap B)$ if $(A\cup B)$ is not the universal set. It's supposed to be $S\backslash(A\cap B)$. – Guoyang Qin Feb 12 at 19:14