A simulation of 50,000 iterations gives the average distance after a 2-step (unit step) random walk on a 2 dimensional plane, which is around 1.27. But how can one mathematically prove this?
Any insight is highly appreciated!
A simulation of 50,000 iterations gives the average distance after a 2-step (unit step) random walk on a 2 dimensional plane, which is around 1.27. But how can one mathematically prove this?
Any insight is highly appreciated!
On
I get $\frac{0+2\sqrt 2 + 2} 4 \approx 1.207$ as the expected distance. The first step moves you to distance $1$ from the origin. The next step goes back to the origin with probability $1/4$, goes sideways with probability $1/2$, and goes in the same direction with probability $1/4$.
I suppose the discrepancy between what I calculate and what you report is due to Monte Carlo sampling error.
You can rotate the coordinates so the first step is to $(1,0)$. If the second step is at angle $\theta$, the end point is then $(1+\cos \theta,\sin \theta)$. The distance from the origin is then $\sqrt{(1+\cos \theta)^2+\sin^2\theta}=\sqrt{2+2\cos \theta}$ The average of this over $\theta$ is $$\frac 1{2\pi}\int_0^{2\pi}\sqrt{2+2\cos \theta}d\theta=\frac 8{2\pi}\approx 1.2732$$