1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Probability question

  1. Mar 8, 2010 #1
    1. The problem statement, all variables and given/known data
    Let [tex] x_1,x_2,...x_8 [/tex] be a random permutation of the set [/tex] {1,2,3,4,5,6,7,8} and [tex] S= (x_1-x_2)^2+(x_2-x_3)^2+(x_3-x_4)^2+...+(x_7-x_8)^2 [/tex]
    Calculate the expected value of S.

    3. The attempt at a solution
    I've given this over an hour of thougt. I have no idea how to aproach this.
  2. jcsd
  3. Mar 8, 2010 #2


    User Avatar
    Gold Member

    I take it you did not bother simulating this in MatLab..

    Code (Text):

    C = 0;
    for i=1:10000000
    S = ((X(1)-X(2))^2 + (X(2)-X(3))^2 + (X(3)-X(4))^2 + (X(4)-X(5))^2 + (X(5)-X(6))^2 + (X(6)-X(7))^2 + (X(7)-X(8))^2);
    C = C + S;

    ans =

  4. Mar 11, 2010 #3
    It's the evening before my exam and I finally figured it out. Heres an outline of a solution:

    first calculate [tex] E[(x-y)^2|x \neq y] [/tex]
    There are 8 ways for x=y out of 6 so all of the other events have a chance of 1/56.
    Drawing a joint distribution table it is easy to find the probobalities of the different values of x-y and then calculate the expected value of the above expression which is 12.

    Now notice that in a permutation [tex] x_i \neq y_j [/tex].
    We just calculated the expected value of [tex] (x_j-x_i)^2 [/tex] for a specific j and i.
    So lets make an indicator random variable L. the expected value of L is 12. But the sum we are looking for is the sum of 7 such indicators and since the expected value of a sum is the sum of the expected values the result is 7*12=84.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook