## Introduction

Flip five coins: Did you get a head? The answer that question is yes. Yes you did. And I'll wager being wrong about that once out of every 32 tries.

The interplay between chances and tries creates in a fuzzy way *when* a success will appear. The developer's expression of artistry is then to place those successes along a timeline that fits into their universe.

## The Amazing Shrinking Failure Rate

One toss of a coin does not directly affect another, but as we continue adding more tosses to an experiment the number of possible outcomes explodes.

<aside>
ðŸ’¡ With a growing number of potential results, the solitary tragic ending of all tails gets a shrinking slice of the possible outcomes pie.

</aside>

So we have the coin's chance of success/failure and a number of tries. And from those two we can work out the risk of an all-tails misadventure.

These three values form a relationship so any two define the third:

The shadow of success

$$
risk=failure^{tries}\\ \\ failure=risk^{\frac{1}{tries}} \\ tries=\frac{\log(risk)}{\log(failure)}
$$

Weighted coin tosses

### Example 1: How many animals should I take?

Let's say we're playing Rimworld and want to take just enough animals on our trip to assure getting a male and a female for breeding. How many is enough?

We know the chance of an animal being male or female is 50%, and we want to set the risk of a misadventure low. How low? This is an executive decision, and I like to use 95% certainty when no other option seems of particular merit. So 5% risk, 1 in 20 chances to be wrong. Roll 1d20.

$$
tries = \frac{log(risk)}{log(failure)}=\frac{log(1/20)}{log(50\%)}=4.3\ tries
$$

### Example 2: Is that gamble worth it?

An NPC offers a gambler's prize: Pay up front for a try and there's a 10% chance to get what I want each time. I can currently afford ten tries.

We know the chance of failure (90%) and the number of tries (10) so we can work out the risk of a misadventure.

$$
risk = failure^{tries} = 90\%^{10} = 34.9\%\ risk
$$

35% risk leaves 65% confidence Iâ€™ll win at least once, a bit better than a coin flip but not at all a reasonably certain outcome. Well below that 95% certainty I like so much, so I'll pass on it.

How many tries would it take for me to reconsider?

$$
tries=\frac{log(risk)}{log(failure)}=\frac{log(1/20)}{log(90\%)}=28.4 \ tries
$$