Let $(Y_t)$ be a sequence of independent and identically distributed random variables such that $ \mathbb{E}\left[|Y_{t}|\right] < \infty $.
1.Show that if $\tau$ is a random time so that the event $ \left\{ \tau\geq t\right\} $ is independent of $Y_t$ for all $t$ and $\mathbb{\tau} < \infty$ then $$ \mathbb{E}\left[\sum_{t=1}^{\tau}Y_{t}\right]=\mathbb{E}\left[\tau\right]\mathbb{E}\left[Y_{1}\right] $$
Now, I have the following hint:
Hint: write $ \sum_{t=1}^{\tau}Y_{t}=\sum_{t=1}^{\infty}Y_{t}1_{\left\{ \tau\geq t\right\} } $ and first consider the case $Y_t \geq 0$.
So, I followed the hint and did not really understand why exactly does it matter if $Y_t \geq 0 $ or not: $$ \mathbb{E}\left[\sum_{t=1}^{\tau}Y_{t}\right]=\mathbb{E}\left[\sum_{t=1}^{\infty}Y_{t}1_{\left\{ \tau\geq t\right\} }\right] $$
$$ =\sum_{t=1}^{\infty}\mathbb{E}\left[Y_{t}\right]\mathbb{P}\left(\tau\geq t\right) $$
$$ =\mathbb{E}\left[Y_{1}\right]\sum_{t=1}^{\infty}\mathbb{P}\left(\tau\geq t\right)=\mathbb{E}\left[Y_{1}\right]\mathbb{E}\left[\tau\right] $$
Where I took the expectation of $Y_t $ out of the sum since they all distributed the same.
So my question is why do I need this consideration of the positivity of $Y_t$? is one of the transition is wrong?
and also, I wanted to ask about the second bullet:
First, a definition:
Given a sequence $(X_t)$ of $\chi$ valued random variables, a stopping time $\tau$ is a $ \left\{ 0,1,...,\infty\right\} $ random variable such that for every $t$ there exists $ B_{t}\subseteq\chi^{t+1} $ for which $$ \left\{ \tau=t\right\} =\left\{ \left(X_{0},X_{1},...,X_{t}\right)\in B_{t}\right\} $$
Now, I have to show that given $\tau$ a stopping time for $Y_t$, the event $ \left\{ \tau=t\right\} $ is independent of $Y_t$. Not sure how to start this one since intuitivly it seems dependent to me (we want $Y_t$ to accept values in a defined set)
Any help would be appreciated, thanks in advance.
The case $Y_t\geqslant 0$ "matters" in the sense that the step $$ \operatorname{E}\left[\sum_{k\geqslant 1}Y_k\mathbf{1}_{\{\tau \geqslant k\}}\right]=\sum_{k\geqslant 1}\operatorname{E}[Y_k\mathbf{1}_{\{\tau \geqslant k\}}] $$ can be justified easily using the monotone convergence theorem. From there it follows that $$ \operatorname{E}\left[\sum_{k\geqslant 1}Y_k\mathbf{1}_{\{\tau \geqslant k\}}\right]=\operatorname{E}[Y_1]\operatorname{E}[\tau ] $$
A more general case for integrable $Y_k$ follows from separating $Y_k$ in it positive and negative parts and assuming that $\operatorname{E}[\tau ]<\infty $, and applying the above. If $\operatorname{E}[\tau ]=\infty $ then the expectation of $\sum_{k=1}^{\tau }X_k$ can be undefined.