## Drawing Two Bingo Balls

A forum for good logic/math puzzles.

Moderators: jestingrabbit, Moderators General, Prelates

DataGenetics
Posts: 24
Joined: Sat Jan 01, 2011 1:12 am UTC
Location: Seattle

### Drawing Two Bingo Balls

A set of bingo balls contains the numbers 1-75.

From a fully shuffled set of bingo balls, you draw one number. Without replacing this ball, you draw a second number. If you win a prize equal to the value of the highest number you draw, what is your expected return?

ThirdParty
Posts: 337
Joined: Wed Sep 19, 2012 3:53 pm UTC
Location: USA

### Re: Drawing Two Bingo Balls

Spoiler:

Code: Select all

<script language="JavaScript">
var a; var b; var count = 0; var sum = 0;
for (a = 1; a <= 75; ++a) {
for (b = 1; b <= 75; ++b) {
if (a != b) {
++count;
if (a > b) { sum += a; } else { sum += b; }
}
}
}
return (sum/count);
}
</script>
<script language="JavaScript">
</script>
</body></html>
A slightly more elegant, but still unsatisfying, approach is:
Spoiler:
There are 5550 different possibilities. (i.e. 75 for the first ball and 74 for the second). We can find their sum by adding up all the cases where the first ball drawn is higher than the second--0 cases worth 1 point, 1 case worth 2 points, 2 cases worth 3 points, etc., up to 74 cases worth 75 points--and then multiplying by 2 to account for the cases where the second is higher:

Code: Select all

<script language="JavaScript">
var a; var sum = 0;
for (a = 2; a <= 75; ++a) {
sum += a*(a-1)*2;
}
return (sum);
}
</script>
<script language="JavaScript">
</script>
</body></html>
The sum is 281200. So that means the average payoff is 281200/5550 = 50⅔.

Demki
Posts: 199
Joined: Fri Nov 30, 2012 9:29 pm UTC

### Re: Drawing Two Bingo Balls

ThirdParty wrote:The first solution that came to mind was this rather-inelegant one:
Spoiler:

Code: Select all

<script language="JavaScript">
var a; var b; var count = 0; var sum = 0;
for (a = 1; a <= 75; ++a) {
for (b = 1; b <= 75; ++b) {
if (a != b) {
++count;
if (a > b) { sum += a; } else { sum += b; }
}
}
}
return (sum/count);
}
</script>
<script language="JavaScript">
</script>
</body></html>
A slightly more elegant, but still unsatisfying, approach is:
Spoiler:
There are 5550 different possibilities. (i.e. 75 for the first ball and 74 for the second). We can find their sum by adding up all the cases where the first ball drawn is higher than the second--0 cases worth 1 point, 1 case worth 2 points, 2 cases worth 3 points, etc., up to 74 cases worth 75 points--and then multiplying by 2 to account for the cases where the second is higher:

Code: Select all

<script language="JavaScript">
var a; var sum = 0;
for (a = 2; a <= 75; ++a) {
sum += a*(a-1)*2;
}
return (sum);
}
</script>
<script language="JavaScript">
</script>
</body></html>
The sum is 281200. So that means the average payoff is 281200/5550 = 50⅔.

Spoiler:
Instead of looping through all the cases(there aren't many, but still), here is the solution for N balls.
number of cases = 2 * sum of n from 1 to N-1 = (N-1)*N
total worth of all cases = 2 * sum of n(n+1) from 1 to N-1 = 2 * sum of n^2+n from 1 to N-1
total worth of all cases = 2 * (sum of n^2 from 1 to N-1 + sum of n from 1 to N-1) = 2 * ((N-1)*N*(2N-1)/6 + N*(N-1)/2)
total worth of all cases = 2/3*(N-1)*N*(N+1)
expected payoff = (total worth of all cases)/(number of cases) = 2/3 * (N-1)*N*(N+1)/((N-1)*N) = 2(N+1)/3

For 75 balls: 2*(75+1)/3=152/3=50⅔

ThirdParty
Posts: 337
Joined: Wed Sep 19, 2012 3:53 pm UTC
Location: USA

### Re: Drawing Two Bingo Balls

Yeah, that's better. Good job.