Consider a population of size $N$ and draw i.i.d. a random sample $S=(i_1,\dots,i_n)$ of $\{1,...,N\}$ with replacement. We define the Hansen-Hurwitz estimator as $$ \hat{\tau}= \frac{1}{n}\sum_{j=1}^n \frac{y_{i_j}}{p_{i_j}} $$ where $p_j$ is the probability of selecting unit $j$.
I want to prove this estimator is an unbiased estimator of the population total $\tau = \sum_{j=1}^N y_j$.
When showing the Horwitz-Thompson estimator is unbiased (https://en.wikipedia.org/wiki/Horvitz%E2%80%93Thompson_estimator#Proof_of_Horvitz-Thompson_Unbiased_Estimation_of_the_Mean) you introduce an indicator function to be able to take the sum out of the expectation. Here the index set is not random but I still thinking it might be useful to introduce a similar indicator function. What is random here is the index $i_j$ so we have to get rid of this somehow. Initial steps yield:
$$ E[\hat{\tau}]= \frac{1}{n}\sum_{j=1}^n E\left[\frac{y_{i_j}}{p_{i_j}}\right] $$
Thus it would suffice to prove $E\left[\frac{y_{i_j}}{p_{i_j}}\right]= \tau$. Can anyone help me do this?