If two distinct integers from 1 to 5 0 inclusive are chosen at random, what is the expected value of their product?
This problem is posed by Matt E .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Sorry, I'm not very experienced with Sigmas, so if somebody can answer my question, it would be extremely appreciated! How does one get from ∑ a = 1 5 0 ∑ b = 1 5 0 a b in the first equation to ( ∑ k = 1 5 0 k ) 2 ?
Thanks so much in advance!
Log in to reply
That's okay. :) I was going to explain my steps, but I figured I could do a proof without words and clarify in the comments. The expression
b = 1 ∑ 5 0 b
is equivalent to
1 + 2 + 3 + ⋯ + 5 0 .
Similarly,
b = 1 ∑ 5 0 2 ⋅ b = 2 ⋅ 1 + 2 ⋅ 2 + 2 ⋅ 3 + ⋯ + 2 ⋅ 5 0 .
Now, if I replace that 2 with the variable a , then
b = 1 ∑ 5 0 a ⋅ b = a ⋅ 1 + a ⋅ 2 + a ⋅ 3 + ⋯ + a ⋅ 5 0 .
Putting ∑ a = 1 5 0 in front means that I let a be all integers from 1 to 5 0 and take the sum of these 5 0 expressions:
a = 1 ∑ 5 0 b = 1 ∑ 5 0 a ⋅ b = + + ⋮ + = + + ⋮ + = = = = b = 1 ∑ 5 0 1 ⋅ b + b = 1 ∑ 5 0 2 ⋅ b + b = 1 ∑ 5 0 3 ⋅ b + ⋯ + b = 1 ∑ 5 0 5 0 ⋅ b ( 1 ⋅ 1 + 1 ⋅ 2 + 1 ⋅ 3 + ⋯ + 1 ⋅ 5 0 ) ( 2 ⋅ 1 + 2 ⋅ 2 + 2 ⋅ 3 + ⋯ + 2 ⋅ 5 0 ) ( 3 ⋅ 1 + 3 ⋅ 2 + 3 ⋅ 3 + ⋯ + 3 ⋅ 5 0 ) ( 5 0 ⋅ 1 + 5 0 ⋅ 2 + 5 0 ⋅ 3 + ⋯ + 5 0 ⋅ 5 0 ) 1 ⋅ ( 1 + 2 + 3 + ⋯ + 5 0 ) 2 ⋅ ( 1 + 2 + 3 + ⋯ + 5 0 ) 3 ⋅ ( 1 + 2 + 3 + ⋯ + 5 0 ) 5 0 ⋅ ( 1 + 2 + 3 + ⋯ + 5 0 ) ( 1 + 2 + 3 + ⋯ + 5 0 ) ⋅ ( 1 + 2 + 3 + ⋯ + 5 0 ) ( 1 + 2 + 3 + ⋯ + 5 0 ) 2 ( k = 1 ∑ 5 0 k ) 2 .
In all the solutions that use sigmas, how do you get the squares?
Probability of choosing the first integer and second integer of values I 1 and I 2 is 5 0 1 and 4 9 1 respectively.
The expected value of their product is
E [ X Y ] = i = 1 ∑ 5 0 j = 1 ∑ 5 0 i j 5 0 1 4 9 1 , with i = j
⇒ E [ X Y ] = 5 0 1 4 9 1 i = 1 ∑ 5 0 j = 1 ∑ 5 0 i j − 5 0 1 4 9 1 i = 1 ∑ 5 0 i 2
With the first summation allowing i = j to occur, and then we remove that occurence in the second summation
⇒ E [ X Y ] = 5 0 1 4 9 1 ( i = 1 ∑ 5 0 i ) 2 ( j = 1 ∑ 5 0 j ) 2 − 5 0 1 4 9 1 i = 1 ∑ 5 0 i 2
Apply the case for ∑ i = 2 n ( n + 1 ) , ∑ i 2 = 6 n ( n + 1 ) ( 2 n + 1 ) , we get E [ X Y ] = 6 4 6
Could you tell me more about the use of the formula? It is can be used to solve the other problem with same type like that with that formula?
Log in to reply
You mean this? ∑ i = 1 n i = 1 + 2 + 3 + … + n = 2 n ( n + 1 ) and ∑ i = 1 n i 2 = 1 2 + 2 2 + 3 2 + … + n 2 = 6 n ( n + 1 ) ( 2 n + 1 )
The solution is the total amount that can obtained from getting every possible integer multiplication and dividing that total to the number of possible integer pairs.
Sum of all possible pair multiplication thus is:
( 1 × 1 ) + ( 1 × 2 ) + . . . + ( 1 × 5 0 ) + ( 2 × 1 ) + ( 2 × 2 ) + . . . + ( 2 × 5 0 ) +
. . .
( 5 0 × 1 ) + ( 5 0 × 2 ) + . . . + ( 5 0 × 5 0 )
Which is equal to
( 1 × x = 1 ∑ 5 0 x ) + ( 2 × x = 1 ∑ 5 0 x ) + . . . + ( 5 0 × x = 1 ∑ 5 0 x )
which in turn is equal to:
( x = 1 ∑ 5 0 x ) × ( y = 1 ∑ 5 0 y ) = 2 5 0 × 5 1 × 2 5 0 × 5 1
This the total amount without regarding the distinctness of the pairs of integers. Therefore we must subtract every value where the pairs are the same:
2 5 0 × 5 1 × 2 5 0 × 5 1 − ( 1 × 1 + 2 × 2 + . . . + 5 0 × 5 0 ) = 2 5 0 × 5 1 × 2 5 0 × 5 1 − ( x = 1 ∑ 5 0 x 2 ) = 2 5 0 × 5 1 × 2 5 0 × 5 1 − 6 5 0 × 5 1 × 1 0 1
The total number of distinct integer pairs is given by: 5 0 × 4 9 Thus the expected value of their product would be:
( 2 5 0 × 5 1 × 2 5 0 × 5 1 − 6 5 0 × 5 1 × 1 0 1 ) ÷ ( 5 0 × 4 9 ) = 6 4 6
For the sake of generality, expand the range of integers to n
The answer is obviously
∑ k = 1 n − 1 k ∑ 1 ≤ i < j ≤ n i j = ∑ k = 1 n − 1 k ∑ j = 2 n ∑ i = 1 j − 1 i j = 1 2 3 n 2 + 5 n + 2
Plug n = 5 0 in and the result is 646
The second step is not obvious.
Log in to reply
It is. Just put i and j respectively on the x and y axis of the 2D plane. Running through all points (i,j) such that i<j is running through all the points that lie strictly above the y=x axis. To do so set first the value of j (hence the ∑ j = 2 n ) and then with j being set, set the values of i that range from 1 to j-1. Hence the inside ∑ i = 1 j − 1
Log in to reply
What I meant is that you should have shown it in your solution (after all, that is the heart of this problem).
We first compute the sum of the product of the integers in every possible ordered pair.
We denote the ordered pairs as ( a , b ) . If we have a given a , then the sum of all possible products is ( 1 ) ( 1 + 2 + . . . + 5 0 ) = ( a ) 2 ( 5 0 ) ( 5 1 ) . Hence the sum of the product of the integers in every possible ordered pair is ( 1 + 2 + . . . + 5 0 ) 2 ( 5 0 ) ( 5 1 ) =(\frac{(50)(51}{2})^2 )=1,625,625.
Now we compute the sum of the product of the integers in the ordered pairs where the 2 number are distinct. From the previous sum, we deduct the sum of the product of the integers of the ordered pairs where the 2 numbers are the same. That sum if 1 2 + 2 2 + . . . + 5 0 2 = 6 ( 5 0 ) ( 5 1 ) ( 1 0 1 ) = 4 2 , 9 2 5 . Hence, the remaining sum is 1,582,700. But each unordered pairs counts in 2 ordered pairs, so the sum of the product of the integers in every ordered pair with 2 distinct numbers is 2 1 , 5 8 2 , 7 0 0 = 7 9 1 , 3 5 0 , (which is different from the first), so there are a total of 2 , 4 5 0 ordered pairs, so a total of 2 2 , 4 5 0 = 1 , 2 7 5 unordered pairs.
Hence the expected value of their product is 1 , 2 7 5 7 9 1 , 3 5 0 = 6 4 6
whoops: (\ frac{(50)(51}{2})^2 )=1,625,625 should be ( 2 ( 5 0 ) ( 5 1 ) ) 2 = 1 , 6 2 5 , 6 2 5
Log in to reply
And also, just a small typo, there are 1225 unordered pairs, not 1275.
While trying to manually calculate the summations, I noticed that each time int a (the multipliers (1 and 2) in 1(2 + 3 + .... + 50) = 1 52 49 (by arithmetic series formula n (a1 + an) -> 2(3 + 4 .... 50) = 2 53*48 ... ) goes up by one each increment, int b, the sum of lowest value and highest value (2+50, 3+50) also goes up by one each increment. Int c, the count of how many terms goes down by 1 each time.
I disregard the divide by 2 in arithmetic series since the denominator of 50c2 is 50*49/2 so i disregard the div by 2 in both numerator and denominator.
int a = 1;
int b = 52;
int c = 49;
int n = 0;
while(c>=1)
{
n = n+a*b*c;
a++;
b++;
c--;
}
System.out.println(n/50/49);
We begin by choosing two (not necessarily distinct) integers from 1 to 50. The sum of all such possible pairs is ( 2 5 0 ( 5 0 + 1 ) ) 2 = 1 2 7 5 2 . We now consider the criterion of distinct integers by removing the cases where the numbers of the same, 1 2 7 5 2 − 6 5 0 ( 5 0 + 1 ) ( 2 ⋅ 5 0 + 1 ) . To find the expected value, we divide by the number of cases, 5 0 ⋅ 4 9 1 2 7 5 2 − 4 2 9 2 5 = 6 4 6 .
Since we are getting the expected value of a finite number of data points, we simply average it. To get the sum of ALL the possible values, we make use of the idea of a method similar to "foil": sum = (1+2+3+....+50)(1+2+3+....+50) but take note that 1^2, 2^2, 3^2, .., 50^2 are included in the sum, so we'll have to subtract them
real sum = (1+2+3+....+50)^2 - (1^2 + 2^2 + 3^2 + .. +50^2)
We can solve for these easily by using their respective formula:
real sum = (51 50/2)^2 - (50 51*101)/6 real sum = 1 582 700
The number of terms are 50 49 because they are distinct, and the way we computed for the sum considers the orders of the terms (e.g. 1 50 AND 50*1 were included in the sum).
Therefore, E(x) = 1 582 700/(49*50) = 646
Let A be the sum of the product of distinct integers from 1 to 50. The desired expected value is easily seen to be 5 0 × 4 9 2 A since we pick one number of 50 then another of 49, and we can do it in either order. This quantity can be quickly calculated by noting that the cross terms of ( 1 + 2 + ⋯ + 5 0 ) 2 are precisely 2 A . Thus, our answer is
2 4 5 0 ( 1 + 2 + ⋯ + 5 0 ) 2 − ( 1 2 + 2 2 + ⋯ + 5 0 2 ) = 2 4 5 0 ( 2 5 0 × 5 1 ) 2 − 6 5 0 × 5 1 × 1 0 1 = 6 4 6 .
The EV is going to have a denominator of 50 choose 2 = 25*49, and a numerator of ∑ i , j i ∗ j = ∑ i = 1 5 0 i ∗ ∑ j > i 5 0 = ∑ i = 1 5 0 i ∗ ( 2 5 0 ( 5 1 ) − 2 i ( i + 1 ) )
= ( 2 5 ∗ 5 1 ) 2 − ( 2 1 ) ∗ ∑ i = 1 5 0 i 3 + i 2
= ( 2 5 ∗ 5 1 ) 2 − ( 2 1 ) ( 2 5 0 ∗ 5 1 ) 2 + 6 5 0 ∗ 5 1 ∗ 1 0 1 ) = 7 9 1 3 5 0
So the EV is: = ( 7 9 1 3 5 0 ) / ( 2 5 ∗ 4 9 ) = 6 4 6 as desired.
Problem Loading...
Note Loading...
Set Loading...
E = 5 0 ⋅ 4 9 a = 1 ∑ 5 0 b = 1 ∑ 5 0 a b − k = 1 ∑ 5 0 k 2 = 5 0 ⋅ 4 9 ( k = 1 ∑ 5 0 k ) 2 − k = 1 ∑ 5 0 k 2 = 5 0 ⋅ 4 9 ( 2 5 0 ⋅ 5 1 ) 2 − 6 5 0 ⋅ 5 1 ⋅ 1 0 1 = 5 0 ⋅ 4 9 3 2 ⋅ 5 4 ⋅ 1 7 2 − 5 2 ⋅ 1 7 ⋅ 1 0 1 = 5 0 ⋅ 4 9 5 2 ⋅ 1 7 ( 3 2 ⋅ 5 2 ⋅ 1 7 − 1 0 1 ) = 2 ⋅ 5 2 ⋅ 7 2 2 2 ⋅ 5 2 ⋅ 7 2 ⋅ 1 7 ⋅ 1 9 = 2 ⋅ 1 7 ⋅ 1 9 = 6 4 6