I was trying to solve the following exercise:
Suppose that the sequence of independent events $\{A_i\}$ satisfies $\phi(n) = \sum_{i=1}^{n} P(A_i) \rightarrow \infty \text{ as } n \rightarrow \infty$ and let $\tau_k :=\min\{n | \sum_{i=1}^{n} 1(A_i) = k\}$. By applying Doob's stopping time theorem to an appropriate martingale, prove the more quantitative result that $E[\phi(\tau_k)] = k \text{ for all } k \geq 1$
Here, $1(\cdot)$ is the indicator function. By Doob's stopping theorem, I think the book is referring to the following theorem (which is just named "stopping time theorem"):
If $(M_n)$ is a martingale with respect to $(\mathcal{F}_n)$, then the stopped process $(M_{\tau \wedge n})$ is also a martingale with respect to $(\mathcal{F}_n)$.
First of all, let me say that I think my proof is wrong. I don't use the stopping time theorem or the fact that $\phi(n)$ diverges for $n \rightarrow \infty$ and it just looks too easy to be true. In any case, I'd welcome hints and constructive criticism.
My attempt at a proof:
Since $P(A) = E[1(A)]$, we can write $\phi(\tau_k) = \sum_{i=1}^{\tau_k} P(A_i) = \sum_{i=1}^{\tau_k} E[1(A_i)]$ Now, $\tau_k$ is the smallest $n$ such that from the sequence $\{A_1, A_2, \ldots, A_n\}$, exactly $k$ of them occur. So $\sum_{i=1}^{\tau_k} E[1(A_i)] = \sum_{j=1}^{k} E[1(A_{i_j})]$ for indices $i_j$. Since, by definition of $\tau_k$, we know that the events $A_{i_j}$ occur for $j = 1, \ldots, k$, we have that $\phi(\tau_k) = \underbrace{1 + 1 + \ldots + 1}_{k} = k$ and taking the expectation of both sides gives $E[\phi(\tau_k)] = E[k] = k$