# Applying the Union Bound in a conditional probability involving a stopping time

Let $$b>0$$. Consider a sequence of independent and identically distributed random variables $$\{X_n\}_{n=1}^\infty$$ and the corresponding random walk $$S_n = \sum_{k=1}^n X_k$$. Define the stopping time $$\tau = \inf\{n\geq 1 : S_n <0\}$$. I am reading a paper and the following equations appear: $$$$\mathbb{P}\bigg\{ \max_{i=1,\dots,\tau }S_i \geq b\bigg\} = \mathbb{E}\bigg[\mathbb{P}\bigg\{\max_{i=1,\dots,\tau }S_i \geq b \bigg|\tau\bigg\}\bigg]\leq \mathbb{E} \bigg[ \sum_{i=1}^\tau \mathbb{P}_\infty \bigg\{ S_i \geq b\bigg\}\bigg]$$$$ I am not completely certain about the last inequality. The author states it follows because of the union bound but I am not sure how the conditioning on the knowledge of $$\tau$$ disappears. Thanks for the help!

$$\max_{i=1,2,..,\tau} S_i \geq b$$ iff $$S_i \geq b$$ for some $$i \leq \tau$$. So $$\{\max_{i=1,2,..,\tau} S_i \geq b\} \subset \cup_{i \leq \tau} \{S_i \geq b\}$$.
• I understood that the union bound was used in such a way, but I am not quite sure why there is no conditioning with respect to $\tau$ in the right hand side. – SpawnKilleR Oct 21 '18 at 0:16
• There is another expectation outside the conditional expectation. $E(E(Z|\tau)) =EZ$ for any random variable $Z$. – Kavi Rama Murthy Oct 21 '18 at 0:44
• Isn't this used on the equality? So basically the question is why there is not some form of conditioning in $\mathbb{E} \bigg[ \sum_{i=1}^\tau \mathbb{P}_\infty \bigg\{ S_i \geq b\bigg\}\bigg]$, whether in the middle term there is. – SpawnKilleR Oct 21 '18 at 1:11