0

Suppose we start in the Cartesian plane with coordinates $(x, y)$ such that $x^2 + y^2 < 1$ (lies in the unit circle). There are $2$ variations to my question:

  1. A step is defined as picking a random direction (not necessarily cardinal) and moving exactly $1$ unit in said direction. For example, if we were to start at $(1, 0)$, an example of where we might end up after a step is $(1, -1)$.
  2. Define a step the same way as aforementioned except the length of the step is a random number from $0$ to $1$.

What is the expected absolute distance from the origin after performing a step given a starting position as defined at the top?

I've read this SE thread, and I suppose it was pretty interesting and insightful (even though I understood nothing). Is it somehow related to my question?

1 Answers1

0

In the linked question I said

if there are $d$ dimensions then the expected absolute distance from the origin after $N$ steps becomes close to $$\sqrt{\dfrac{2N}{d}} \dfrac{\Gamma(\frac{d+1}{2})}{\Gamma(\frac{d}{2})}$$ where $\Gamma$ is the Gamma function.

Here you have $d=2$ so this becomes close to $\frac12\sqrt{N \pi}$.

As a simulation example using R with $100$ steps of length $1$ in a uniformly distributed random direction, we might expect a result close to $\frac12\sqrt{100 \pi} \approx 8.862$ and indeed we see that:

set.seed(2022)
absdist <- function(steps){
  r <- 1
  theta <- runif(steps, 0, 2*pi)
  X <- sum(r * cos(theta))
  Y <- sum(r * sin(theta))
  sqrt(X^2 + Y^2)
  }
sims <- replicate(10^6, absdist(100))
mean(sims)
# 8.869194

If the step length is instead uniformly distributed on $[0,1]$ then you need to multiply that expected absolute distance by $\sqrt{\mathbb E[R^2]}=\frac{1}{\sqrt{3}}\approx 0.57735$.

Henry
  • 169,616