PDA

View Full Version : Math/Probability help!

Absol197
2013-11-20, 11:15 PM
Hey there, so I'm having trouble working out how to calculate something vaguely D&D related, so I was hoping that the brilliant minds of the Playground might be able to help!

So, I've created a chart showing the probability that a certain NPC will have a certain natural score in any given ability score, as shown:

18|0.882%
17|2.391%
16|4.384%
15|6.579%
14|8.833%
13|10.935%
12|11.983%
11|12.060%
10|11.367%
9|9.959%
8|8.006%
7|5.543%
6|3.606%
5|2.104%
4|1.031%
3|0.337%[/table]

Which is easy enough, when I just want to know how likely it is that a person has an 18 in any one given ability. But what I'm doing is basing the character's level off their highest mental ability score. So, what is the chance that a particular person has at least one of their three abilities that high, and none higher? For instance, the chance of having one of them be a 15 is 6.579%, but what's the chance that, out of the three, the character has at least one 15, and no ability score higher? I know there's got to be a (relatively) simple equation to figure that out, but I don't know what it is!

So: if you want to just give me the answer, that's fine, but helping me figure out the answer by sharing the equation would be awesome! I'm doing this for two different species, one with no racial bonus to a mental ability, and one with a +2 to Wisdom. If you could help me figure out both, you get triple points, and several cookies!

Thanks for all your help!

~Phoenix~

JeminiZero
2013-11-21, 12:05 AM
So, what is the chance that a particular person has at least one of their three abilities that high, and none higher? For instance, the chance of having one of them be a 15 is 6.579%, but what's the chance that, out of the three, the character has at least one 15, and no ability score higher?
I am by no means a probability expert, so take what follows with a sack of salt: Lets say that X is the highest score for one of 3 possible mental abilities. Therefore, that implies one of 3 general scenarios:
1-One score is X (triple combination of either Int, Wis or Cha)
2-Two scores are X (this is also triple combination, basically the sides of a triangle)
3-Three scores are X (ony one possible combination)

Under scenario 1, lets say that the probability for rolling a score of X is P(X). The other 2 scores are lower than X, lets call it P(<X) . Basically you have to sum together (P(X-1) + P(X-2) ... P(3)). So the probability then, that 1 particular score is the highest would be: P(X) * P(<X) * P(<X). The probability that this would occur with ANY of 1 of 3 scores is: 3[P(X) * P(<X) * P(<X)]

Under scenario 2, where 2 scores are X, the probability of that occuring for one particular combination is again: P(X) * P(X) * P(<X). The probability that this would occur for ALL 3 possiblie combinations is: 3[P(X) * P(X) * P(<X)].

Under scenario 3, where all 3 scores are X, the probability of this occuring is P(X)^3. Only one combination.

Therefore, the probability that X is the highest score (whether for 1, 2 or all 3 mental ability scores) would be:

P(X)^3 + 3[P(X) * P(X) * P(<X)] + 3[P(X) * P(<X) * P(<X)]

Edit: Plugging the values into an excel table:
{table]Score|P(X) | P(<X) | P(X)^3 + 3[P(X) * P(X) * P(<X)] + 3[P(X) * P(<X) * P(<X)]
18|0.88%|99.12%|0.026227309
17|2.39%|96.73%|0.068783994
16|4.38%|92.34%|0.117558729
15|6.58%|85.76%|0.156595979
14|8.83%|76.93%|0.175527192
13|10.94%|66.00%|0.167863065
12|11.98%|54.01%|0.12986598
11|12.06%|41.95%|0.083738197
10|11.37%|30.59%|0.045226247
9|9.96%|20.63%|0.019837073
8|8.01%|12.62%|0.00676584
7|5.54%|7.08%|0.0016558
6|3.61%|3.47%|0.00031274
5|2.10%|1.37%|3.92941E-05
4|1.03%|0.34%|2.52184E-06
3|0.34%|0.00%|3.82728E-08
||Sum Check|1
[/table]
The sum check seems correct, so this might be working.

Absol197
2013-11-21, 12:27 AM
Hmm, that makes sense! And it does seem to work, as the sum adds up to 1. So there's basically a 2% chance (roughly) that someone will have at least one 18? That's a bit higher than I expected, but that works!

Thanks for your help!

Okay, so now to do the calculation for the species with a +2 to one mental ability. Basically one ability goes from 5 to 20, and the other two go from 3 to 18...

JeminiZero
2013-11-21, 12:43 AM
Well, the same general principle still applies, only that the probability for Wis must be considered seperately from Int and Cha.

Under scenario 1, lets say that the probability for rolling a score of X for wis is P(Xwis), and likewise for int and cha. So it would be [P(Xwis) * P(<Xint) * P(<Xcha)] + [P(Xint) * P(<Xwis) * P(<Xcha)] + [P(Xcha) * P(<Xwis) * P(<Xint)]

Likewise, scenario 2 would be: [P(Xwis) * P(Xint) * P(<Xcha)] + [P(Xwis) * P(Xcha) * P(<Xint)] + [P(Xcha) * P(Xint) * P(<Xwis)]

Scenario 3 would be: [P(Xwis) * P(Xint) * P(Xcha)]

Big Table:

{table]Scenario|Int/Cha|Int/Cha|Wis|Wis|S1|S1|S1|S2|S2|S2|S3|Sum
Score|P(X)|P(<X)|P(X)|P(<X)|P(Xwis) * P(<Xint) * P(<Xcha)|P(Xint) * P(<Xwis) * P(<Xcha)|P(Xcha) * P(<Xwis) * P(<Xint)|P(Xwis) * P(Xint) * P(<Xcha)|P(Xwis) * P(Xcha) * P(<Xint)|P(Xcha) * P(Xint) * P(<Xwis)|P(Xwis) * P(Xint) * P(Xcha)|(S1+S2+S3)
20|0|100%|0.88%|99.12%|0.88200%|0|0|0|0|0|0|0.8820 0%
19|0|100%|2.39%|96.73%|2.39100%|0|0|0|0|0|0|2.3910 0%
18|0.88%|99.12%|4.38%|92.34%|4.30701%|0.008072817| 0.008072817|0.000383258|0.000383258|7.18358E-05|3.41042E-06|6.00575%
17|2.39%|96.73%|6.58%|85.76%|6.15539%|0.019835005| 0.019835005|0.001521553|0.001521553|0.000490303|3. 76114E-05|10.47949%
16|4.38%|92.34%|8.83%|76.93%|7.53210%|0.031144108| 0.031144108|0.003575879|0.003575879|0.001478572|0. 000169765|14.64093%
15|6.58%|85.76%|10.94%|66.00%|8.04320%|0.037237673 |0.037237673|0.006169979|0.006169979|0.002856521|0 .000473302|17.05771%
14|8.83%|76.93%|11.98%|54.01%|7.09199%|0.036703536 |0.036703536|0.008142826|0.008142826|0.004214196|0 .000934936|16.57618%
13|10.94%|66.00%|12.06%|41.95%|5.25270%|0.03027606 5|0.030276065|0.008703295|0.008703295|0.005016497| 0.001442065|13.69443%
12|11.98%|54.01%|11.37%|30.59%|3.31621%|0.01979641 5|0.019796415|0.007357152|0.007357152|0.004391914| 0.001632214|9.34934%
11|12.06%|41.95%|9.96%|20.63%|1.75284%|0.010436296 |0.010436296|0.005038788|0.005038788|0.003000065|0 .001448473|5.29271%
10|11.37%|30.59%|8.01%|12.62%|0.74896%|0.004387956 |0.004387956|0.002783455|0.002783455|0.001630743|0 .001034445|2.44976%
9|9.96%|20.63%|5.54%|7.08%|0.23584%|0.001453993|0. 001453993|0.001138667|0.001138667|0.000702008|0.00 0549764|0.87955%
8|8.01%|12.62%|3.61%|3.47%|0.05744%|0.000350824|0. 000350824|0.000364364|0.000364364|0.000222541|0.00 023113|0.24584%
7|5.54%|7.08%|2.10%|1.37%|0.01054%|5.36712E-05|5.36712E-05|8.2547E-05|8.2547E-05|4.20316E-05|6.46451E-05|0.04845%
6|3.61%|3.47%|1.03%|0.34%|0.00124%|4.21925E-06|4.21925E-06|1.29082E-05|1.29082E-05|4.38209E-06|1.34063E-05|0.00645%
5|2.10%|1.37%|0.34%|0.00%|0.00006%|0|0|9.69978E-07|9.69978E-07|0|1.49184E-06|0.00041%
4|1.03%|0.34%|0.00%|0.00%|0.00000%|0|0|0|0|0|0|0.0 0000%
3|0.34%|0.00%|0.00%|0.00%|0.00000%|0|0|0|0|0|0|0.0 0000%
|||||||||||Sum Check|100.00000%
[/table]

Absol197
2013-11-21, 01:07 PM
Awesome! Thanks for all your help!

Miklus
2013-11-21, 05:19 PM
Shouldn't your original table be symetrical? You get an 18 by 6+6+6 and only that, right? And a 3 by 1+1+1? So why do the two numbers have different probabilities?

warty goblin
2013-11-21, 08:12 PM
Shouldn't your original table be symetrical? You get an 18 by 6+6+6 and only that, right? And a 3 by 1+1+1? So why do the two numbers have different probabilities?

Usually its 4d6, drop the lowest. Thus six combinations that give an eighteen, but only one that gives a three.

IthilanorStPete
2013-11-21, 09:13 PM
Usually its 4d6, drop the lowest. Thus six combinations that give an eighteen, but only one that gives a three.

21 different combinations, actually:
# of occurrences of 3 6's and 1-5 in the 4th die = 5
*4 possibilities of which die has the 1-5 value = 5*4 = 20
+1 possibility of 4 6's = 21.

I calculated the odds of a given score from 4d6b3 and got different results than the OP; Absol, how'd you calculate that table?

Absol197
2013-11-22, 12:39 AM
Ah! I did the probabilities for 3 different ability score generations: 3d6, 4d6b3, and 4d6b3 reroll all ones. I calculated the possibilities for all three methods, then weighted them, based roughly on the standard deviation percentages. 3d6 should be the most common (it's used for commoner ability scores, after all!), so it got 68.2% of the weight; 4d6b3 is rarer, for heroes, so it got 27.2% of the weight, and 4d6b3 reroll 1s is the rarest, so it got the remainder (4.6%). Then I summed them up!

I was going to do a fourth pattern: 4d6b3 rerolls 1s once (so if you roll a 6, 3, 1, and 1, you'd roll both the 1s again - if they came up 5 and 1, you would have to keep the second 1), but I couldn't quite figure out how to calculate the percentages for each ability score using that method, and trying to brute force it would have taken far, far too long (not that I didn't try :smallredface: )!

So yeah, that's how I did it!

~Phoenix~