Suppose we have i.i.d. $\xi_1,\dots,\xi_n\sim Bernoulli(p)$ and define $\tau=\sum_{i=1}^n\xi_i,\eta=\sum_{j=1}^{\tau}\xi_j$.
Find $\mathbb{E}\eta$.
Unlike in some of the similar problems solved here, this one involves dependent r.v.s.
I start by computing the expected value of one of the i.i.d. $\xi_i$ conditional on a fixed value of $\tau$ denoted as $k$: $\begin{align*} &\mathbb{E}(\xi_i|\tau=k)=1\cdot\mathbb{P}(\xi_i=1|\tau=k)+0=\frac{\binom{n-1}{k-1}}{\binom{n}{k}}=\frac{k}{n} \end{align*}$
I don't understand how to go from here to $\mathbb{E}(\xi_i|\tau)$. Obviously, if $\tau=k<n$, only $k$ of the variables $\xi_i$ are equal to 1. I've tried to write:
$\mathbb{E}(\xi_i|\tau)\sum_{i=1}^n\frac{i}{n}=\frac{1+n}{2}\cdot n\cdot p$ but I don't think it's right.
Is there something I am doing wrong? How to compute the expected value in question properly?