# the length of a random walk in two dimensions

This is a matlab code that could generate a random walk in two dimensions of length 1000: xy = cumsum (-1+2*rand(1000,2),1).

The 'stepsize' is between $[-1,1]$. In this case, we are talking about the set of real numbers from $-1$ and $1$. The rand function in this case generates numbers between $(0,1)$ over a uniform distribution.

Question 1: How will I determine the range of values (in $x$ and $y$ coordinates) after covering 1000 steps?

Question 2: Is it possible to find the values of $a$, $b$, with at least a probability of 0.5, so that $a + bU(0,1)$ gives me a random walk where the extreme points are in the domain $X: [860,1520]$ and $Y:[-830,0]$? after 600 steps?

$U(0,1)$ means the uniform distribution over $(0,1)$.

• Could you clarify what you mean by "covers"? After all, since each step will have (Euclidean) length between $0$ and $\sqrt{2}$, isn't it obvious what the possible range of $1000$ independent steps would be? – whuber Jun 19 '17 at 14:11
• Well, that's what I'm trying to ask: if you're asking only about the "span" or "range," that is not a question about probabilities, but only possibilities--and those ought to be very clear. Although it is true that attaining extreme distances of either $0$ or $1000\sqrt{2}$ are improbable, their probabilities clearly are not zero. If you are trying to ask a question about probabilities, though, then your question needs to be more clearly framed and articulated: exactly what probability or probabilities are you inquiring about? – whuber Jun 19 '17 at 14:40