Let’s Bet

Prof Bill Buchanan OBE FRSE
3 min readJan 27, 2024

So, let’s make a bet. There are 100 balls in a bin, and 70 of them are red and the rest are blue. You cannot see the balls in the bin, and you should not replace them once they are drawn. I want you to bet £1,000 on each draw. For this, you will draw 10 balls from the bin each time. If you draw exactly seven red balls, I will give you £4,000, but if you have any other number, I will take your money. Do you take the bet?

A good bet?

To model, we can think of a large bin with a number of balls. Overall, there will be N red balls, and M-N blue balls (and where M is initially the number of balls in the bin). The number of red balls that we draw can then be defined by x, and after y samples, and is defined by a hypergeometric distribution:

Figure 1 [here]

In Figure 1, we make a sample of y balls, and then plot the probability of drawing x red balls. In this case, HyperGeometric (100, 700, 1000) defines that we sample 100 balls, and which has 700 red balls and 300 blue balls. The peak probability will at 70 red balls and 30 blue balls.

Overall, we have a generalised form of ProbHyperGeometric(k, trials, posEvents, size), and where k is the target number of balls, trails is the number of balls…

--

--

Prof Bill Buchanan OBE FRSE
Prof Bill Buchanan OBE FRSE

Written by Prof Bill Buchanan OBE FRSE

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.