Solution (source code)

= Solution

For $P\ll Q$, the <chi-squared divergence> is $\chi^2(P\Vert Q)=\mathbb E_Q[(dP/dQ-1)^2]$. Write $L_j=dQ_j/dP_0$ for the <likelihood ratios> of the complete $n$-ball sample. Since $dP_1/dP_0=d^{-1}\sum_jL_j$ and $\mathbb E_0L_j=1$, the <second moment of a mixture likelihood ratio> gives
$$
\boxed{\chi^2(P_1\Vert P_0)=\frac1{d^2}\sum_{j,\ell=1}^d\mathbb E_0[L_jL_\ell]-1.}
$$
If instead $L_j$ denotes a one-ball <likelihood ratio>, its cross moment must be raised to the $n$th power for the full sample, by <independence>.