For the simulation to work one has to assume that a coin toss has a 50% chance of landing on heads and a 50% chance of landing on tails. If this is not true then the trial will not be a true half-life because more or less than half of the atoms will decay.
In the simulation each half-life was represented by a coin toss. This is because each coin toss each atom(coin) had a 50% chance of decaying into another element. This is what defines a half-life.
Mathematically one would expect there to