Expected value of squared distance after $2016$ knight moves

combinatoricsexpected valuegeometryprobability

From PUMaC 2016: https://static1.squarespace.com/static/570450471d07c094a39efaed/t/58b0dab8d1758e013286f070/1487985337234/PUMaC2016_CombinatoricsA.pdf

A knight is placed at the origin of the Cartesian plane. Each turn, the knight moves in an chess L-shape ($2$ units parallel to one axis and $1$ unit parallel to the other) to one of eight possible locations, chosen at random. After $2016$ such turns, what is the expected value of the square of the distance of the knight from the origin?

Shouldn't this just be $0$? Imagine the $8$ possible moves each turn to be vectors with magnitude $\sqrt{5}$, pair each one off with the one that's $180$ degrees in the other direction, and they all cancel out to $0$. What am I missing?

Edit: Honestly, I still don't understand the solutions given. At a turn starting from $(a, b)$ at most $1$ of the $8$ possible moves is parallel to the vector from $(0, 0)$ to $(a, b)$, and that would increase the square of the distance to the origin by $5$. But by the triangle inequality, the other $7$ necessarily increase the square of the distance to the origin by less than $5$, and in some cases decrease it. So the idea that the average increase of the square of the distance to the origin is $5$ doesn't make sense to me, intuitively it should be less than $5$. Can someone explain what's wrong with this thinking?

Best Answer

Added later

There is a tiny probability that you end up back where you started (a distance of $0$) after $2016$ steps. Usually you will end up some positive distance away and so the expected square of the distance away will be positive. As you take more steps, this expectation of the square increases.

You can see what happens with just one step: while the expected position is where you started because of the symmetry of the steps, you must be exactly $\sqrt{5}$ away and so the expectation of the square of the distance is $5$.

You can also see what happens with two steps: the expected position is still where you started because of the symmetry of the steps, but of the $64$ pairs of moves you can take: $8$ lead you back to a distance $0$; $8$ to a distance of $\sqrt{2}$; $8$ to a distance of $2$; $16$ to a distance of $\sqrt{10}$; $8$ to a distance of $4$; $8$ to a distance of $\sqrt{18}$; and $8$ to a distance of $\sqrt{20}$. So the expected square of distance is $\tfrac{8\cdot 0 +8\cdot 2+8\cdot 4+16\cdot10 +8\cdot 16+8\cdot 18+8\cdot 20}{64}=\frac{640}{64}=10$.

The two step expected square of distance answer is double the one step expected square of distance, and in general this extends to any number of independent steps - see my original answer. This seems to surprise you.

But it does not mean that the expected distance (not squared) is a linear function of the number of steps: for two steps it is $\tfrac{8\cdot 0 +8\cdot \sqrt 2+8\cdot 2+16\cdot\sqrt{10} +8\cdot 4+8\cdot \sqrt{18}+8\cdot \sqrt{20}}{64} \approx 2.8067$ which is a lot less than double $\sqrt{5}\approx 2.2361$.

Nor is the expected square of distance in the two step case what you would get if you always took the same step twice: that would have been $(\sqrt{5} +\sqrt{5})^2=20$, a quadrupling of $5$ rather than the doubling of the one step case that $10$ represents.


Original answer

Let's generalise this. Suppose you have two independent $n$-dimensional random variables $\mathbf{A}$ and $\mathbf{B}$ each with zero mean and where the components such as $A_i$ or $B_j$ have variances $\sigma^2_{A_i}$ and $\sigma^2_{B_j}$. (There may be dependencies between components of each random variables but they do not affect the result due to linearity of expectation.)

We have $||\mathbf{A}||^2=\sum A_i^2$ and $||\mathbf{B}||^2=\sum B_j^2$. Then

  • $\mathbb E\left[||\mathbf{A}||^2\right]=\sum \mathbb E\left[A_i^2\right]=\sum \sigma^2_{A_i}$ and $\mathbb E\left[||\mathbf{B}||^2\right]=\sum \mathbb E\left[B_j^2\right]=\sum \sigma^2_{B_j}$
  • $\mathbb E\left[||\mathbf{A}+\mathbf{B}||^2\right] = \sum \sigma^2_{A_i} + \sum \sigma^2_{B_j}$

This easily extends to the the sum of any finite number of independent $n$-dimensional random variables with zero means: the expectation of the sum of the squares of the sums of the random variables is the sum of the sums of the variances of the components.

In your particular case $n=2$, and all the random variables (knights' moves) are iid with each component ($x$ and $y$ moves) have zero means and variances of $\frac{(+1)^2+(+2)^2+(-1)^2+(-2)^2}{4} = \frac52$. So the expected square of the distance after $2016$ moves is $$2016\cdot\frac52 +2016\cdot\frac52 = 10080$$