Expected value of square of distance after $n$ moves











up vote
1
down vote

favorite












I have this question and not too sure where to proceed.



A point starts from the origin and on any move is equally likely to go one unit up, down, left or right, independently of previous moves. Let $X_1, X_2, X_3$ and $X_4$ be random variables giving the number of moves up, down, left and right in a sequence of $n$ moves.



If $D$ is the distance from the origin after $n$ moves, show that $mathsf{E}(D^2)=n$.



I know that$ D^2=(X1 - X2)^2 + (X3- X4)^2$ and that each of $X1, X2$ will have a probability of $0.25$ but am not sure how to find the expected value of this.










share|cite|improve this question




























    up vote
    1
    down vote

    favorite












    I have this question and not too sure where to proceed.



    A point starts from the origin and on any move is equally likely to go one unit up, down, left or right, independently of previous moves. Let $X_1, X_2, X_3$ and $X_4$ be random variables giving the number of moves up, down, left and right in a sequence of $n$ moves.



    If $D$ is the distance from the origin after $n$ moves, show that $mathsf{E}(D^2)=n$.



    I know that$ D^2=(X1 - X2)^2 + (X3- X4)^2$ and that each of $X1, X2$ will have a probability of $0.25$ but am not sure how to find the expected value of this.










    share|cite|improve this question


























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I have this question and not too sure where to proceed.



      A point starts from the origin and on any move is equally likely to go one unit up, down, left or right, independently of previous moves. Let $X_1, X_2, X_3$ and $X_4$ be random variables giving the number of moves up, down, left and right in a sequence of $n$ moves.



      If $D$ is the distance from the origin after $n$ moves, show that $mathsf{E}(D^2)=n$.



      I know that$ D^2=(X1 - X2)^2 + (X3- X4)^2$ and that each of $X1, X2$ will have a probability of $0.25$ but am not sure how to find the expected value of this.










      share|cite|improve this question















      I have this question and not too sure where to proceed.



      A point starts from the origin and on any move is equally likely to go one unit up, down, left or right, independently of previous moves. Let $X_1, X_2, X_3$ and $X_4$ be random variables giving the number of moves up, down, left and right in a sequence of $n$ moves.



      If $D$ is the distance from the origin after $n$ moves, show that $mathsf{E}(D^2)=n$.



      I know that$ D^2=(X1 - X2)^2 + (X3- X4)^2$ and that each of $X1, X2$ will have a probability of $0.25$ but am not sure how to find the expected value of this.







      probability






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Nov 15 at 21:58









      David K

      51.2k340113




      51.2k340113










      asked Mar 8 '17 at 14:08









      johnnybigcanoe

      264




      264






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          2
          down vote













          It is easy to know that
          $$
          X_1 + X_2 + X_3 + X_4 = n
          $$
          and thus
          $$
          mathsf{E}((X_1 + X_2 + X_3 + X_4)^2) = sum_{i=1}^4 mathsf{E}(X_i^2) + sum_{i neq j} mathsf{E}(X_iX_j) = n^2 tag{$spadesuit$}
          $$
          Since each $X_i sim mathsf{Binomial}(n, 1/4)$, we have $mathsf{E}(X_i^2)=frac{3}{16}n + frac{1}{16}n^2$. Moreover, by symmetry, we have
          $$
          mathsf{E}(X_1X_2) = mathsf{E}(X_1X_3) =cdots = mathsf{E}(X_3X_4)
          $$
          Therefore, by $(spadesuit)$, we obtain
          $$
          mathsf{E}(X_1X_2) = mathsf{E}(X_1X_3) =cdots = mathsf{E}(X_3X_4) = frac{n^2 - frac{3}{4}n - frac{1}{4}n^2}{12} = frac{1}{16}(n^2 - n)
          $$
          Finally, we have
          $$
          mathsf{E}(D^2) = sum_{i=1}^4mathsf{E}(X_i^2) - 2mathsf{E}(X_1X_2) - 2mathsf{E}(X_3X_4) = frac{3}{4}n + frac{1}{4}n^2 - frac{1}{4}(n^2 - n) = n
          $$






          share|cite|improve this answer




























            up vote
            0
            down vote













            Alternative way is to express each of $X_i$ as the sum of indicator r.v.: let $U_i, D_i, L_i, R_i$ equal to $1$ if at the $i$th step particle moves up, down, left and right correspondingly. For all $i$
            $$U_i+ D_i+ L_i+ R_i = 1, U_iD_i=0, L_iR_i=0$$
            $$X_1=sum_{i=1}^n U_i, X_2=sum_{i=1}^n D_i, X_3=sum_{i=1}^n L_i, X_4=sum_{i=1}^n R_i.$$
            Calculate the expected value of $D^2$:
            $$mathbb ED^2=mathbb Eleft(sum_{i=1}^n (U_i-D_i)right)^2+mathbb Eleft(sum_{i=1}^n (L_i-R_i)right)^2=2mathbb Eleft(sum_{i=1}^n (U_i-D_i)right)^2.$$
            Use $mathbb EX^2=text{Var} X + (mathbb EX)^2$:
            $$mathbb ED^2=2 text{Var}left(sum_{i=1}^n (U_i-D_i)right)+2left(mathbb Esum_{i=1}^n (L_i-R_i)right)^2=$$
            $$mathbb ED^2=2left(sum_{i=1}^n text{Var}(U_i-D_i)right)+2biggl(sum_{i=1}^n underbrace{mathbb E(L_i-R_i)}_{0}biggr)^2=2n text{Var}(U_1-D_1)=2n mathbb E(U_1^2+D_1^2-2underbrace{U_1D_1}_0)=4n mathbb EU_1^2=4n mathbb EU_1=4ncdot 0.25=n.$$






            share|cite|improve this answer





















              Your Answer





              StackExchange.ifUsing("editor", function () {
              return StackExchange.using("mathjaxEditing", function () {
              StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
              StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
              });
              });
              }, "mathjax-editing");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "69"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              noCode: true, onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














               

              draft saved


              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2177597%2fexpected-value-of-square-of-distance-after-n-moves%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              2
              down vote













              It is easy to know that
              $$
              X_1 + X_2 + X_3 + X_4 = n
              $$
              and thus
              $$
              mathsf{E}((X_1 + X_2 + X_3 + X_4)^2) = sum_{i=1}^4 mathsf{E}(X_i^2) + sum_{i neq j} mathsf{E}(X_iX_j) = n^2 tag{$spadesuit$}
              $$
              Since each $X_i sim mathsf{Binomial}(n, 1/4)$, we have $mathsf{E}(X_i^2)=frac{3}{16}n + frac{1}{16}n^2$. Moreover, by symmetry, we have
              $$
              mathsf{E}(X_1X_2) = mathsf{E}(X_1X_3) =cdots = mathsf{E}(X_3X_4)
              $$
              Therefore, by $(spadesuit)$, we obtain
              $$
              mathsf{E}(X_1X_2) = mathsf{E}(X_1X_3) =cdots = mathsf{E}(X_3X_4) = frac{n^2 - frac{3}{4}n - frac{1}{4}n^2}{12} = frac{1}{16}(n^2 - n)
              $$
              Finally, we have
              $$
              mathsf{E}(D^2) = sum_{i=1}^4mathsf{E}(X_i^2) - 2mathsf{E}(X_1X_2) - 2mathsf{E}(X_3X_4) = frac{3}{4}n + frac{1}{4}n^2 - frac{1}{4}(n^2 - n) = n
              $$






              share|cite|improve this answer

























                up vote
                2
                down vote













                It is easy to know that
                $$
                X_1 + X_2 + X_3 + X_4 = n
                $$
                and thus
                $$
                mathsf{E}((X_1 + X_2 + X_3 + X_4)^2) = sum_{i=1}^4 mathsf{E}(X_i^2) + sum_{i neq j} mathsf{E}(X_iX_j) = n^2 tag{$spadesuit$}
                $$
                Since each $X_i sim mathsf{Binomial}(n, 1/4)$, we have $mathsf{E}(X_i^2)=frac{3}{16}n + frac{1}{16}n^2$. Moreover, by symmetry, we have
                $$
                mathsf{E}(X_1X_2) = mathsf{E}(X_1X_3) =cdots = mathsf{E}(X_3X_4)
                $$
                Therefore, by $(spadesuit)$, we obtain
                $$
                mathsf{E}(X_1X_2) = mathsf{E}(X_1X_3) =cdots = mathsf{E}(X_3X_4) = frac{n^2 - frac{3}{4}n - frac{1}{4}n^2}{12} = frac{1}{16}(n^2 - n)
                $$
                Finally, we have
                $$
                mathsf{E}(D^2) = sum_{i=1}^4mathsf{E}(X_i^2) - 2mathsf{E}(X_1X_2) - 2mathsf{E}(X_3X_4) = frac{3}{4}n + frac{1}{4}n^2 - frac{1}{4}(n^2 - n) = n
                $$






                share|cite|improve this answer























                  up vote
                  2
                  down vote










                  up vote
                  2
                  down vote









                  It is easy to know that
                  $$
                  X_1 + X_2 + X_3 + X_4 = n
                  $$
                  and thus
                  $$
                  mathsf{E}((X_1 + X_2 + X_3 + X_4)^2) = sum_{i=1}^4 mathsf{E}(X_i^2) + sum_{i neq j} mathsf{E}(X_iX_j) = n^2 tag{$spadesuit$}
                  $$
                  Since each $X_i sim mathsf{Binomial}(n, 1/4)$, we have $mathsf{E}(X_i^2)=frac{3}{16}n + frac{1}{16}n^2$. Moreover, by symmetry, we have
                  $$
                  mathsf{E}(X_1X_2) = mathsf{E}(X_1X_3) =cdots = mathsf{E}(X_3X_4)
                  $$
                  Therefore, by $(spadesuit)$, we obtain
                  $$
                  mathsf{E}(X_1X_2) = mathsf{E}(X_1X_3) =cdots = mathsf{E}(X_3X_4) = frac{n^2 - frac{3}{4}n - frac{1}{4}n^2}{12} = frac{1}{16}(n^2 - n)
                  $$
                  Finally, we have
                  $$
                  mathsf{E}(D^2) = sum_{i=1}^4mathsf{E}(X_i^2) - 2mathsf{E}(X_1X_2) - 2mathsf{E}(X_3X_4) = frac{3}{4}n + frac{1}{4}n^2 - frac{1}{4}(n^2 - n) = n
                  $$






                  share|cite|improve this answer












                  It is easy to know that
                  $$
                  X_1 + X_2 + X_3 + X_4 = n
                  $$
                  and thus
                  $$
                  mathsf{E}((X_1 + X_2 + X_3 + X_4)^2) = sum_{i=1}^4 mathsf{E}(X_i^2) + sum_{i neq j} mathsf{E}(X_iX_j) = n^2 tag{$spadesuit$}
                  $$
                  Since each $X_i sim mathsf{Binomial}(n, 1/4)$, we have $mathsf{E}(X_i^2)=frac{3}{16}n + frac{1}{16}n^2$. Moreover, by symmetry, we have
                  $$
                  mathsf{E}(X_1X_2) = mathsf{E}(X_1X_3) =cdots = mathsf{E}(X_3X_4)
                  $$
                  Therefore, by $(spadesuit)$, we obtain
                  $$
                  mathsf{E}(X_1X_2) = mathsf{E}(X_1X_3) =cdots = mathsf{E}(X_3X_4) = frac{n^2 - frac{3}{4}n - frac{1}{4}n^2}{12} = frac{1}{16}(n^2 - n)
                  $$
                  Finally, we have
                  $$
                  mathsf{E}(D^2) = sum_{i=1}^4mathsf{E}(X_i^2) - 2mathsf{E}(X_1X_2) - 2mathsf{E}(X_3X_4) = frac{3}{4}n + frac{1}{4}n^2 - frac{1}{4}(n^2 - n) = n
                  $$







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Mar 8 '17 at 14:33









                  PSPACEhard

                  8,7901826




                  8,7901826






















                      up vote
                      0
                      down vote













                      Alternative way is to express each of $X_i$ as the sum of indicator r.v.: let $U_i, D_i, L_i, R_i$ equal to $1$ if at the $i$th step particle moves up, down, left and right correspondingly. For all $i$
                      $$U_i+ D_i+ L_i+ R_i = 1, U_iD_i=0, L_iR_i=0$$
                      $$X_1=sum_{i=1}^n U_i, X_2=sum_{i=1}^n D_i, X_3=sum_{i=1}^n L_i, X_4=sum_{i=1}^n R_i.$$
                      Calculate the expected value of $D^2$:
                      $$mathbb ED^2=mathbb Eleft(sum_{i=1}^n (U_i-D_i)right)^2+mathbb Eleft(sum_{i=1}^n (L_i-R_i)right)^2=2mathbb Eleft(sum_{i=1}^n (U_i-D_i)right)^2.$$
                      Use $mathbb EX^2=text{Var} X + (mathbb EX)^2$:
                      $$mathbb ED^2=2 text{Var}left(sum_{i=1}^n (U_i-D_i)right)+2left(mathbb Esum_{i=1}^n (L_i-R_i)right)^2=$$
                      $$mathbb ED^2=2left(sum_{i=1}^n text{Var}(U_i-D_i)right)+2biggl(sum_{i=1}^n underbrace{mathbb E(L_i-R_i)}_{0}biggr)^2=2n text{Var}(U_1-D_1)=2n mathbb E(U_1^2+D_1^2-2underbrace{U_1D_1}_0)=4n mathbb EU_1^2=4n mathbb EU_1=4ncdot 0.25=n.$$






                      share|cite|improve this answer

























                        up vote
                        0
                        down vote













                        Alternative way is to express each of $X_i$ as the sum of indicator r.v.: let $U_i, D_i, L_i, R_i$ equal to $1$ if at the $i$th step particle moves up, down, left and right correspondingly. For all $i$
                        $$U_i+ D_i+ L_i+ R_i = 1, U_iD_i=0, L_iR_i=0$$
                        $$X_1=sum_{i=1}^n U_i, X_2=sum_{i=1}^n D_i, X_3=sum_{i=1}^n L_i, X_4=sum_{i=1}^n R_i.$$
                        Calculate the expected value of $D^2$:
                        $$mathbb ED^2=mathbb Eleft(sum_{i=1}^n (U_i-D_i)right)^2+mathbb Eleft(sum_{i=1}^n (L_i-R_i)right)^2=2mathbb Eleft(sum_{i=1}^n (U_i-D_i)right)^2.$$
                        Use $mathbb EX^2=text{Var} X + (mathbb EX)^2$:
                        $$mathbb ED^2=2 text{Var}left(sum_{i=1}^n (U_i-D_i)right)+2left(mathbb Esum_{i=1}^n (L_i-R_i)right)^2=$$
                        $$mathbb ED^2=2left(sum_{i=1}^n text{Var}(U_i-D_i)right)+2biggl(sum_{i=1}^n underbrace{mathbb E(L_i-R_i)}_{0}biggr)^2=2n text{Var}(U_1-D_1)=2n mathbb E(U_1^2+D_1^2-2underbrace{U_1D_1}_0)=4n mathbb EU_1^2=4n mathbb EU_1=4ncdot 0.25=n.$$






                        share|cite|improve this answer























                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          Alternative way is to express each of $X_i$ as the sum of indicator r.v.: let $U_i, D_i, L_i, R_i$ equal to $1$ if at the $i$th step particle moves up, down, left and right correspondingly. For all $i$
                          $$U_i+ D_i+ L_i+ R_i = 1, U_iD_i=0, L_iR_i=0$$
                          $$X_1=sum_{i=1}^n U_i, X_2=sum_{i=1}^n D_i, X_3=sum_{i=1}^n L_i, X_4=sum_{i=1}^n R_i.$$
                          Calculate the expected value of $D^2$:
                          $$mathbb ED^2=mathbb Eleft(sum_{i=1}^n (U_i-D_i)right)^2+mathbb Eleft(sum_{i=1}^n (L_i-R_i)right)^2=2mathbb Eleft(sum_{i=1}^n (U_i-D_i)right)^2.$$
                          Use $mathbb EX^2=text{Var} X + (mathbb EX)^2$:
                          $$mathbb ED^2=2 text{Var}left(sum_{i=1}^n (U_i-D_i)right)+2left(mathbb Esum_{i=1}^n (L_i-R_i)right)^2=$$
                          $$mathbb ED^2=2left(sum_{i=1}^n text{Var}(U_i-D_i)right)+2biggl(sum_{i=1}^n underbrace{mathbb E(L_i-R_i)}_{0}biggr)^2=2n text{Var}(U_1-D_1)=2n mathbb E(U_1^2+D_1^2-2underbrace{U_1D_1}_0)=4n mathbb EU_1^2=4n mathbb EU_1=4ncdot 0.25=n.$$






                          share|cite|improve this answer












                          Alternative way is to express each of $X_i$ as the sum of indicator r.v.: let $U_i, D_i, L_i, R_i$ equal to $1$ if at the $i$th step particle moves up, down, left and right correspondingly. For all $i$
                          $$U_i+ D_i+ L_i+ R_i = 1, U_iD_i=0, L_iR_i=0$$
                          $$X_1=sum_{i=1}^n U_i, X_2=sum_{i=1}^n D_i, X_3=sum_{i=1}^n L_i, X_4=sum_{i=1}^n R_i.$$
                          Calculate the expected value of $D^2$:
                          $$mathbb ED^2=mathbb Eleft(sum_{i=1}^n (U_i-D_i)right)^2+mathbb Eleft(sum_{i=1}^n (L_i-R_i)right)^2=2mathbb Eleft(sum_{i=1}^n (U_i-D_i)right)^2.$$
                          Use $mathbb EX^2=text{Var} X + (mathbb EX)^2$:
                          $$mathbb ED^2=2 text{Var}left(sum_{i=1}^n (U_i-D_i)right)+2left(mathbb Esum_{i=1}^n (L_i-R_i)right)^2=$$
                          $$mathbb ED^2=2left(sum_{i=1}^n text{Var}(U_i-D_i)right)+2biggl(sum_{i=1}^n underbrace{mathbb E(L_i-R_i)}_{0}biggr)^2=2n text{Var}(U_1-D_1)=2n mathbb E(U_1^2+D_1^2-2underbrace{U_1D_1}_0)=4n mathbb EU_1^2=4n mathbb EU_1=4ncdot 0.25=n.$$







                          share|cite|improve this answer












                          share|cite|improve this answer



                          share|cite|improve this answer










                          answered Mar 8 '17 at 14:58









                          NCh

                          6,0882722




                          6,0882722






























                               

                              draft saved


                              draft discarded



















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2177597%2fexpected-value-of-square-of-distance-after-n-moves%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Quarter-circle Tiles

                              build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

                              Mont Emei