basic probability - mean squared error between guesses

36 Views Asked by At

You and I are playing a guessing game. at stage $k$, I chose a number $x_k$ at random, between $-\pi$ and $\pi$.

You now choose a number $y_k$ between $-\pi$ and $\pi$, and then I tell you $z_k = (x_k-y_k)^2$.

What's the mean for $z_k$? That's simply the variance of uniform distribution between $-\pi$ and $\pi$ no? So $\frac{\pi^2}{3}$.

2

There are 2 best solutions below

0
On BEST ANSWER

The expected value of $z_k$ is:

$$\mathbb{E}[z_k] = \mathbb{E}[(x_k-y_k)^2] = \mathbb{E}[x_k^2] + \mathbb{E}[y_k^2] -2\mathbb{E}[x_ky_k].$$

Since $x_k$ and $y_k$ are independent, then:

$$\mathbb{E}[x_ky_k] = \mathbb{E}[x_k]\mathbb{E}[y_k],$$

and hence

$$\mathbb{E}[z_k] = \mathbb{E}[(x_k-y_k)^2] = \mathbb{E}[x_k^2] + \mathbb{E}[y_k^2] -2\mathbb{E}[x_k]\mathbb{E}[y_k].$$

Notice that $\mathbb{E}[x_k^2]$ is the variance of $x_k$, since its mean is $\mathbb{E}[x_k] = 0$. The same holds for $y_k$. Therefore:

$$\mathbb{E}[z_k] = \frac{\pi^2}{3} + \frac{\pi^2}{3} - 2 \cdot 0 \cdot 0 = \frac{2\pi^2}{3},$$

where

$$ \mathbb{E}[x_k^2] = \mathbb{E}[y_k^2] = \int_{-\pi}^{\pi} s^2\frac{1}{2\pi}ds = \left.\frac{s^3}{6\pi}\right|_{s=-\pi}^{s=\pi} = \frac{\pi^2}{3}.$$

0
On

Let $X_k, Y_K \sim \text{Unif}(-\pi,\pi)$ and $Z_k = (X_k-Y_k)^2.$ Note that $EX_k = EY_k=0$ and that $X_k$ and $Y_k$ are independent rv-s.

Then, $E[(X_k-Y_k)^2]= E(X_k^2)+E(Y_k^2) -2EX_kEY_k= 2 E(X_k^2)=2 (V(X_k) + (EX_k)^2) = 2V(X_k)=2/3\pi^2 $