Poisson Process Network Sniffer Problem. The problem is: Consider a traffic sniffer that observes packet arrivals into a link. Packets arrive according to a Poisson process with rate $\lambda$. If the sniffer sees no packet over a period of time $T$, then it stops working. Suppose that at time $t=0$, the sniffer starts. 
$a)$ On average, how much time will elapse till the sniffer stops working? Hint: Condition on the arrival time of the first packet. 
$b)$ On average, how many packets will the sniffer observe before it stops working? Note: this question can be solved independently from part (a).
To be honest I'm not sure how to start. I understand conditional probability, but I'm very shaky with what a Poisson process even is. I don't have enough information in this problem to get a numerical solution right? If someone could point me in the right direction to get started I'd really appreciate it. 
 A: A start for both questions:
(a) (Using the given hint)
Let random variable $X_i$ be the arrival time of the $i^{th}$ packet, for $i=1,2,\ldots,\;$ and let $Y$ be the time until the sniffer stops working. Then, conditioning on the first arrival time,
\begin{align}
E(Y) &= P(X_1\gt T)E(Y\mid X_1\gt T) + \int_{u=0}^{T} f_1(u) E(Y\mid X_1=u)\; du \\
&\qquad\text{where $f_1$ is the pdf of $X_1$, which has distribution $Exp(\lambda)$} \\
&= Te^{-\lambda T} + \int_{u=0}^{T} \lambda e^{-\lambda T} (E(Y)+u)\; du \\
&\qquad\text{since if $X_1\gt T$ then we have $T$ time until the sniffer stops and } \\
&\qquad\text{if $X_1=u\lt T$ then we have $u$ time elapsed and then it's like we are} \\
&\qquad\text{starting over again giving us $E(Y)+u$} \\
&= \cdots
\end{align}
(b)
Let random variable $Z$ be the number of packets until the sniffer stops working. Then,
\begin{align}
E(Z) &= P(X_1\gt T)E(Z\mid X_1\gt T) + P(X_1\lt T)E(Z\mid X_1\lt T) \\
&= \cdots
\end{align}
You won't get numerical solutions to either part. Both answers will be in terms of $T$ and $\lambda$. To get there you shouldn't need to know much more about Poisson processes - it's mostly just working with an exponential distribution.
A: Let me provide you with an alternative approach for (b) and then use it to solve (a).
Take $X_1$ as the arrival time of the first packet and $X_k$ as the interarrival time between the $(k-1)^{\text{st}}$ packet and the $k^{\text{th}}$ packet for each $k\geq 2$. Put $$N=\min\{n\geq 1:X_n>T\}$$ The sniffer observes $N-1$ packets before the link is turned off. Since $N\sim \text{Geometric}(e^{-\lambda T})$ we have $$\mathbb{E}(N-1)=\mathbb{E}(N)-1=e^{\lambda T}-1$$ We can use this approach to attack part (a). If $N=1$  then $Y=T$ units of time elapses until the sniffer stops working. On the other hand, if $N>1$ then $$Y=X_1+\dots + X_{N-1}+T$$ units of time elapses until the sniffer stops working. So, $$\begin{eqnarray*}\mathbb{E}(Y|N)&=&(N-1)\mathbb{E}(X_1|0\leq X_1 \leq T)+T \\ &=& (N-1)\cdot \frac{\int_0^T \lambda t e^{-\lambda t} \mathrm{d}t}{\int_0^T \lambda  e^{-\lambda t} \mathrm{d}t}+T \end{eqnarray*}$$ From the total law of expectation, $$\begin{eqnarray*}\mathbb{E}(Y)&=&\mathbb{E}\Big(\mathbb{E}(Y|N)\Big)\\ &=&(\mathbb{E}(N)-1)\cdot \frac{\int_0^T \lambda t e^{-\lambda t} \mathrm{d}t}{\int_0^T \lambda  e^{-\lambda t} \mathrm{d}t}+T \\ &=& \frac{e^{\lambda T}-1}{\lambda} \end{eqnarray*}$$
