Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Variance of 2-D random walker

  1. Nov 15, 2011 #1
    I've made a 2D walker to compare different RNG's. I'm measuring the succes of each walk as the distance from the origin to the endpoint, using the regular 2-norm. The thing I can't seem to work out is the variance.

    [tex]D_n=\sqrt(x_n^2+y_n^2)[/tex]

    [tex]Var(D_n)=E[D_n^2]=E[Z_1^2+...+Z_n^2][/tex]

    Since [itex]Var(Z_i)=\sqrt{2}[/itex] does this mean that the variance is [itex]2n[/itex]? Seems too easy...

    Ps. I'm not sure how to make the formatting prettier, if someone can tell me, I'll edit it naturally!
    Ps2. Thanks Stephen Tashi!
     
    Last edited: Nov 15, 2011
  2. jcsd
  3. Nov 15, 2011 #2

    Stephen Tashi

    User Avatar
    Science Advisor

    On this forum, surround the LaTex with "tags" rather than the dollar sign.

    Code (Text):


    [tex]D_n=\sqrt{x_n^2+y_n^2}[/tex]

    [tex]Var(D_n)=E[D_n^2]=E[Z_1^2+...+Z_n^2][/tex]

    Since [itex]Var(Z_i)=\sqrt{2}[/itex] does this mean that the variance is [itex]2n[/itex] ?

     
    [tex]D_n=\sqrt{x_n^2+y_n^2}[/tex]

    [tex]Var(D_n)=E[D_n^2]=E[Z_1^2+...+Z_n^2][/tex]

    Since [itex]Var(Z_i)=\sqrt{2}[/itex] does this mean that the variance is [itex]2n[/itex] ?
     
  4. Nov 15, 2011 #3

    Stephen Tashi

    User Avatar
    Science Advisor

    Another thing about the forum: When you edit a post, sometimes "Save" doesn't display the LaTex. You must refresh the page to accomplish that.

    [itex] Var(z_i) = \sqrt{2} [/itex] for the random variable [itex] z_i [/itex] that uses the square of the distance between the current position and the previous position. But this is not the same as using the distance between the current position and [itex] (x_0,y_0) [/itex].

    For example, there is the distinction between
    [tex] z_2 = \sqrt{(x_1-x_0)^2 + (y_1-y_0)^2} + \sqrt{( x_2-x_1)^2 + (y_2-y_1)^2} [/tex]

    and

    [tex] Z_2 = \sqrt{ (x_2-x_0)^2 + (y_2-y_0)^2} [/tex]
     
  5. Nov 16, 2011 #4

    The sum of the variances of independent random variables is the variance of the sum. That should make it easy, unless I'm missing something.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Variance of 2-D random walker
  1. Random Walker (Replies: 2)

Loading...