Second moment of the Benjamini-Hochberg false discovery proportion (source code)

= Second moment of the Benjamini-Hochberg false discovery proportion
{title2=$\mathbb E(\operatorname{FDP}^2)$}

For independent <p-values>, with $m_0$ true-null values independent and uniform on $[0,1]$, let $R^{(i)}$ denote the <Benjamini-Hochberg procedure> rejection count after replacing one true-null value by zero. The <Benjamini-Hochberg leave-one-out identity> gives
$$
\mathbb E\frac{\mathbf1\{i\text{ rejected}\}}{(R\vee1)^2}=\frac\alpha m\mathbb E\frac1{R^{(i)}}.
$$
For distinct true-null indices, the <Benjamini-Hochberg leave-two-out identity> gives
$$
\mathbb E\frac{\mathbf1\{i,j\text{ rejected}\}}{(R\vee1)^2}=\frac{\alpha^2}{m^2}.
$$
Indeed, conditional on the remaining values and $R^{(ij)}=r$, the two independent uniform values both meet their threshold with probability $(\alpha r/m)^2$, cancelling the denominator $r^2$. Expanding the square of the false rejection count into its diagonal terms and ordered distinct pairs, and using symmetry among the true-null values, proves
$$
\mathbb E(\operatorname{FDP}^2)=\frac{\alpha m_0}{m}\mathbb E\frac1{R^{(i)}}+\frac{\alpha^2m_0(m_0-1)}{m^2}.
$$
If no null is true, both sides are zero; if exactly one is true, the pair contribution is absent. This formula complements the exact <false discovery rate> $\alpha m_0/m$ by describing second-moment variability.