Pick a Number

Horace's picture

pick a numberIn this animation, the computer simulates a number of people $N$ choosing a number at random between 1 and $(\frac{N}{2})^2$. So, for example, it will simulate 400 people choosing a number between 1 and 40000.
How often would you expect it to pick the same number twice?

If you had Flash Player you would see that 400 people could choose a number between 1 and 40000, and there would be a duplicate around 80% of the time. Very surprising! You need to install the Adobe Flash Player to see the animation.
Click to enlarge the animation

Try it and see if it matches your guess. Click on the link below to see the animation in full screen.

In What are the chances? we show that the chance of there being no match is 13% when 20 people pick numbers between 1 and 100.

In Maths of coincidence we give a general formula that shows that the chance of there being no match is 13% whenever $(N/2)^2$ pick numbers at random between $1$ and $N$, whatever the choice of $N$.

Author(s): 
David Spiegelhalter

Post new comment

  • Lines and paragraphs break automatically.
  • Glossary terms will be automatically marked with links to their descriptions. If there are certain phrases or sections of text that should be excluded from glossary marking and linking, use the special markup, [no-glossary] ... [/no-glossary]. Additionally, these HTML elements will not be scanned: a, abbr, acronym, code, pre.
  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><b><i><u>

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image without spaces.