Results 1 to 4 of 4

Math Help - Distance of random walk from the origin

  1. #1
    Member
    Joined
    Aug 2009
    Posts
    80

    Distance of random walk from the origin

    Suppose you take two unit-length steps from the origin, and suppose that the respective angles A and B of each step with the x-axis are independent random variables uniformly distributed between 0 and 2pi. What's the expected distance you'll end up from the origin?

    It's easy to see visually that the answer is independent of the direction of the first step; so if we assume our first step goes one unit in the y-direction (i.e., with A = pi/2), we can see that at the end of the second step that the distance from the origin is given by \sqrt{(\cos B)^2 + (1 + \sin B)^2} = \sqrt{2}\sqrt{\sin B + 1}. So the expectation in question should be equal to \frac{\sqrt{2}}{2\pi}\displaystyle\int_{0}^{2\pi}\  sqrt{\sin t + 1}\mathrm dt. To evaluate this integral directly, I had to use the online Wolfram Integrator and then use l'Hopital's rule multiple times on messy functions. The answer I ended up getting is 4/pi, which I'm reasonably confident is correct; but (assuming it is correct) is there a better way to go about finding the solution?

    Also, and probably much harder, is there a way to calculate the expected distance from the origin after n steps? Or a way to find the probability distribution for the distance after n steps?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by rn443 View Post
    Suppose you take two unit-length steps from the origin, and suppose that the respective angles A and B of each step with the x-axis are independent random variables uniformly distributed between 0 and 2pi. What's the expected distance you'll end up from the origin?

    It's easy to see visually that the answer is independent of the direction of the first step; so if we assume our first step goes one unit in the y-direction (i.e., with A = pi/2), we can see that at the end of the second step that the distance from the origin is given by \sqrt{(\cos B)^2 + (1 + \sin B)^2} = \sqrt{2}\sqrt{\sin B + 1}. So the expectation in question should be equal to \frac{\sqrt{2}}{2\pi}\displaystyle\int_{0}^{2\pi}\  sqrt{\sin t + 1}\mathrm dt. To evaluate this integral directly, I had to use the online Wolfram Integrator and then use l'Hopital's rule multiple times on messy functions. The answer I ended up getting is 4/pi, which I'm reasonably confident is correct; but (assuming it is correct) is there a better way to go about finding the solution?

    Also, and probably much harder, is there a way to calculate the expected distance from the origin after n steps? Or a way to find the probability distribution for the distance after n steps?
    I know this does not answer your question, but it seems you get a much simpler problem if you ask for the root mean square distance from the origin after n steps (since there is a nice recursion for the mean square distance after n steps).

    CB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Aug 2009
    Posts
    80
    O.K., I guess it seems you could calculate the cumulative distribution function of the distance by F(b) = P(D \leq b) = P(\sqrt{2}\sqrt{\sin B + 1} \leq b) = P(B \leq \arcsin (b^2/2 - 1)), and then express this as \displaystyle\frac{1}{2\pi}\int_{0}^{\arcsin (b^2/2 - 1)} \mathrm dt = \frac{\arcsin (b^2/2 - 1)}{2\pi}, then take the derivative with respect to b for the density of the distance D. Then you could calculate the expected value normally. However, I think I may be being sloppy with arcsin and could use some help setting all of this up.

    EDIT: Ah, this seems to work! The integral I ended up evaluating was \frac{1}{\pi}\displaystyle\int_{0}^{2}\frac{t}{\sq  rt{1 - t^2/4}}\mathrm dt = -\frac{2\sqrt{4 - t^2}}{\pi}\Bigg|_{0}^{2} = \frac{4}{\pi}.
    Last edited by rn443; August 22nd 2009 at 04:21 AM.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member
    Joined
    Aug 2009
    Posts
    80
    Quote Originally Posted by CaptainBlack View Post
    I know this does not answer your question, but it seems you get a much simpler problem if you ask for the root mean square distance from the origin after n steps (since there is a nice recursion for the mean square distance after n steps).

    CB
    Yeah, this problem was actually inspired by an example from Sheldon Ross' introductory probability book where he showed that the expected value of the distance squared after n steps is just n (IIRC).
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Random Walk in 2D
    Posted in the Advanced Statistics Forum
    Replies: 3
    Last Post: November 17th 2010, 03:04 AM
  2. Distance to the origin
    Posted in the Advanced Algebra Forum
    Replies: 3
    Last Post: November 4th 2010, 02:41 PM
  3. Random Walk.
    Posted in the Statistics Forum
    Replies: 1
    Last Post: March 8th 2009, 08:41 PM
  4. random walk
    Posted in the Advanced Statistics Forum
    Replies: 3
    Last Post: March 1st 2009, 10:40 PM
  5. Random walk
    Posted in the Advanced Statistics Forum
    Replies: 2
    Last Post: February 19th 2009, 05:22 AM

Search Tags


/mathhelpforum @mathhelpforum