Matt's expected value

If two distinct integers from 1 1 to 50 50 inclusive are chosen at random, what is the expected value of their product?

This problem is posed by Matt E .


The answer is 646.

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.

10 solutions

Tim Vermeulen
Aug 19, 2013

E = a = 1 50 b = 1 50 a b k = 1 50 k 2 50 49 = ( k = 1 50 k ) 2 k = 1 50 k 2 50 49 = ( 50 51 2 ) 2 50 51 101 6 50 49 = 3 2 5 4 1 7 2 5 2 17 101 50 49 = 5 2 17 ( 3 2 5 2 17 101 ) 50 49 = 2 2 5 2 7 2 17 19 2 5 2 7 2 = 2 17 19 = 646 \begin{aligned} E &= \frac{\sum\limits_{a=1}^{50} {\sum\limits_{b=1}^{50} {a b}} - \sum\limits_{k=1}^{50} k^2}{50 \cdot 49} \\[1em] &= \frac{\left( \sum\limits_{k=1}^{50} k \right) ^2 - \sum\limits_{k=1}^{50} k^2}{50 \cdot 49} \\[1em] &= \frac{\left( \frac{50 \cdot 51}{2} \right) ^2 - \frac{50 \cdot 51 \cdot 101}{6}}{50 \cdot 49} \\[1em] &= \frac{3^2 \cdot 5^4 \cdot 17^2 - 5^2\cdot 17 \cdot 101}{50 \cdot 49} \\[1em] &= \frac{5^2 \cdot 17 ( 3^2 \cdot 5^2 \cdot 17 - 101)}{50 \cdot 49} \\[1em] &= \frac{2^2 \cdot 5^2 \cdot 7^2 \cdot 17 \cdot 19}{2 \cdot 5^2 \cdot 7^2} \\[1em] &= 2 \cdot 17 \cdot 19 \\[1em] &= \boxed{646} \end{aligned}

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 50 b = 1 50 a b \sum_{a=1}^{50} \sum_{b=1}^{50} ab in the first equation to ( k = 1 50 k ) 2 \left( \sum_{k=1}^{50} k \right)^2 ?

Thanks so much in advance!

Andrew Ying - 7 years, 9 months ago

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 50 b \sum\limits_{b=1}^{50} b

is equivalent to

1 + 2 + 3 + + 50. 1 + 2 + 3 + \dots + 50.

Similarly,

b = 1 50 2 b = 2 1 + 2 2 + 2 3 + + 2 50. \sum\limits_{b=1}^{50} 2 \cdot b = 2 \cdot 1 + 2 \cdot 2 + 2 \cdot 3 + \dots + 2 \cdot 50.

Now, if I replace that 2 2 with the variable a a , then

b = 1 50 a b = a 1 + a 2 + a 3 + + a 50. \sum\limits_{b=1}^{50} a \cdot b = a \cdot 1 + a \cdot 2 + a \cdot 3 + \dots + a \cdot 50.

Putting a = 1 50 \sum_{a=1}^{50} in front means that I let a a be all integers from 1 1 to 50 50 and take the sum of these 50 50 expressions:

a = 1 50 b = 1 50 a b = b = 1 50 1 b + b = 1 50 2 b + b = 1 50 3 b + + b = 1 50 50 b = ( 1 1 + 1 2 + 1 3 + + 1 50 ) + ( 2 1 + 2 2 + 2 3 + + 2 50 ) + ( 3 1 + 3 2 + 3 3 + + 3 50 ) + ( 50 1 + 50 2 + 50 3 + + 50 50 ) = 1 ( 1 + 2 + 3 + + 50 ) + 2 ( 1 + 2 + 3 + + 50 ) + 3 ( 1 + 2 + 3 + + 50 ) + 50 ( 1 + 2 + 3 + + 50 ) = ( 1 + 2 + 3 + + 50 ) ( 1 + 2 + 3 + + 50 ) = ( 1 + 2 + 3 + + 50 ) 2 = ( k = 1 50 k ) 2 . \begin{aligned} \sum\limits_{a=1}^{50} \sum\limits_{b=1}^{50} a \cdot b &= \sum\limits_{b=1}^{50} 1 \cdot b + \sum\limits_{b=1}^{50} 2 \cdot b + \sum\limits_{b=1}^{50} 3 \cdot b + \dots + \sum\limits_{b=1}^{50} 50 \cdot b \\[1em] = &(1 \cdot 1 + 1 \cdot 2 + 1 \cdot 3 + \dots + 1 \cdot 50) \\ + &(2 \cdot 1 + 2 \cdot 2 + 2 \cdot 3 + \dots + 2 \cdot 50) \\ + &(3 \cdot 1 + 3 \cdot 2 + 3 \cdot 3 + \dots + 3 \cdot 50) \\ \vdots \\ + &(50 \cdot 1 + 50 \cdot 2 + 50 \cdot 3 + \dots + 50 \cdot 50) \\[1em] = &1 \cdot (1 + 2 + 3 + \dots + 50) \\ + &2 \cdot (1 + 2 + 3 + \dots + 50) \\ + &3 \cdot (1 + 2 + 3 + \dots + 50) \\ \vdots \\ + &50 \cdot (1 + 2 + 3 + \dots + 50) \\[1em] = &(1 + 2 + 3 + \dots + 50) \cdot (1 + 2 + 3 + \dots + 50) \\ = &(1 + 2 + 3 + \dots + 50)^2 \\[1em] = &\left( \sum\limits_{k=1}^{50} k \right)^2. \end{aligned}

Tim Vermeulen - 7 years, 9 months ago

In all the solutions that use sigmas, how do you get the squares?

yoo yoo - 7 years, 9 months ago

Log in to reply

Could you be more specific?

Tim Vermeulen - 7 years, 9 months ago
Pi Han Goh
Aug 19, 2013

Probability of choosing the first integer and second integer of values I 1 I_1 and I 2 I_2 is 1 50 \frac {1}{50} and 1 49 \frac {1}{49} respectively.

The expected value of their product is

E [ X Y ] = i = 1 50 j = 1 50 i j 1 50 1 49 E[XY] = \displaystyle \sum_{i=1}^{50} \sum_{j=1}^{50} \space i j \frac {1}{50} \space \frac {1}{49} , with i j i \ne j

E [ X Y ] = 1 50 1 49 i = 1 50 j = 1 50 i j 1 50 1 49 i = 1 50 i 2 \Rightarrow E[XY] = \frac {1}{50} \space \frac {1}{49} \displaystyle \sum_{i=1}^{50} \sum_{j=1}^{50} ij - \frac {1}{50} \space \frac {1}{49} \displaystyle \sum_{i=1}^{50} i^2

With the first summation allowing i = j i=j to occur, and then we remove that occurence in the second summation

E [ X Y ] = 1 50 1 49 ( i = 1 50 i ) 2 ( j = 1 50 j ) 2 1 50 1 49 i = 1 50 i 2 \Rightarrow E[XY] = \frac {1}{50} \space \frac {1}{49} ( \displaystyle \sum_{i=1}^{50} i )^2 ( \sum_{j=1}^{50} j )^2 - \frac {1}{50} \space \frac {1}{49} \displaystyle \sum_{i=1}^{50} i^2

Apply the case for i = n 2 ( n + 1 ) \sum i = \frac {n}{2} (n+1) , i 2 = n 6 ( n + 1 ) ( 2 n + 1 ) \sum i^2 = \frac {n}{6} (n+1)(2n+1) , we get E [ X Y ] = 646 E[XY] = \boxed{646}

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?

Dani Natanael - 7 years, 9 months ago

Log in to reply

You mean this? i = 1 n i = 1 + 2 + 3 + + n = n 2 ( n + 1 ) \sum_{i=1}^n i = 1 + 2 + 3 + \ldots + n = \frac {n}{2} \space (n+1) and i = 1 n i 2 = 1 2 + 2 2 + 3 2 + + n 2 = n 6 ( n + 1 ) ( 2 n + 1 ) \sum_{i=1}^n i^2 = 1^2 + 2^2 + 3^2 + \ldots + n^2 = \frac {n}{6} \space (n+1)(2n+1)

Pi Han Goh - 7 years, 9 months ago
Isik Oz
Aug 21, 2013

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 × 50 ) + (1 \times 1) + (1 \times 2) + ... + (1 \times 50) + ( 2 × 1 ) + ( 2 × 2 ) + . . . + ( 2 × 50 ) + (2 \times 1) + (2 \times 2) + ... + (2 \times 50) +

. . . ...

( 50 × 1 ) + ( 50 × 2 ) + . . . + ( 50 × 50 ) (50 \times 1) + (50 \times 2) + ... + (50 \times 50)

Which is equal to

( 1 × x = 1 50 x ) + ( 2 × x = 1 50 x ) + . . . + ( 50 × x = 1 50 x ) (1 \times \sum\limits_{x=1}^{50} x) + (2 \times \sum\limits_{x=1}^{50} x) + ... + (50 \times \sum\limits_{x=1}^{50} x)

which in turn is equal to:

( x = 1 50 x ) × ( y = 1 50 y ) (\sum\limits_{x=1}^{50} x) \times (\sum\limits_{y=1}^{50} y) = 50 × 51 2 × 50 × 51 2 = \frac{50 \times 51}{2} \times \frac{50 \times 51}{2}

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:

50 × 51 2 × 50 × 51 2 ( 1 × 1 + 2 × 2 + . . . + 50 × 50 ) \frac{50 \times 51}{2} \times \frac{50 \times 51}{2} - (1\times 1 + 2\times 2 + ... + 50 \times 50) = 50 × 51 2 × 50 × 51 2 ( x = 1 50 x 2 ) =\frac{50 \times 51}{2} \times \frac{50 \times 51}{2} - (\sum\limits_{x=1}^{50} x^2) = 50 × 51 2 × 50 × 51 2 50 × 51 × 101 6 = \frac{50 \times 51}{2} \times \frac{50 \times 51}{2} - \frac{50 \times 51 \times 101}{6}

The total number of distinct integer pairs is given by: 50 × 49 50 \times 49 Thus the expected value of their product would be:

( 50 × 51 2 × 50 × 51 2 50 × 51 × 101 6 ) ÷ ( 50 × 49 ) \big(\frac{50 \times 51}{2} \times \frac{50 \times 51}{2} - \frac{50 \times 51 \times 101}{6}\big) \div (50 \times 49) = 646 =646

Gabriel Romon
Aug 19, 2013

For the sake of generality, expand the range of integers to n n

The answer is obviously

1 i < j n i j k = 1 n 1 k = j = 2 n i = 1 j 1 i j k = 1 n 1 k = 3 n 2 + 5 n + 2 12 \frac { \sum_{1\leq i<j\leq n}ij}{\sum_{k=1}^{n-1} k} = \frac{\sum_{j=2}^n\sum_{i=1}^{j-1} ij} {\sum_{k=1}^{n-1} k } = \frac {3n^{2}+5n+2}{12}

Plug n = 50 n=50 in and the result is 646

The second step is not obvious.

Sreejato Bhattacharya - 7 years, 9 months ago

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 \sum_{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 \sum_{i=1}^{j-1}

Gabriel Romon - 7 years, 9 months ago

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).

Sreejato Bhattacharya - 7 years, 9 months ago
Russell Few
Aug 18, 2013

We first compute the sum of the product of the integers in every possible ordered pair.

We denote the ordered pairs as ( a , b ) (a,b) . If we have a given a a , then the sum of all possible products is ( 1 ) ( 1 + 2 + . . . + 50 ) = ( a ) ( 50 ) ( 51 ) 2 (1)(1+2+...+50)=(a)\frac{(50)(51)}{2} . Hence the sum of the product of the integers in every possible ordered pair is ( 1 + 2 + . . . + 50 ) ( 50 ) ( 51 ) 2 (1+2+...+50)\frac{(50)(51)}{2} =(\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 = ( 50 ) ( 51 ) ( 101 ) 6 = 42 , 925 1^2+2^2+...+50^2=\frac{(50)(51)(101)}{6}=42,925 . Hence, the remaining sum is 1,582,700. But each unordered pairs counts in 2 2 ordered pairs, so the sum of the product of the integers in every ordered pair with 2 2 distinct numbers is 1 , 582 , 700 2 = 791 , 350 \frac{1,582,700}{2}=791,350 , (which is different from the first), so there are a total of 2 , 450 2,450 ordered pairs, so a total of 2 , 450 2 = 1 , 275 \frac{2,450}{2}=1,275 unordered pairs.

Hence the expected value of their product is 791 , 350 1 , 275 = 646 \frac{791,350}{1,275}=\boxed{646}

whoops: (\ frac{(50)(51}{2})^2 )=1,625,625 should be ( ( 50 ) ( 51 ) 2 ) 2 = 1 , 625 , 625 (\frac{(50)(51)}{2})^2 =1,625,625

Russell FEW - 7 years, 9 months ago

Log in to reply

And also, just a small typo, there are 1225 unordered pairs, not 1275.

Anh Tuong Nguyen - 7 years, 9 months ago
Steven Lee
Aug 5, 2015

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);

That's a good observation. Why is that observation true?

Calvin Lin Staff - 5 years, 10 months ago
Justin Yang
Aug 25, 2013

We begin by choosing two (not necessarily distinct) integers from 1 to 50. The sum of all such possible pairs is ( 50 ( 50 + 1 ) 2 ) 2 = 127 5 2 . \left(\frac{50\left(50 + 1\right)}{2}\right)^2 = 1275^2. We now consider the criterion of distinct integers by removing the cases where the numbers of the same, 127 5 2 50 ( 50 + 1 ) ( 2 50 + 1 ) 6 . 1275^2 - \frac{50\left(50 + 1\right)\left(2 \cdot 50 + 1\right)}{6}. To find the expected value, we divide by the number of cases, 127 5 2 42925 50 49 = 646. \frac{1275^2 - 42925}{50 \cdot 49} = 646.

Leandre Noel Kiu
Aug 24, 2013

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

Eric Edwards
Aug 22, 2013

Let A A be the sum of the product of distinct integers from 1 to 50. The desired expected value is easily seen to be 2 A 50 × 49 \frac{2A}{50\times49} 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 + + 50 ) 2 (1+2+\cdots+50)^2 are precisely 2 A 2A . Thus, our answer is

( 1 + 2 + + 50 ) 2 ( 1 2 + 2 2 + + 5 0 2 ) 2450 = ( 50 × 51 2 ) 2 50 × 51 × 101 6 2450 = 646 \frac{(1+2+\cdots+50)^2 - (1^2+2^2+\cdots+50^2)}{2450} = \frac{(\frac{50 \times 51}{2})^2 - \frac{50\times 51 \times 101}{6}}{2450} = 646 .

Alex Wice
Aug 18, 2013

The EV is going to have a denominator of 50 choose 2 = 25*49, and a numerator of i , j i j = i = 1 50 i j > i 50 = i = 1 50 i ( 50 ( 51 ) 2 i ( i + 1 ) 2 ) \sum_{i,j} i*j = \sum_{i=1}^{50} i*\sum_{j>i}^{50} = \sum_{i=1}^{50} i * (\frac{50(51)}{2} - \frac{i(i+1)}{2} )

= ( 25 51 ) 2 ( 1 2 ) i = 1 50 i 3 + i 2 = (25*51)^2 - (\frac{1}{2} )*\sum_{i=1}^{50} i^3 + i^2

= ( 25 51 ) 2 ( 1 2 ) ( 50 51 2 ) 2 + 50 51 101 6 ) = 791350 = (25*51)^2 - (\frac{1}{2})(\frac{50*51}{2})^2 + \frac{50*51*101}{6}) = 791350

So the EV is: = ( 791350 ) / ( 25 49 ) = 646 = (791350)/(25*49) = 646 as desired.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...