This is LaTeX code:

[latex]
Cox(X,Y)=\mathbb{E}[XY]-\mathbb{E}X\mathbb{E}Y=
n(n-1)p_1p_2-np_1np_2=np_1p_2\big((n-1)-n\big)=-np_1p_2
[/latex]