Sunday, September 12, 2010

In-game probability in practice - part 5.

Here are the 95% and 99% confidence intervals for the practical in-game probabilities "Y" after rolling a die n times, with an underlying theoretical probability of 50% (p = 0.5).

(They were calculated using a program which implemented the Clopper-Pearson method, when the normal approximation is no longer valid for n < 40).

95%

n = 2 --> (0.0126, 0.9874)
n = 4 --> (0.0676, 0.9324)
n = 6 --> (0.1181, 0.8819)
n = 8 --> (0.1507, 0.8430)
n = 10 --> (0.1871, 0.8129)
n = 12 --> (0.2109, 0.7891)
n = 14 --> (0.2304, 0.7696)
n = 16 --> (0.2465, 0.7535)
n = 18 --> (0.2602, 0.7381)
n = 20 --> (0.2720, 0.7280)
n = 22 --> (0.2822, 0.7178)
n = 24 --> (0.2912, 0.7088)
n = 26 --> (0.2993, 0.7007)
n = 28 --> (0.3065, 0.6935)
n = 30 --> (0.3130, 0.6870)
n = 32 --> (0.3189, 0.6811)
n = 34 --> (0.3243, 0.6757)
n = 36 --> (0.3292, 0.6708)
n = 38 --> (0.3338, 0.6662)
n = 40 --> (0.3380, 0.6620)

99%

n = 2 --> (0.0025, 0.9975)
n = 4 --> (0.0294, 0.9706)
n = 6 --> (0.0663, 0.9337)
n = 8 --> (0.0999, 0.9001)
n = 10 --> (0.1283, 0.8717)
n = 12 --> (0.1522, 0.8478)
n = 14 --> (0.1724, 0.8276)
n = 16 --> (0.1897, 0.8103)
n = 18 --> (0.2047, 0.7953)
n = 20 --> (0.2177, 0.7823)
n = 22 --> (0.2293, 0.7707)
n = 24 --> (0.2396, 0.7604)
n = 26 --> (0.2489, 0.7511)
n = 28 --> (0.2572, 0.7428)
n = 30 --> (0.2649, 0.7351)
n = 32 --> (0.2718, 0.7282)
n = 34 --> (0.2782, 0.7281)
n = 36 --> (0.2841, 0.7152)
n = 38 --> (0.2895, 0.7105)
n = 40 --> (0.2946, 0.7054)


As one can see for less than 4 or 5 rolls of a d20, with a 95% to 99% certainty, the practical in-game probabilities "Y" include the cases of 5% (ie. only hitting on a d20 roll of 20) and 95% (ie. hit on any roll of a d20, except on a 1).

Also in a generic DnD combat encounter which lasts 8 rounds or less, with 95% to 99% certainty, it should not be surprising at all to see a player which only hits once on all of their d20 rolls during the encounter (ie. Pinky's cousin), or a player which only misses once on all their d20 rolls during the encounter (ie. hot hand).

(Pinky is a "cursed" d20 which never rolls a success).


For completion, the number of rounds "n" where it is not surprising to see one with "Pinky's cousin" or a "hot hand", with 95% to 99% certainty.

One hit only (or only one miss on a "hot hand")

95% certainty --> n < 8
99% certainty --> n < 9

Two hits only (or only two misses on a "hot hand")

95% certainty --> n < 11
99% certainty --> n < 13

Three hits only (or only three misses on a "hot hand")

95% certainty --> n < 14
99% certainty --> n < 16

Four hits only (or only four misses on a "hot hand")

95% certainty --> n < 17
99% certainty --> n < 19

Five hits only (or only five misses on a "hot hand")

95% certainty --> n < 19
99% certainty --> n < 22