Menu
News
All News
Dungeons & Dragons
Level Up: Advanced 5th Edition
Pathfinder
Starfinder
Warhammer
2d20 System
Year Zero Engine
Industry News
Reviews
Dragon Reflections
White Dwarf Reflections
Columns
Weekly Digests
Weekly News Digest
Freebies, Sales & Bundles
RPG Print News
RPG Crowdfunding News
Game Content
ENterplanetary DimENsions
Mythological Figures
Opinion
Worlds of Design
Peregrine's Nest
RPG Evolution
Other Columns
From the Freelancing Frontline
Monster ENcyclopedia
WotC/TSR Alumni Look Back
4 Hours w/RSD (Ryan Dancey)
The Road to 3E (Jonathan Tweet)
Greenwood's Realms (Ed Greenwood)
Drawmij's TSR (Jim Ward)
Community
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions, OSR, & D&D Variants
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Resources
Wiki
Pages
Latest activity
Media
New media
New comments
Search media
Downloads
Latest reviews
Search resources
EN Publishing
Store
EN5ider
Adventures in ZEITGEIST
Awfully Cheerful Engine
What's OLD is NEW
Judge Dredd & The Worlds Of 2000AD
War of the Burning Sky
Level Up: Advanced 5E
Events & Releases
Upcoming Events
Private Events
Featured Events
Socials!
EN Publishing
Twitter
BlueSky
Facebook
Instagram
EN World
BlueSky
YouTube
Facebook
Twitter
Twitch
Podcast
Features
Top 5 RPGs Compiled Charts 2004-Present
Adventure Game Industry Market Research Summary (RPGs) V1.0
Ryan Dancey: Acquiring TSR
Q&A With Gary Gygax
D&D Rules FAQs
TSR, WotC, & Paizo: A Comparative History
D&D Pronunciation Guide
Million Dollar TTRPG Kickstarters
Tabletop RPG Podcast Hall of Fame
Eric Noah's Unofficial D&D 3rd Edition News
D&D in the Mainstream
D&D & RPG History
About Morrus
Log in
Register
What's new
Search
Search
Search titles only
By:
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions, OSR, & D&D Variants
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Menu
Log in
Register
Install the app
Install
Upgrade your account to a Community Supporter account and remove most of the site ads.
Community
General Tabletop Discussion
*TTRPGs General
Probability Distribution of Dice
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="frisbeet" data-source="post: 768788" data-attributes="member: 10287"><p>Sure thing. I made an error in the orignal formula (since corrected), which might have thrown you off: ...IF[oc<(i*n+s)... should read ...IF[oc<(i*s+n)...</p><p></p><p>Here's the logic behind the formula</p><p></p><p># ways = COMB(oc-1,n-1) + SUM(i=1,n-1) {(-1)^i * IF[oc<(i*s+n),0,COMB(n,i)*COMB(oc-i*s-1,n-1)]}</p><p>_____________________________________________</p><p>The 1st term COMB(oc-1,n-1):</p><p></p><p>As posted by Drawmack, presented by K. Ross & C. Wright (Discrete Mathematics (Fourth Edition) by: Kenneth A. Ross & Charles R.B. Wright ISBN: 0-13-096141-8). The total number of ways of summing to a number, oc, with n whole numbers is COMB(oc+n-1,n-1). Think of n-1 as the number of partitions between sets of identical objects, with each set representing a number. The total of all identical objects among all sets is oc. </p><p></p><p>Ok. To get an oc of 10 with n of 4 means that COMB(oc+n-1,n-1) counts ways like 10|0|0|0, 9|1|0|0, 9|0|1|0, 7|1|1|1, etc. But in our case 10|0|0|0, 9|1|0|0, 9|0|1|0 are examples of ways which shouldn't be counted, because we're using dice to generate our numbers. With 4 dice you'd instead build from 1|1|1|1, using oc-4 as the # of objects to arrange around n-1 partitions. Hence, COMB(oc+n-1-n,n-1) = COMB(oc-1,n-1)</p><p></p><p>Now, back to the 4d6 outcome 17 example. As I've shown above, the 1st term is COMB(16,3), which is 560.</p><p>_______________________________________________</p><p>The 1st corrective term -IF[oc<(n+s),0,COMB(n,1)*COMB(oc-s-1,n-1)]}:</p><p></p><p>For this example,</p><p></p><p>17 is not less than 4+6, so this term is -COMB(4,1)*COMB(17-6-1,3) = -4*COMB(10,3) = -480.</p><p></p><p>What does it mean? The problem with the 1st term is that for an outcome like 17 with 4d6, it counts ways like 7|6|3|1. But you can't roll a 7 with a six-sided die, unless you're blitzed. How many ways were erroneously counted? For now just consider the example of one set having at least a 7 (one d6 rolled at least a 7). This leaves behind 17 - 7 - 3 (the other sets still have to have at least one identical object) = 7 objects to place around 3 partitions--you can still place more objects in the 7-hole, getting a higher #. Hence COMB(7+3,3). But wait, this assumes one die has at least a 7--but which one? The 1st term erroneously counted all 4 possibilities, or COMB(4,1). So 7|6|3|1, 6|7|3|1, 6|3|7|1, & 6|3|1|7. Ok, generalizing, we get the 1st corrective term.</p><p>________________________________________________</p><p>The 2nd corrective term (-1)^2IF[oc<(2s+n),0,COMB(n,2)*COMB(oc-2s-1,n-1)]}:</p><p></p><p>For this example,</p><p></p><p>17 is not less than 2*6+4, so this term is +COMB(4,2)*COMB(17-12-1,3) = +6*COMB(4,3) = +24.</p><p></p><p>This is a correction to the correction. 17 is one of the bigger outcomes for 4d6; one erroneous way to get it is to roll 7|7|2|1.</p><p>How many of these terms are there? Restrict two sets to have at least 7, and the other two to have at least one. Then that's 17 - 14 - 2 = 1 object to put around 3 partitions, so figure the combination of 4 things taken 3 (or one) at a time. Or that's 17(oc) - 4(at least one object/set) - 2*6(2 sets have at least six more objects) + 3(partitions) = 17-2*6-1 = 4 things, 3 of which are identical (partitions). Hence, COMB(4,3), generalized to COMB(oc-2*s-1,n-1). But any two sets can be 7s or greater. There are COMB(4,2) ways of arranging 2 sets among 4 where each set is only distinguished by weather it has 7 or more or 6 or less objects. So that's COMB(4,2), or COMB(n,i), generalized. Multiply by COMB(oc-2*s-1,n-1) to get total # of ways to roll (at least 7)|(at least 7)|(6 or less)|(6 or less).</p><p></p><p>But why is it a correction of the 1st correction? Because for every 7|7|2|1, the 1st correction subtracts twice. Suppose you needed to put just a few more object into </p><p>(at least 7)|(exactly 6)|(6 or less)|(6 or less). Usually, if you assign the remaining objects, you'll get (at least 7)|(6 or less)|(6 or less)|(6 or less), like 8|6|2|1 or 7|6|3|1. The 1st correction subtracts these impossibilities away. The exception is when you have (at least 7)|(at least 7)"|(6 or less)|(6 or less). You want to subtract this term away once, but the 1st correction counts (at least 7)|(at least 7)"|(6 or less)|(6 or less) and (at least 7)"|(at least 7)|(6 or less)|(6 or less) as separate things.</p><p>________</p><p></p><p>And so on. This correction-for-a-correction-for-a-correction business gets pretty confusing, and I'm not even sure I've grasped the idea right. What is nice is that it does work for every die combo I've tested.</p><p></p><p>Hope your forehead hasn't struck your keyboard spasmodically.</p><p></p><p></p><p>HUGE EDIT:</p><p></p><p>2nd correction corrected. Big sorry folks. Thanks a lot Storminator!</p></blockquote><p></p>
[QUOTE="frisbeet, post: 768788, member: 10287"] Sure thing. I made an error in the orignal formula (since corrected), which might have thrown you off: ...IF[oc<(i*n+s)... should read ...IF[oc<(i*s+n)... Here's the logic behind the formula # ways = COMB(oc-1,n-1) + SUM(i=1,n-1) {(-1)^i * IF[oc<(i*s+n),0,COMB(n,i)*COMB(oc-i*s-1,n-1)]} _____________________________________________ The 1st term COMB(oc-1,n-1): As posted by Drawmack, presented by K. Ross & C. Wright (Discrete Mathematics (Fourth Edition) by: Kenneth A. Ross & Charles R.B. Wright ISBN: 0-13-096141-8). The total number of ways of summing to a number, oc, with n whole numbers is COMB(oc+n-1,n-1). Think of n-1 as the number of partitions between sets of identical objects, with each set representing a number. The total of all identical objects among all sets is oc. Ok. To get an oc of 10 with n of 4 means that COMB(oc+n-1,n-1) counts ways like 10|0|0|0, 9|1|0|0, 9|0|1|0, 7|1|1|1, etc. But in our case 10|0|0|0, 9|1|0|0, 9|0|1|0 are examples of ways which shouldn't be counted, because we're using dice to generate our numbers. With 4 dice you'd instead build from 1|1|1|1, using oc-4 as the # of objects to arrange around n-1 partitions. Hence, COMB(oc+n-1-n,n-1) = COMB(oc-1,n-1) Now, back to the 4d6 outcome 17 example. As I've shown above, the 1st term is COMB(16,3), which is 560. _______________________________________________ The 1st corrective term -IF[oc<(n+s),0,COMB(n,1)*COMB(oc-s-1,n-1)]}: For this example, 17 is not less than 4+6, so this term is -COMB(4,1)*COMB(17-6-1,3) = -4*COMB(10,3) = -480. What does it mean? The problem with the 1st term is that for an outcome like 17 with 4d6, it counts ways like 7|6|3|1. But you can't roll a 7 with a six-sided die, unless you're blitzed. How many ways were erroneously counted? For now just consider the example of one set having at least a 7 (one d6 rolled at least a 7). This leaves behind 17 - 7 - 3 (the other sets still have to have at least one identical object) = 7 objects to place around 3 partitions--you can still place more objects in the 7-hole, getting a higher #. Hence COMB(7+3,3). But wait, this assumes one die has at least a 7--but which one? The 1st term erroneously counted all 4 possibilities, or COMB(4,1). So 7|6|3|1, 6|7|3|1, 6|3|7|1, & 6|3|1|7. Ok, generalizing, we get the 1st corrective term. ________________________________________________ The 2nd corrective term (-1)^2IF[oc<(2s+n),0,COMB(n,2)*COMB(oc-2s-1,n-1)]}: For this example, 17 is not less than 2*6+4, so this term is +COMB(4,2)*COMB(17-12-1,3) = +6*COMB(4,3) = +24. This is a correction to the correction. 17 is one of the bigger outcomes for 4d6; one erroneous way to get it is to roll 7|7|2|1. How many of these terms are there? Restrict two sets to have at least 7, and the other two to have at least one. Then that's 17 - 14 - 2 = 1 object to put around 3 partitions, so figure the combination of 4 things taken 3 (or one) at a time. Or that's 17(oc) - 4(at least one object/set) - 2*6(2 sets have at least six more objects) + 3(partitions) = 17-2*6-1 = 4 things, 3 of which are identical (partitions). Hence, COMB(4,3), generalized to COMB(oc-2*s-1,n-1). But any two sets can be 7s or greater. There are COMB(4,2) ways of arranging 2 sets among 4 where each set is only distinguished by weather it has 7 or more or 6 or less objects. So that's COMB(4,2), or COMB(n,i), generalized. Multiply by COMB(oc-2*s-1,n-1) to get total # of ways to roll (at least 7)|(at least 7)|(6 or less)|(6 or less). But why is it a correction of the 1st correction? Because for every 7|7|2|1, the 1st correction subtracts twice. Suppose you needed to put just a few more object into (at least 7)|(exactly 6)|(6 or less)|(6 or less). Usually, if you assign the remaining objects, you'll get (at least 7)|(6 or less)|(6 or less)|(6 or less), like 8|6|2|1 or 7|6|3|1. The 1st correction subtracts these impossibilities away. The exception is when you have (at least 7)|(at least 7)"|(6 or less)|(6 or less). You want to subtract this term away once, but the 1st correction counts (at least 7)|(at least 7)"|(6 or less)|(6 or less) and (at least 7)"|(at least 7)|(6 or less)|(6 or less) as separate things. ________ And so on. This correction-for-a-correction-for-a-correction business gets pretty confusing, and I'm not even sure I've grasped the idea right. What is nice is that it does work for every die combo I've tested. Hope your forehead hasn't struck your keyboard spasmodically. HUGE EDIT: 2nd correction corrected. Big sorry folks. Thanks a lot Storminator! [/QUOTE]
Insert quotes…
Verification
Post reply
Community
General Tabletop Discussion
*TTRPGs General
Probability Distribution of Dice
Top