Points $P=(X_P,Y_P)$ and $Q=(X_Q,Y_Q)$ were independently chosen from square $(-1,0),(0,-1),(1,0),(0,1)$ with geometric probability. How does one find $$\mathbb{E}\big|X_P-X_Q\big|^2\ ?$$
I've been thinking and thinking, but couldn't come up with anything. How do you even define expected value here? There's no density function, nor is the distribution discrete.
By independence, $A=E((X_P-X_Q)^2)$ is $A=E(X_P^2)+E(X_Q^2)-2E(X_P)E(X_Q)$. Since $X_P$ and $X_Q$ are identically distributed, $A=2E(X_P^2)-2E(X_P)^2$. The density of $X_P$ is $f:x\mapsto(1-|x|)^+$ and $f$ is even hence $E(X_P)=0$ and $E(X_P^2)=2\displaystyle\int_0^1x^2(1-x)\mathrm dx=\tfrac16$ and $A=2\cdot\frac16=\frac13$.