How to calculate number of dice needed to reach total y with probability z

341 Views Asked by At

I am writing an excel sheet to help with planning for a game I am playing.

In this game, you have units which produce 1d10 points per round. Each goal is measured against a target. I am trying to figure out an excel formula to calculate how many units to assign to each goal for a given probability of reaching it that turn.

Each unit provides a roll independent of all other units, and all rolls are evenly distributed between 1 and 10.

In short:

If I want a 50% chance of getting a sum of at least 50 on x fair d10, how do I solve for x? How does this change if I want a 95% chance of that sum? How do I put this calculation into an Excel-friendly format?

1

There are 1 best solutions below

2
On

For small numbers of rolls, you can just add them up in Excel. Let each column be a number of dice and each row be a sum. The entries will be the number of ways to achieve that sum. Leave ten blank rows above your chart. In the column for one die, put a $1$ in each cell from $1$ to $10$ because there is one way to get each number. In the column for $n$ dice, the cell for sum $s$ should have the sum of all the cells in the column for $n-1$ dice with sums $s-10$ to $s-1$ because the number of ways to get a sum of $s$ is to start with one of those and get the proper number on the last die. Copy right and down will make this easy.

Now you can make a companion chart for the number of ways to get a sum of at least $s$ on $n$ dice just by adding the applicable cells. You can make another with the probability to get at least $s$ and just scan for your $50\%$ or $95\%$ chance.

For a large number of dice you can use the normal approximation. You are adding up a discrete uniform distribution from $1$ to $10$. The expected value is $5.5$ times the number of dice. The variance is $\frac {99}{12}$ times the number of dice. For a $50\%$ chance of at least $s$ you just need $\frac s{5.5}$ rolls. For a higher chance you need a result that is some number of standard deviations low to give you at least the sum you want.