Subject

Crude Lockbox Simulation or Explaining Random Number Generators

Random Number Generators ( RNG ) and Probability can be confusing. To help illustrate the basic principles, we are going to set up a crude Lockbox simulation using a coin with one side designated “Heads” and the other “Tails”.

For this simulation a Sports Lockbox has the following odds:

1 in 20 chance of a Team Hat

1 in 200 chance of a Fancy Team Hat

Failure in our simulator is Tails. A coin flip has a 1 in 2 chance of being Tails. Resulting in the following simulation:

Tails equals 10 failed Sports Lockbox attempts to get a Team Hat ( 20 / 2 ).

Tails equals 100 failed Sports Lockbox attempts to get a Fancy Team Hat ( 200 / 2).

First, we are simulating getting a Team Hat ( Tails = 10 failed attempts ) from Sports Lockbox.

Take a break from reading this Post and flip a coin, I will wait. How many flips did it take you before you got a Heads result in the coin flip?

Note: if you have trouble flipping a coin, instead get a plastic cup and a six sided die. Put the single six sided die in the cup, rattle it around, and roll it into an empty box. When it stops rolling, if the top side shows an odd number ( 1, 3, or 5 ), it is Tails. An even number ( 2, 4, or 6 ) is Heads.

Hat Examples:

If your first flip was Heads, then in the simulation it took you 1- 9 attempts in Sports Lockbox to get a Hat.

If you flipped Tails, Tails, and then Heads, in the simulation it took you 21- 29 attempts in Sports Lockbox to get a Hat.

If you flipped Tails, Tails, Tails, Tails, and then Heads, in the simulation it took you 41- 49 attempts in Sports Lockbox to get a Hat.

To demonstrate how this can vary from character to character, repeat this five times. How many flips did it take each time to get Heads?

Next, we are simulating getting a Fancy Team Hat ( Tails = 100 failed attempts ) from Sports Lockbox.

Take a break from reading this Post and flip a coin ( or a die roll ), I will wait. How many flips did it take you before you got a Heads result in the coin flip ( or an even number result in the die roll )?

Fancy Hat Examples:

If your first flip was Heads, then in the simulation it took you 1- 99 attempts in Sports Lockbox to get a Fancy Hat.

If you flipped Tails, Tails, and then Heads, in the simulation it took you 201- 299 attempts in Sports Lockbox to get a Fancy Hat.

If you flipped Tails, Tails, Tails, Tails, and then Heads, in the simulation it took you 401- 499 attempts in Sports Lockbox to get a Fancy Hat.

To demonstrate how this can vary from character to character, repeat this five times. How many flips did it take each time to get Heads?

Let us say that 10,000 people play Sports Lockbox. The first time a person opens Sports Lockbox, they may win the Hat. With RNG it is impossible to know what will happen until you open the Sports Lockbox. But you can say what will happen with large groups of people and many attempts at Sports Lockbox. Examining the Sports Lockbox data, half of the people ( 5,000 ) will take 1- 9 attempts to get the Hat, but half ( 5,000 ) will take 10+ attempts. A handful of players ( 10- 20 ) will take 91+ attempts to get the Hat.

Half of the people ( 5,000 ) will take 1- 99 attempts to get the Fancy Hat, but half ( 5,000 ) will take 100+ attempts. A handful of players ( 10- 20 ) will take 901+ attempts to get the Fancy Hat.

( teasing ) If both sides of your coin were identical “Heads”, then congratulations, you were booted from the game for cheating ( end teasing ).