# Sullivan’s Law

I was bored during COVID-19 shelter-in-place, so I invented a mathematical law dealing with probabilities. I was deprived of enough human contact that I named it after myself.

The inspirational spark

I recently witnessed the following conversation between two friends on Zoom:

Friend #1: “Imagine I roll a six-sided die. What is the probability of rolling a 6?”

Friend #2: “One in six.”

Friend #1: “What if I rolled two dice?”

Friend #2: “Your chances would double. So two in six.”

Friend #1: “By that logic, if I rolled six dice, I’d have six times a one in six chance? That’s six in six or 100%.”

Friend #2: “No, that can’t be right.”

Friend #1: “No…”

Apart from having nerdy friends, this made me investigate how you would calculate probabilities of rolling dice. In particular, I wanted to relearn for myself how to determine the probability of rolling at least one six with six dice.

Luckily there’s a formula available for just such an endeavor that’s easily Google-able: the Binomial Distribution Formula. For normal people that haven’t heard of the Binomial Distribution Formula or have forgotten it from a long-ago math class, it’s written below:

To break down the formula into its component component parts:

• x = the number of successful outcomes
• n = the number of trials attempted to get a successful outcome
• p = the probability that a successful outcome happens in a single trial
• q = the probability that a successful outcome does not happen in a single trial. Since a trial must be either successful or not successful another way to think of this is as 100% — p = q.
• P(x) = the probability of successful outcomes over a series of trials
• (n x) = a shortened way of writing n! / (n-x)!x! which you might recognize as the combination formula.

It’s also worth noting that binomial distributions suppose there is (a) only one outcome for each trial, (b) each trial has the same probability of success, and (c) trials are independent of each other. In other words, if one considers rolling dice you can (a) only get a single number 1–6 per die, (b) each side of the die has a 1/6 chance of being landed on — e.g. no loaded dice, and (c) rolling one die has no impact on rolling another die.

The probability of rolling a six with a single die is therefore pretty simple. I use 1/6 for p and 5/6 for q since those represent the odds of rolling or not rolling a six respectively:

Or ~16.7%

In the case of rolling at least one six with six dice, the formula still works, although it must be run for a few different cases:

The case where we roll 1 six (x = 1):

The case where I roll 2 sixes (x = 2):

The case where I roll 3 sixes (x = 3):

The case where I roll 4 sixes (x = 4):

The case where I roll 5 sixes (x = 5):

And the extremely rare case where I roll 6 sixes (x = 6):

Thus our total probability of rolling at least one six is:

Or ~66.5%.

There is a much faster way to get this answer as well, which is to think about the chance that you don’t roll any sixes, which is:

However, that doesn’t allow us to probe the probabilities of each case which is more illustrative.

What about the number of dice?

After another month trapped in my apartment during the COVID-19 pandemic of 2020, I decided to ponder a few more dice related questions. Here’s one I found particularly intriguing:

If I wanted to roll exactly one six, how many 6-sided dice should I use to maximize my chances?

From my previous example, I already know the probability of rolling a six with a single die:

Using 1 die:

I can use the using Binomial Distribution Formula for two dice:

And three dice:

At this point, I’m starting to observe a couple patterns. Initially the more dice I use the greater probability I have of rolling a six. However the probability increased more between 1 die and 2 dice than it did between 2 dice and 3 dice. This means that the probability is increasing, but at a decreasing rate. Before long it should level off and start decreasing. This makes sense intuitively: If I rolled 100 dice, it would be very hard to roll only one six versus multiple sixes. This “peak” is the maximum I’m looking for to answer my question.

Below I plot the probability of rolling a single six based on using anywhere from one to forty 6-sided dice. As expected, the probability increases at first, reaches a maximum, and then decreases as more dice are rolled.

Somewhat surprising is there are two maxima. I have a 40.2% chance of rolling a single six when I use either 5 or 6 dice.

A pattern emerges

For the sake of being robust (and being really bored), I continued the same process, but now investigated what was the optimal number of dice to roll if I wanted to roll exactly two sixes. I plotted probabilities using from one to forty dice:

For the second time I observe the familiar shape of a humped distribution. I again also note that there are two optimal answers — rolling either 11 or 12 six-sided dice — which both give me a maximum 29.6% chance of success.

I decided to continue the experiment for rolling exactly 3 sixes through rolling exactly 12 sixes using different numbers of dice. The distribution curves for each were then plotted together:

Apart from being a soothing braided shape (lovely!), I was surprised to observe the persistence of two patterns seen in the “roll exactly one six” and “roll exactly two sixes” cases. Firstly, every roll had two ways to achieve the maximum probability rather than a single way. In the below chart, I show just these rolls that achieve maximum probabilities for their case:

The second pattern pertains to the regularity at which the maximum probability occurs. Specifically the optimal number of n dice to roll to achieve an exact number of a particular outcome (e.g. “roll exactly 3 sixes”) followed the rule:

So for rolling exactly 1 six using any number of six-sided die, the max probability occurs when the number of dice are:

And for rolling exactly 2 sixes using any number of six-sided die, the max probability occurs when the number of dice are:

This was true for all the cases of rolling an exact number of sixes with six-sided dice I tested:

To check myself I decided to repeat the experiment using something other than a six-sided die. Would the patterns hold up when trying to roll a certain number of fours using four-sided tetrahedral dice? The answer was once again yes:

Removing the idea of a dice, I reduced the experiment down to an even simpler game of a chance: a coin flip trying to achieve an exact number of heads.

Once again the rule held true, leading me to change my rule from the “number of sides of the die” to the “number of possible outcomes in a single trial” — which thankfully sounds more generalizable and like something a real mathematician would write down.

I repeated the experiment for a number of different scenarios including both even and odd outcome experiments and the rule always held true.

For example, below I repeated the experiment for trying to roll or flip exactly one of a certain number (x=1) using different coins and different-sided dice:

Regardless of whether the sides of the dice are even/odd or prime/not prime, the pattern held true. I repeated the process for rolling or flipping exactly two of a certain number using different coins and different-sided dice to confirm (and because I find the colorful braided charts kind of beautiful):

Yet again the patterns hold true.

A momentous addition to the pantheon of mathematics

Ergo, I am forced to conclude that I have now used COVID-19 shelter-in-place to advance the long march of mathematics one step forward into the future. I can sit at your table now, Blaise Pascal.

After Googling a bit, I haven’t been able to find any writing on this particular topic, so I will make the bold and unfounded assertion that I have established a mathematical law of tremendous consequence to the global intellectual community. I’m not actually sure about the difference between rules, laws, or theorems in mathematics, so I’m choosing law because it sounds very impressive. In fact, I shall selfishly name it for myself as Sullivan’s Law. It reads something like this:

Sullivan’s Law

For probabilistic situations where the Binomial Distribution Formula can be used, one can maximize the probability of achieving an exact outcome by choosing either of two optimal number of trials (n):

I’m sure there is some mathematical proof to be added here involving a derivative of the Binomial Distribution Formula with respect to n, but I’m not feeling that bored as to rekindle my old calculus abilities tonight :)

Real world applications

I’m not exactly sure of any real-world applications for Sullivan’s Law. Maybe something along the lines of wanting to know how many times you should play a game of chance if you desired to be the sole winner of that game? But that seems fairly selfish. If you think of anything, readers, let me know.

And should you ever find yourself at a bizarre gaming table in Las Vegas that involves any of what I’ve written, please be sure to let the pit boss know that you’re not lucky, you’re simply familiar with Sullivan’s Law.