The Hansen-Hurwitz estimator of the population total, $Y=\sum_{I=1}^{N} Y_{I}$, is given as: \begin{equation} \mathcal{y}_{\mathrm{HH}}^{\prime}=\frac{1}{n} \sum_{i=1}^{n} \frac{y_{i}}{p_{i}} \end{equation} Then its variance can be expressed variously as: \begin{align} V\left(y_{\mathrm{HH}}^{\prime}\right) &=\frac{1}{n}\left(\sum_{I=1}^{N} \frac{Y_{I}^{2}}{P_{I}}-Y^{2}\right) \\ &=\frac{1}{n} \sum_{I=1}^{N} P_{I}\left(\frac{Y_I}{P_{I}}-Y\right)^{2} \\ &=\frac{1}{2 n} \sum_{I}^{N} \sum_{J =1, \neq I}^{N}P_IP_J\left(\frac{Y_I}{P_{I}}-\frac{Y_J}{P_{J}}\right)^{2} \end{align} The first two lines of this equation are easily to prove, could somebody elaborate the last line?
Notations:
$y_i$: the value taken by $i$-th sample unit.
$Y_I$: the value of $I$-th population unit.
$p_i$: the probability of that a given sample unit will be selected.
$P_I$: the probability of that a given population unit will be selected.
$N$: number of units in the population.
$n$: number of units in the sample.