Skip to content

Instantly share code, notes, and snippets.

@siliconbrain
Created November 17, 2016 15:32
Show Gist options
  • Save siliconbrain/dbeca622f5902514312494c419895950 to your computer and use it in GitHub Desktop.
Save siliconbrain/dbeca622f5902514312494c419895950 to your computer and use it in GitHub Desktop.
Probability distribution of a D&D 5e ability roll
Function: Roll 4 d6. Select 3 highest. Sum selected dice.
Value | Count | Probability
-------|-------|---------------------
3 | 1 | 0.007936507936507936
4 | 1 | 0.007936507936507936
5 | 2 | 0.015873015873015872
6 | 4 | 0.031746031746031744
7 | 5 | 0.03968253968253968
8 | 7 | 0.05555555555555555
9 | 10 | 0.07936507936507936
10 | 11 | 0.0873015873015873
11 | 12 | 0.09523809523809523
12 | 15 | 0.11904761904761904
13 | 13 | 0.10317460317460317
14 | 13 | 0.10317460317460317
15 | 12 | 0.09523809523809523
16 | 9 | 0.07142857142857142
17 | 5 | 0.03968253968253968
18 | 6 | 0.047619047619047616
^
15| ▓
14| ▓
13| ▓ ▓ ▓
12| ▓ ▓ ▓ ▓ ▓
11| ▓ ▓ ▓ ▓ ▓ ▓
10| ▓ ▓ ▓ ▓ ▓ ▓ ▓
9| ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
8| ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
7| ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
6| ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
5| ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
4| ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
3| ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
2| ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
1| ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
+-------------------------------->
3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8
1 1 1 1 1 1 1 1 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment