The unexpected logic behind rolling multiple dice and picking the highest.

2022 ж. 30 Мау.
1 690 083 Рет қаралды

Check out Jane Street's icosahedron puzzle:
www.janestreet.com/IMO2022/
2022 International Mathematical Olympiad!
www.imo2022.org/
If you want those d60 and d120 we sell them on Maths Gear or you can go direct to The Dice Lab.
mathsgear.co.uk/collections/dice
www.mathartfun.com/thedicelab...
Here is my terrible python code.
github.com/standupmaths/highe...
Thanks to Gilad Levy for sending in the question. This is the best collection of maths about the problem we found at the time: rpg.stackexchange.com/questio...
But much of that looks at getting a certain value OR GREATER whereas I focused on specific values and the average value.
I’ve also noticed that Chalkdust just beat me with a similar article. Nice to see a different way (induction) to derive the same probability of getting specific value equation! chalkdustmagazine.com/feature...
Cheers to my Patreons for buying me all those dice. If you think I still don't have enough dice, get involved here: / standupmaths
CORRECTIONS
- Yes, on the bar chart axis it goes 2%, 4%, 2%, 4% instead of 2%, 4%, 6%, 8%. First spotted and pointed out by Deadeaded. It was just because I was copying and pasting in photoshop and forgot to edit it. Not because I was making that chart in a bar.
- At 23:07 I have (n=1) in the graphics which should be (n-1). Or maybe I put in two - and you should pick the highest. (Pointed out by Leick Robinson.)
- Marco Davi correctly noticed that the fifth Rhombic Dodecahedral Number is 369, not the 269 you see at 21:46.
- Let me know if you spot any other mistakes!
Filming and editing by Alex Genn-Bash
Dice gluing by Alex Genn-Bash
Putting 1/n in front of everything by 1/nMatt 1/nParker
Music by Howard Carter
Design by Simon Wright and Adam Robinson

Пікірлер
  • But what about disadvantage? A lot of people are asking about rolling m n-sided dice and picking the lowest value. Nicely it is a completely symmetric situation! For a d20 (or any dice) you can reverse the numbers on the bar chart to go 20 to 1 instead of 1 to 20 and it all works out. Which is to say: you swap the values of x for 21-x. And that feeds through everything else. The average value for disadvantage is (n+1) subtract the average roll for advantage in the identical situation. So for a d20 it's 21 - 13.825 = 7.175 The final conclusion also holds but now the expected average for disadvantage is 1/(m+1) × n + 0.5 Oh, and for those asking about the d60 and d120 dice: we sell them on Maths Gear or you can go direct to The Dice Lab. mathsgear.co.uk/collections/dice www.mathartfun.com/thedicelab.com/d120.html

    @standupmaths@standupmaths Жыл бұрын
    • I was about to comment on disadvantage; from first principles you effectively just invert your axes - there is only one way to achieve a six, three ways to achieve a five…etc. thanks for validating my thought process :-)

      @LoneEagle2061@LoneEagle2061 Жыл бұрын
    • Do we get a standard distribution curve?🤔

      @QlueDuPlessis@QlueDuPlessis Жыл бұрын
    • Three dice and discard the high and low

      @QlueDuPlessis@QlueDuPlessis Жыл бұрын
    • The average roll of one die is ½n *+ .5* Likewise the m=2 simulation usually came up about .5 higher than the calculated value. How do you account for this discrepency?

      @siraaron4462@siraaron4462 Жыл бұрын
    • @@siraaron4462 Dice can only produce discrete results (1,2,3, ...) which means that the theoretical calculation looking at a (more or less) continuous case only approximates the true value - you can get a better approximation by taking a continuous distribution picked so that each number on the die is represented by an equal range of numbers centered on that number. So rather than needing to get exactly 3, you take any value from 2.5 to 3.5 as being a 3. Apply that to the ends of the distribution, and you end up with a distribution from 0.5 to 6.5 - which is 0.5 higher than the 0-6 range the formula works with.

      @rmsgrey@rmsgrey Жыл бұрын
  • As someone who's spent HOURS building dice towers, GLUEING DICE TOGETHER IS CHEATING, MATT!!!

    @jackielinde7568@jackielinde7568 Жыл бұрын
    • Hahahahaha. That reminds me of when I was growing up and had a _super_ spoiled friend whose mom would literally build his lego sets for him (which is awful enough)... and then GLUE THEM TOGETHER. SERIOUSLY, WHAT GIVES? THAT DEFEATS THE ENTIRE POINT OF LEGOS, DIANE! JUST BUY HIM A REGULAR PRE-ASSEMBLED TOY FOR CHRIST'S SAKE!

      @idontwantahandlethough@idontwantahandlethough Жыл бұрын
    • @@idontwantahandlethough Okay, I will say making and gluing Lego kits together for other people is worse... but not by much.

      @jackielinde7568@jackielinde7568 Жыл бұрын
    • @@idontwantahandlethough Maybe Diane liked assembling Lego herself...

      @ninjabob2456@ninjabob2456 Жыл бұрын
    • True, and I appreciate the humor, but I have to say the visual aid of being able to pick up an entire "shell" was very demonstrative, and certainly helped me visualize, personally.

      @mmseng2@mmseng2 Жыл бұрын
    • is interleaving cheating or just better strategy. wait what is this "building dice towers"? that's a thing?

      @elliott614@elliott614 Жыл бұрын
  • I can't tell you how many times someone has told me: "There's no practical reason why you'd want to know that the central cross section of 4d hypercube is a 3d rhombic dodecahedron." I'm so thankful! I really wanted to throw something at their face. But I didn't know what to throw!

    @coloringontheline@coloringontheline Жыл бұрын
    • A rhombic dodecahedron of course

      @tylerpeacock8245@tylerpeacock8245 Жыл бұрын
    • ​@@tylerpeacock8245 I was about to say!

      @stephanevalladier6210@stephanevalladier6210 Жыл бұрын
    • Well you could try to throw a hypercube at them but then again that would probably rip a hole in our 3 dimensional reality...

      @insomnia20422@insomnia20422 Жыл бұрын
    • @@insomnia20422 I’m reminded of Peter Venkman: “Well, there are so many holes in First Avenue, we really didn’t think anyone would notice.” Go for it!

      @WalkerBoh84@WalkerBoh84 Жыл бұрын
    • Glad to know I am not the only one. I've got people yelling at me in the streets about this: "Oy! There's not practical reason why someone would want to know the central cross section of a 4d hypercube is a 3d rhombic dodecahedron!"

      @derpnerpwerp@derpnerpwerp Жыл бұрын
  • When I first started playing DnD, I knew enough about statistics to know that the great sword (2d6) was superior to the great axe (1d12), because the sword did an average of 7 points of damage, but the axe only did 6.5 points. Now I like to joke that the great axe is far superior because it 3 times more likely to deal 12 damage.

    @mr.zvonek9565@mr.zvonek9565 Жыл бұрын
    • Another benefit is that the Great Sword's minimum damage is 2 instead of 1 (can't roll lower than 1+1)

      @Slimmeyy@Slimmeyy Жыл бұрын
    • I would say the great sword is better in general for your standard weapon, however the great axe has its place. If you ever need to go for a Hail Mary because you're going to die next turn if you don't get that 12 then the great sword isn't your friend

      @awesomenesschanel@awesomenesschanel Жыл бұрын
    • @@Slimmeyy that's why the average is higher

      @x9n_@x9n_ Жыл бұрын
    • great axe is better because rolling big dice is more fun

      @joshuagrant7812@joshuagrant7812 Жыл бұрын
    • Great sword is more reliable to give good rolls on anerage, and the axe is more moody, giving either high or low damage. They work for different character personalities.

      @aogasd@aogasd Жыл бұрын
  • "...I should've glued these together ...sooo...I did! " This is comedy gold. The correct use of tense applied to a current situation with a squeeze of remorse then glee is just perfect. :)

    @Masheeable@Masheeable Жыл бұрын
    • Caught me so off guard, and I was delighted by this twist

      @twagetomato@twagetomato Жыл бұрын
    • 14:02 in case anyone was wondering!

      @popcorny007@popcorny0074 ай бұрын
  • Explaining the odd numbers "if you're unfamiliar" really encapsulates what I love about Matt Parker. It's the middle of the Venn diagram between thoughtful and hilarious.

    @misterscottintheway@misterscottintheway Жыл бұрын
    • It helps me not feel stupid when he starts talking about 4d hypercubes because he's explaining to the same degree as he did the odd numbers

      @viceliag3916@viceliag3916 Жыл бұрын
    • @@viceliag3916 Definitely agreed. In school I was terrible at maths, unmotivated and found it boring and unapplicable to my life. Now at age 27 I have set out on a lifepath that does not involve a lot of maths, but I discovered way too late that I actually think its amazing. I will propably never get a chance to go back and do over but this way at least I can see the wonder of maths.

      @tharrock337@tharrock337 Жыл бұрын
    • Actually it was pretty useful XD I half heard him, and assumed he was talking about something equally convoluted as the rest of the word soup there, so the “no it’s the numbers *that are odd* you numbskull!” Reminder was actually pretty useful XD

      @thetzeentchianrepresentati5547@thetzeentchianrepresentati5547 Жыл бұрын
    • Stand up maths after all

      @ImmortalAbsol@ImmortalAbsol Жыл бұрын
    • @@tharrock337 it's never too late, plenty of people go back to school to study completely different things than what they did originally and ended up quite successful :) but if you're happy with what you're doing currently there's nothing wrong with that either

      @GeekProdigyGuy@GeekProdigyGuy Жыл бұрын
  • "Some people enumerates every option. But we can do better. We can use math." *proceeds to first go to a random sample of every option*

    @unfortunatelyevil1767@unfortunatelyevil1767 Жыл бұрын
    • Gotta love Matt

      @reversev9778@reversev9778 Жыл бұрын
    • Surely there are only 400 possible combinations. So why even do the million random rolls?... I'm assuming he'll say something about it in a minute. Lol

      @nic5423@nic5423 Жыл бұрын
    • I mean technically brute forcing by random rolls is not the same as brute forcing every discrete combination, but also brute forcing is brute forcing

      @lewismassie@lewismassie Жыл бұрын
    • @@nic5423 He did the simulation, but then followed it up with enumeration, and then with playing with formulae. And for a problem you truly don't understand, I think that is the right order. So... I *think* he likes to demonstrate that order for people to pick up on. Of course, it gets silly if he makes fun of step 2 and then starts with step 1~ I think a line "before we get to the maths, let's explore from the beginning" would have made that transition smoother!

      @unfortunatelyevil1767@unfortunatelyevil1767 Жыл бұрын
    • Which seems objectively harder in this case.

      @VeteranVandal@VeteranVandal Жыл бұрын
  • Getting a 20 being twice as likely makes sense. But getting a 1 being now just a 20th as likely to happen is a surprising bit of safety I did not know it gave. This was very interesting, and I did not expect it to keep going after the question was answered. Thanks for really going so deep into this!

    @TailsClock@TailsClock Жыл бұрын
    • It makes sense. There's only one way to get a 1 with advantage, and that's rolling two 1s (a 1/20 * 1/20, or 1/400 chance), whereas anytime you roll a 20, you keep it, which can happen 20 different ways (1 and 20, 2 and 20, 3 and 20, ... 20 and 20).

      @AquaticDot@AquaticDot Жыл бұрын
    • @@AquaticDot which is why i was rolling in laughter when it happened to me 3 times in a row.

      @minderbart1@minderbart1 Жыл бұрын
    • @@AquaticDot It's actually almost TWICE as likely to get a 20 when rolling advantage! There are 39 combinations of rolling with advantage on a d20 that result in taking a 20 on the roll. If you roll a 1-19 on Die A and a 20 on Die B (19 combinations), if you roll a 20 on Die A and 1-19 on Die B (19 combinations), and if you roll a 20 on both Die A and Die B (1 combination). 19+19+1=39 You can count that out on Matt's 20x20 grid as well, and 0.25%*39=9.75%, which is the probability given in the video on the bar chart. It all comports with the math in the video :)

      @tobistein9831@tobistein9831 Жыл бұрын
    • @@tobistein9831 Right, I mistakenly forgot that both dice are unique and so you'd count those possibilities twice.

      @AquaticDot@AquaticDot Жыл бұрын
  • There is a game called Dicey Dungeons that takes the multiple dice roll idea to a whole different level. Rather than just wanting the highest value, you sometimes want a low value or a specific value and there are multiple ways to manipulate the dice by increasing or decreasing the value by 1 or splitting a die into 2 other dice, sometimes evenly and sometimes in a random fashion. It can get really crazy sometimes when planning which equipment will give you the best chances in a fight and figuring out how best to use the dice after you roll them. One of the simpler examples would be: You have 2 dice with 6 sides each and you have two pieces of equipment. One allows you to deal damage equivalent to the value on the dice and can be reused infinitely, but it can only take values up to 3, and the other allows you to split one die into 2 other dice that add up to the value of the original die, but the way it is split is random (a 6 could become a 5 & 1, a 4 & 2, or a 3 & 3). This is the default equipment for one of the characters so it gets MUCH crazier as the game goes on.

    @kylerivera3470@kylerivera3470 Жыл бұрын
    • @@ChaosLord5129 🫴 L here you go

      @bigman3274@bigman3274 Жыл бұрын
    • Im pretty sure dicey dungeon fucks with the RNG sometimes (could be bias tho) Still works in theory

      @Snaps12345@Snaps12345 Жыл бұрын
    • @@ChaosLord5129 ratio

      @Lacie9@Lacie9 Жыл бұрын
    • "so it gets MUCH crazier as the game goes on" Like splitting a 1 to get two 1s. :P

      @corruleumblue3317@corruleumblue33178 ай бұрын
    • There's a bunch of different themes going on. Sneaky attacks like to use low numbers, fire attacks tend to use evens and ice attacks use odds (or was it the other way around?), more powerful attacks take doubles or have a 'counter' that you can tick down over time...

      @TehNoobiness@TehNoobiness8 ай бұрын
  • the transition from "I should have glued these together" to "wait i DID glue these together" had me rolling. Matt you have an uncanny ability to deliver scripted jokes in videos.

    @AlphaPhoenixChannel@AlphaPhoenixChannel Жыл бұрын
    • Pun intended? "rolling"?

      @AssassinsWrath@AssassinsWrath Жыл бұрын
    • He is a stand-up mathematician

      @ImDemonAlchemist@ImDemonAlchemist Жыл бұрын
  • The mathematical demonstration of why "Elven Accuracy" is such a good feat. Great video Matt!

    @degv364@degv364 Жыл бұрын
    • Alright, listen. Arcane Trickster with Find Familiar (Owl Familiar!) and Elven Accuracy. It's disgusting, and I love it.

      @double124@double124 Жыл бұрын
    • I mean, 2/3 vs 3/4 really isn't that much of an increase.

      @karlashley8680@karlashley8680 Жыл бұрын
    • @@karlashley8680 that's almost 8.5%

      @inazuma-fulgur@inazuma-fulgur Жыл бұрын
    • @@karlashley8680 That particular build is less about the average, and more about fishing for critical hits. The chance of rolling a 20 with advantage (2d20) is 39/400=9.75% while the chance of rolling a 20 with elven accuracy advantage (3d20) is 1141/8000=14.3%. That means elven accuracy gives you about 14.3/9.75-1=46% more critical hits than you would otherwise get. Since critical hits lets you double all dice (including sneak attack dice!), a crit-fishing build is especially potent for rogues. Fun fact: the same type of crit-fishing build works great for a paladin/hexblade using charisma to attack, since smite dice are also doubled on a crit - and you can choose to smite after learning whether your hit was a crit!

      @rehbeinator@rehbeinator Жыл бұрын
    • @@karlashley8680 2/3 vs 3/4 boils down to almost +2 accuracy, which is pretty good. And...it's not uniformly +2. Specifically when you're using sharpshooter or great weapon master, the specific accuracy ranges associated with these are often nearly +3 accuracy (if you have, say, a 40%-50% chance to hit without advantage). And on sharpshooter/gwm builds, usually accuracy is the most important aspect to boost. But more to the point, it's an additional damage ASI. Most damage-focused builds can only pick four damage ASIs (GWM or SS, bonus action attack, +2, +2). Elven accuracy builds get to stack essentially a fifth damage ASIs (...eventually). In low level damage builds VHuman and CL are still ahead, but in high level builds...elf with elven accuracy builds take over.

      @KaitlynBurnellMath@KaitlynBurnellMath Жыл бұрын
  • You can also use simple geometry to get the 2/3th rule, the probability chart is close to a triangle so you can just get the center of gravity of the triangle to get the average value, which is at 2/3th of the length of the bottom side for a rectangular triangle.

    @VoriuM@VoriuM Жыл бұрын
  • On behalf of all visual learners, this was a masterwork. I can see it in the glued-together dice blocks. It makes sense to me now.

    @benvoliothefirst@benvoliothefirst Жыл бұрын
    • Now picture the 4d cube

      @JamesThompson-zu3bq@JamesThompson-zu3bq11 ай бұрын
    • ​@@tigriscallidus4477I did and couldn't understand it. Probably because it was mostly text and not enough pictures.

      @nelus7276@nelus72768 ай бұрын
    • ​@@nelus7276skill issue. read and write are a sub type of visual learning btw XD XD

      @Vicho1079@Vicho10797 ай бұрын
    • Stop propagating the VAK (Visual-Auditory-Kinesthetic) system. It's been debunked forever.

      @baronvonbeandip@baronvonbeandip4 ай бұрын
  • Another interesting distribution from Dungeons and Dragons is how your character's statistics (Strength, Dexterity, Wisdom, etc.) are determined. You roll four six-sided dice and then discard the lowest die, adding up the total of the remaining three. (So the range of possible values lies between 3 and 18)

    @adam_badam@adam_badam Жыл бұрын
    • I would very much like to see the analysis of this value as well!

      @Moingboy@Moingboy Жыл бұрын
    • The answer is 7+the best die. Using the formula in the video 12.3 would be the advantage stat.

      @iamanoob9747@iamanoob9747 Жыл бұрын
    • @@Moingboy This one's not too hard; it's the average of four six-sided dice, subtract the average of the lowest die (which, by a similar argument to the video, should be roughly 1/5 of the maximum number on the die). So the average value should be roughly 4×3.5 - 6/5 = 12.8.

      @edderiofer@edderiofer Жыл бұрын
    • Looks like it's an average of 12.22 or so with a Standard Dev of 2.85 when I ran it. It also looks fairly normal.

      @dontich@dontich Жыл бұрын
    • Some years back I asked my statistics prof how to analyze this situation and we ultimately concluded the only practical way is to manually crunch the numbers, rather than find some nice algebraic generalization. My question had been to look at "Take the top three dice among 4, then among 5, then generally among 'm' dice", and then eventually to try and find a distribution for "top 'k' dice taken from 'm' dice" - originally assuming 6 sided dice, but from there it should not be hard to generalize it up to 'n'-sided dice... the problem ultimately being that you have weird binomials in counting the ways you can add together k dice to get a given result. It seems like it would be fairly easy to 'write some code' to simulate it - possible even to write some code to brute-force count it for small enough values rather than random sample it - but that doesn't really feel very fulfilling without some kind of general algebraic pattern to tease out.

      @HeavyMetalMouse@HeavyMetalMouse Жыл бұрын
  • I’ve rolled two nat ones on a death save with advantage. After that I also rerolled one of those because we have house rules for inspiration (Basically we treat inspiration like the lucky feat). Anyway, it was a nat one. I rolled three nat ones in a row and my character died because he had already failed his first death save. My next character was a halfling.

    @connorgrynol9021@connorgrynol9021 Жыл бұрын
    • Math goes out the window when the rolls happen in a game with stakes.

      @MannyBrum@MannyBrum Жыл бұрын
    • @@MannyBrum true. As rational as I am, I can’t help but get a little superstitious when it comes to “luck”. In my head I know it’s just probability but in the moment, I’m about as close to praying as an atheist can get.

      @connorgrynol9021@connorgrynol9021 Жыл бұрын
    • ...A Halfling Divination Wizard who, at level 4, takes the _Lucky_ feat.

      @AlbertaGeek@AlbertaGeek Жыл бұрын
    • @@AlbertaGeek I seriously considered exactly that. Our group actually let's players start with a feat. So long as you balance encounters it's perfectly fine and it makes it lots of fun for low level players. In the end, I satisficed myself with a chronurgy wizard with no lucky feat... yet.

      @connorgrynol9021@connorgrynol9021 Жыл бұрын
    • I'm all for math probabilities, but that's the universe telling you to roll a new character.

      @KyleCorbeau@KyleCorbeau Жыл бұрын
  • A thought occurred to me: This video covered rolling multiple dice and picking the _single_ best, however, D&D has another situation (rolling the stats for your character) in which one of the accepted methods involves you rolling multiple four dice and picking the _three_ best. How would increasing the number of picked dice like this affect the equations?

    @coryzilligen790@coryzilligen790 Жыл бұрын
    • Also it is common for DM's to reroll 1's in this process, at least every DM I've meet has allowed it

      @captainepictrick@captainepictrick Жыл бұрын
    • @@captainepictrick I've seen "Roll 3, re-roll any 1s" and "Roll 4, pick the best 3," but never "Roll 4, re-roll any 1s, and pick the best 3" -- that must lead to very inflated stats!

      @coryzilligen790@coryzilligen790 Жыл бұрын
    • There are also ways to have super advantage rolling 3 or more dice for a single roll

      @ghoulofmetal@ghoulofmetal Жыл бұрын
    • Yeah, I was also wondering how would the average change in roll 4d6, drop the lowest. I think it should be 12 or 13 (or in between), but that's a highly uneducated guess :D

      @ignathiel@ignathiel Жыл бұрын
    • @@ignathiel I once calculated the average by brute force in Excel, and it was indeed between 12 and 13. Maybe 12.7-ish, but I can't swear I'm remembering the tenths place correctly.

      @zacheryayers4139@zacheryayers413910 ай бұрын
  • As a player since 1981, I think the Advantage and Disadvantage mechanic is the best thing 5th Edition D&D has adopted. I never even thought of it. Simple, easy to explain to new players rather than a spread sheet of bonuses and penalties.

    @paulcoy9060@paulcoy9060 Жыл бұрын
    • And we throw logic of the window. How someone cheering you up doubles your chances?

      @karpidis@karpidis14 күн бұрын
  • I like to cut up geometric shapes on a CNC plasma cutter and weld together various solids. The other day I accidentally made a rhombic dodecahedron (cut the wrong angle, was aiming for another shape), but now when someone looks at my steel sculpture as asks me why I made that I can tell them, "Its the diagonal of a hypercube"--thus insuring they don't ask me any more questions.

    @DerekWoolverton@DerekWoolverton Жыл бұрын
    • What shape were you aiming for?

      @mujtabaalam5907@mujtabaalam5907 Жыл бұрын
    • @@mujtabaalam5907 NO MORE QUESTIONS

      @U014B@U014B Жыл бұрын
    • Wait, does a hypercube have a unique diagonal? There's no such unique diagonal for a cube.

      @SimonBuchanNz@SimonBuchanNz Жыл бұрын
    • @@SimonBuchanNz is that true of ALL cubes, are just lower dimension cubes (2-cubes and 3-cubes)? Sometimes things don't hold up in higher dimensions even though they seem like they should, this might be one of them but I'm not sure! Edit: pretty sure you're right, it does appear to apply to higher dimensions (as far as I can tell anyway)

      @idontwantahandlethough@idontwantahandlethough Жыл бұрын
    • Did this with my knitted klein bottle hat "the 3d shadow of a 4d twisted donut" gets most people to stop bothering me about my handled hat

      @sachathehuman4234@sachathehuman4234 Жыл бұрын
  • I remember once as a DM asking a player to roll for perception with advantage, they rolled a 1 on both d20s, it was absolutely hilarious and to add insult to injury they had a -1 to their perception modifier.

    @G1NZOU@G1NZOU Жыл бұрын
    • Please tell me you made up the most ridiculous negative consequence you could think of

      @rzezzy1@rzezzy1 Жыл бұрын
    • Haha what an unlucky bunch!

      @palkd8296@palkd8296 Жыл бұрын
    • sometimes the dice are the ones that tell the story lol

      @pvic6959@pvic6959 Жыл бұрын
    • "You notice it's a lovely day, there's nothing to see here, maybe you want to pick some flowers where there's definitely no monsters?"

      @IceMetalPunk@IceMetalPunk Жыл бұрын
    • @@rzezzy1 This sort of thing *sounds* funny but quickly leads to a really bad time for everyone at the table. D&D is not a tabletop RPG that really does critical failure well because of the types of characters you're expected to be playing (competent heroes), and the statistics (a flat roll most of the time, with a simple weighted distribution w/ disadvantage or advantage). Something like Vampire the Masquerade or Genesys (a game that actually has mechanics for weird outcomes) is way better for that sort of game without derailing it.

      @ppppppqqqppp@ppppppqqqppp Жыл бұрын
  • This is fantastic. This explains why in ‘Risk’ that the attacker has the advantage. The attacker (if they have enough men) can attack with 3 dice (a 3/4 advantage) as opposed to the defender who only get 2 dice (a 2/3 advantage). There is one spanner in the works though. If the attacker and the defender roll the same value, the defender wins. I wonder how this affects the odds.

    @andrewellis3447@andrewellis3447 Жыл бұрын
    • Going through the risk comment by Mario W, someone corrected an answer to 6.65% advantage for the attacker.

      @Zraknul@Zraknul Жыл бұрын
    • I just wrote some Javascript to replicate this, across a million instances the defender won 52.5% of the time If we also include a 'draw' state it works out like this (with a different million instances) attacker: 47.1% defender: 28.1% draw: 24.8% So adding the defender and the draw together they win just over half the time

      @dwakeling1@dwakeling13 ай бұрын
  • This is fantastic, I do a lot of homebrew and over stress numerical balance and was having a hard time figuring this formula out! Definitely gonna be making use of that

    @Zachpi@Zachpi Жыл бұрын
  • Imagine two people are playing dice against each other, where one has 2 dice, and the other has 1; the person with the highest dice wins. taking n->∞ its clear to see that the probability of any one dice being the winning one, is 1/3, and the player with 2 dice, has a probability of winning at 2/3. From this, it kinda intuitively makes sense to me, that the average highest value of the 2 dice is 2/3*n, as that is the average value needed for 1 dice to beat another 1 dice with the normal average of 1/2*n exactly 2/3 of the time. This logic scales into higher numbers of dice. This isn't rigorous at all, and it assumes very large n, but it makes sense to me, so I thought I'd share it.

    @ClostridiumChampion@ClostridiumChampion Жыл бұрын
    • That's smart and so are you

      @ancientswordrage@ancientswordrage Жыл бұрын
    • Nice insight! I'll have to think about this line of reasoning some more.

      @ronandevlin1479@ronandevlin1479 Жыл бұрын
    • That is an excelent line of reasoning! I like that sort of intuitive view that, sure, doesn't account for the minor details, but makes it clear what is going on.

      @austingarcia6060@austingarcia6060 Жыл бұрын
    • The general expected value for the person with 2 dice of n faces is (n+1)(4n-1)/(6n) so yes, it does approaches 4/6=2/3.

      @duongquocthongho2117@duongquocthongho2117 Жыл бұрын
    • Wow. That blew my mind.

      @xidarian@xidarian Жыл бұрын
  • This is absolutely incredible. Now for the next game-dice-problem: *RISK* . It would be so nice to see a follow-up video of this, visualising the 3 dice against 2 dice fighting mechanic, and to see how the defenders advantage plays out.

    @mariow.3063@mariow.3063 Жыл бұрын
    • +

      @conorlamere399@conorlamere399 Жыл бұрын
    • We need this !

      @cajungames@cajungames Жыл бұрын
    • Yes please! The math behind risk is fascinating, and I would love to see you explore it.

      @kotori87gaming89@kotori87gaming89 Жыл бұрын
    • Bump

      @hakonatli@hakonatli Жыл бұрын
    • I was going to comment this if no one else was! And then also to expand I was looking specifically at the Risk Legacy faction ability of the Bear Riders ability which is: when you roll 3 6s and defeat at least 1 of the opponent's armies, you destroy ALL the defending army. This already seems VERY unlikely to happen let alone be useful, so we house ruled that if all your attack dice are higher then the defenders, they lose the lowest di value in troops. I know it's better, but was having trouble calculating the odds to show it's effectiveness.

      @justincatlett56@justincatlett56 Жыл бұрын
  • This was genuinely a blast to watch. I was about to grab a notebook and get to calculating stuff for 3 dice and then just like that you do that exact thing! I always knew probabilities behind dice rolls and games based on them were impressive but wow. This is something special. Math is so beautiful at times or years me up.

    @artempozdniakov2850@artempozdniakov28503 ай бұрын
  • Fantastic breakdown, I'd long wondered about how exactly the math of advantage works out. I do think the +1/2 factor you mention at the end can't be that simple - or if you rolled say, 30d6 and picked the highest one, you'd end up with an average above 6!

    @Blackadder125@Blackadder1256 ай бұрын
  • I think the median value is also relevant for this situation. When rolling two D20s, it’s 15. There’s a 51% chance of rolling at least 15.

    @blackmber@blackmber Жыл бұрын
    • and then you consider that most stats have a positive modifier by the time your 4th level, and advantage seems pretty important

      @finleyburns4918@finleyburns4918 Жыл бұрын
    • This is why advantage is considered an equivalent to a +5 bonus when looking at passive skills in D&D 5e, such as passive perception.

      @Nebafyer_DandD@Nebafyer_DandD Жыл бұрын
    • This is because Advantage isn't an equivalent bonus to it's increase in the expected die roll... the effective bonus to the die roll depends on what DC you're trying to hit. Advantage is worth an effective +5.1 bonus if you need to roll an 11 on the die, and it's worth an effective +0.95 bonus if you need to roll a 20 on the die... In essence the "effective bonus" of advantage is higher than the "average" of +3.25 if you're trying to hit a number in the middle of the range, and lower if you're trying to hit a number in the extreme of the range. Since 5e is designed around a system philosophy of bounded accuracy, such that most of your rolls are trying to hit values in the middle of the range, the "effective" bonus of advantage is around +4.5. Thus advantage is worth something in the +4 to +5 range to *most* rolls.

      @Ahdok1@Ahdok1 Жыл бұрын
    • @@Ahdok1 now for a more interesting question: is it better to have advantage on an attack roll, or to give a disadvantage of a saving throw?

      @MikelSyn@MikelSyn Жыл бұрын
    • @@Ahdok1 The only place where it's mentioned in the PHB that advantage is equivalent to a +5 is for passive rolls, where it assumes you roll exactly a 10. With a straight d20, you have a 55% chance of rolling 10 or higher. With advantage, you have a greater than 50% chance of rolling 15 or higher. Which makes them roughly equivalent. It's nothing to do with expected range of results, but purely because passive rolls are meant to take the median result, and a +5 is equivalent to advantage for that.

      @xanderh2404@xanderh2404 Жыл бұрын
  • I remember, way back when in an ancient issue of _Dragon_ magazine, one writer proposed a system of divided dice rolls. You could roll D20/D6, say, or D12/D4, and round off. With the right combination of dice you'd get something that had about the same average value as a standard die roll, but with a probability of getting an extreme value. e.g. rolling 13/3 would give you a middling 4, 20/1 would be a devastating critical hit, and 1/4 would net you a goose egg (or a 1 if you declare zero to be invalid). Unfortunately, my copy is long gone, and I don't think it went too deep into the math, but I remember it had tables with the probabilities for some of the common die combos, and the standard dice rolls they could replace. I always thought it was an interesting idea, although I never had a chance to use it myself. I'd love to see those numbers again or learn how to calculate them. Edit: I found it. It's in _Dragon_ #94 (Feb. 1985), and the article is titled "Same Dice, Different Odds". The entire issue is available on Internet Archive. Now to read it again.

    @davidh.4944@davidh.4944 Жыл бұрын
    • Props for coming back to edit in the issue number! As someone who likes to theorize homebrew dice systems with a befriended GM, I appreciate that!

      @CandeIero@CandeIero Жыл бұрын
    • Couldn't you do something similar by multiplying the results of two dice together? E.g. roll two D12s together, multiply the results, and declare that to be the damage dealt by a powerful spell. If that's too high, you can just divide it by a constant like 10 and round off the result. It can even make physical sense to do it that way, with say the first D12 determining how many shots are fired and the second D12 determining the damage of each shot - that's how WH40k handles mortars if I remember correctly. Like dividing the dice by each other, this leads to a result that's more variable than adding dice to each other, but less variable than rolling a single dice. (More specifically, adding dice to each other results in the normal distribution if you use enough dice; multiplying and dividing dice by each other results in the log-normal distribution if you use enough dice; and a single dice roll gives you the uniform distribution.)

      @jonghyeonlee5877@jonghyeonlee5877 Жыл бұрын
    • For those interested in reading the article mentioned in this issue, the Internet Archive has a copy.

      @dtaggartofRTD@dtaggartofRTD Жыл бұрын
    • "It's available on the internet archive." ... for now, at least

      @50mt@50mt Жыл бұрын
    • @@50mt And hopefully for the foreseeable future. It's available now. If you're worried about it being taken down, download it and back it up. Redundancy is how digital media lasts forever.

      @dtaggartofRTD@dtaggartofRTD Жыл бұрын
  • I was decent at math during my initial education, then got a bunch of poor teachers, and started hating math. (Though very mild number blindness didn't help) This man gives me enthusiasm in numbers again by his infectious joy in them... even if I have no clue what he actually does most of the time.

    @Deadl0ck@Deadl0ck Жыл бұрын
  • Amazing! this is a question that I have been pondering for years. thanks for taking the time and giving the easy maths at the end!

    @TristanChicklowski@TristanChicklowski Жыл бұрын
  • There’s a similar thing in D&D when you’re generating your character’s initial stats for traits like Wisdom, Charisma, Strength, etc. To generate your base stat, you may roll 4d6 and then add the highest three values together. Perhaps a hypercube for another day.

    @singerofsongs468@singerofsongs468 Жыл бұрын
    • It actually tells you the average is about 12 in the 2nd, 3rd, and 5th edition player's handbooks.

      @juliuswarburton@juliuswarburton Жыл бұрын
    • @Smee Self I can't speak for the fourth edition. I don't have it.

      @juliuswarburton@juliuswarburton Жыл бұрын
    • @@juliuswarburton I think it's more complicated than that because you have to factor in all of the cheating everyone will do.

      @jayteegamble@jayteegamble Жыл бұрын
    • If "keep the highest of two" is the m=2 case, this could be called the m=4/3 case. Likewise, "keeping the highest two of three" is sort of m=3/2. But there's already a solution: take the expected values of 4 single dice as if you wanted to keep ALL of those (4 * 3.5), then subtract the e.v. of the discarded die, which is the lowest of four. That's analogous to the math for "highest of four" but 6+1 - the e.v. of the highest of four. So the bottom line is that we have 4 * 3.5 - (7 - EV) = 7 + EV, where EV is the expected value of the highest of four dice, which is 5.2446. So, ~12.2446.

      @achtsekundenfurz7876@achtsekundenfurz7876 Жыл бұрын
    • @Smee Self 4th just emphasizes non-random options over rolling for ability scores - point buy or just using a prefab array of 16, 14, 13, 12, 11, 10 and assigning them as you like. They still mention that you can roll for ability scores but there was more of a focus on gameplay balance so it's discouraged compared to the other options.

      @CatCheshireThe@CatCheshireThe Жыл бұрын
  • Another cool thing about the 2/3 being the expected value is that 2/3 is also the centroid for a right triangle like the one shown by the probability distribution. Which makes perfect sense since that is the shape of the distribution as n goes to infinity. And here we are, back to geometry! 🤯😁

    @ryanclark1878@ryanclark1878 Жыл бұрын
    • that's what i wanted to comment! as i saw the chart, 2/3rds seemed incredibly obvious, though the algebraic working out was more rigurous and fun to see

      @aiocafea@aiocafea Жыл бұрын
    • Finally its here. YES kzhead.info/sun/fZluh7KygIR_iIU/bejne.html.

      @newciouss@newciouss Жыл бұрын
    • Was going to say, surprised that wasn't mentioned!

      @starseeker3311@starseeker3311 Жыл бұрын
    • Even cooler, the centroid of a tetrahedron is 3/4 down from the top!

      @AdamRidley11@AdamRidley11 Жыл бұрын
  • I have seriously wondered what the answer for this specific question was for years now. Thank you for taking the time to explain it!

    @colewilkinson74@colewilkinson74 Жыл бұрын
  • I'm a Dungeons and Dragons player who is studying series this morning for an upcoming exam, so I'm thrilled to find this video. Very informative. Thanks a bunch!

    @paladin1164@paladin1164 Жыл бұрын
  • This video was a masterclass in teaching. This is the kind of thing that would inspire a lot of my high school students to study more math... not because they would magically understand everything after watching this, but because they would WANT to try and understand this stuff some day... a call-to-arms for personal improvement. Matt shows there are a lot of fun things that can be figured out using equations, programs and physical modeling and, most importantly, there is joy in finding the connections for yourself. True learning starts from a position of ignorance and humility and work towards a better understanding. Teachers should take a note from this video and be willing to say, "I don't know," and cheerfully work to connect a new mystery to several lines of their prior knowledge. Matt's vulnerability and honesty gives the viewers permission to let down their guard and do the same. Outstanding stuff!

    @GuillotinedChemistry@GuillotinedChemistry Жыл бұрын
    • Not Science BUT noteworthy-af for the Curious and/or Empathic and/or those who wanna be informed: 1 of the most Empathic Videos i ever saw just came out: "Why do I Care?' by 'Belief It Or Not'. Together with the GOP-Vidoes of 'Some More News', this really paints a Picture and i hope my comment here has effectively... spread... some Awareness.

      @nenmaster5218@nenmaster5218 Жыл бұрын
    • I got lost when he cut the video to magically handwave away the math. I would say it's a pretty clear example of bad teaching, because after that nothing made sense.

      @fuckyoutubefuckinghandles@fuckyoutubefuckinghandles Жыл бұрын
    • If I saw this video freshman year of high school before KZhead existed I’d have taken math a lot more seriously. This specific video about TTRPG dice rolls :p

      @OpiatesAndTits@OpiatesAndTits Жыл бұрын
    • @@OpiatesAndTits I agree wholeheartedly.

      @GuillotinedChemistry@GuillotinedChemistry Жыл бұрын
    • @@fuckyoutubefuckinghandles I was also disappointed about the handwaving, but I don't think it's fair to call it bad teaching. This video isn't a lecture covering every detail, it's telling you a personal problem solving story. I think what the original comment was getting at is using creative methods like Matt does to express difficult or abstract concepts, really helps people feel more comfortable and open to learning and making their own connections. Plus he is thorough enough in his walkthrough that if you want to know more about a specific step you at least have an idea about what to research!

      @ThePhunnman5@ThePhunnman5 Жыл бұрын
  • This generalises in another direction; namely, if you roll m n-sided dice, and pick the kth-lowest die, then as m tends to infinity, the expected value of your roll tends to kn/(m+1). Look up "order statistics" for a more rigorous proof of this result.

    @edderiofer@edderiofer Жыл бұрын
    • k?

      @Hooman1130a@Hooman1130a Жыл бұрын
    • @@Hooman1130a The alphabet goes "K, L, M, N". Mathematicians tend to skip L and use K instead. My guess for why they do this is that lowercase L can look too much like a 1.

      @kindoflame@kindoflame Жыл бұрын
    • @@kindoflame we do use L for some things, personally I write my lowercase l's as cursive (a bit like a fish pointed upwards). A bit like how I give my z's and 7s bars to distinguish them from 2s and 1s.

      @spacelem@spacelem Жыл бұрын
    • I was hoping he’d go into picking the lowest of the rolls, luckily the comments have my back

      @robertovillagran5364@robertovillagran5364 Жыл бұрын
    • is this edderiofer from the maths subreddit?

      @gammakay521@gammakay521 Жыл бұрын
  • I've previously worked it out for 2 and 3 D6s after playing Bloodbowl and more recently after playing Eldrich Horror. It's really neat to see your physical dice models and have it confirmed that the relationship continues for additional dice. The point you make at the end regarding the half is very satisfying when you realise it.

    @QT5656@QT5656 Жыл бұрын
  • I love how casual he is about running a million experiments in a fraction of a second (in python no less, not really the optimal language for speed). Computers have come a long way.

    @JMhellendoorn@JMhellendoorn Жыл бұрын
    • Decades ago, computer scientists/mathematicians would have to plan a number of days of simulating on a super computer to get that kind of bar chart. I do love the casual simulation of 1,000,000 dice rolls!

      @surajvkothari@surajvkothari Жыл бұрын
    • An interesting video from Dave's garage. Python versus various flavours of "C": kzhead.info/sun/d5ehZpaqnpetjYU/bejne.html

      @PaulCotterCanada@PaulCotterCanada Жыл бұрын
    • It's all pseudo random numbers though, a real person would roll in a completely different way, which makes all of this theoretical

      @advancewarstournamentseries@advancewarstournamentseries Жыл бұрын
    • I've thought about trying to program shuffling a deck of cards to more accurately represent how a human would, instead of random swapping

      @Legitosity@Legitosity8 ай бұрын
  • The problem with looking at expected value in D&D is that every check is pass or fail. Advantage is often far better than the expected value increase would suggest because it disproportionately benefits lower rolls. Example: You need to roll 10 or better to succeed. A flat +4 bonus to the roll increases the chance of success by 20%, while advantage increases the chance of success by nearly 25%, despite adding a lower expected value.

    @mqb3gofjzkko7nzx38@mqb3gofjzkko7nzx38 Жыл бұрын
    • These are two different things that's why the former is in effect the same as the odds of not failing a single attempt against a lowered effect DC. The latter is in effect the probability of not failing twice since you effectively get two chances to succeed and can treat any single failures as a success. With disadvantage of course being the opposite you effectively have to succeed twice as if either fails then the result is a fail.

      @seraphina985@seraphina985 Жыл бұрын
    • Here's a video illustrating the general formula for an n-sided die, rolled m times, and observe the kth largest of the m rolls. kzhead.info/sun/ZcehhNibpIR3po0/bejne.html

      @statisticsmatt@statisticsmatt Жыл бұрын
    • Math is really simple for general case if you use the raw probabilities. Basically, reverse the question. In order to fail, you need to fail twice on your rolls. If it is a 50% chance to fail, you have a 25% chance to fail twice. That holds in general for any chance. Rolling n times and taking the best result is the same as raising your chance of failure to the nth power. So 3 rolls with a 10% chance of failure becomes 0.1% chance of failure.

      @rein7046@rein7046 Жыл бұрын
    • The REAL problem is, if I'm the one playing in your example situation, I'm rolling two 1's every time.

      @fisharepeopletoo9653@fisharepeopletoo9653 Жыл бұрын
    • The math(s) behind 4th edition(1) was simple but I liked it. Assuming your party was made of four spherical cows in a vacuum and you were attempting a level appropriate action you needed to roll a 10 or higher. That's it. Your average bonuses from stats, gear etc was cancelled out. You don't have to look it up or ask for a stat, the dice will tell you yes or no. Oh and a monster took four hits so everyone got to do something which is nice for the I can't roll initiative to save my life crowd. 1) At launch. The power creep was fairly disgusting but there you go

      @duckrutt@duckrutt Жыл бұрын
  • I love how thoroughly you explore problems like this! When you first said the probability went from 1/2 to 2/3, my immediate instinct was "that's too nice of a number for this to stop there". But of course if there's ANYONE who's gonna bring in 4-dimensional hypercubes and take the question too far, it's you!

    @coryman125@coryman125 Жыл бұрын
    • n-dimensional objects for best out of n-dice!

      @Markus-zb5zd@Markus-zb5zd Жыл бұрын
  • I'll be honest. I came here for the DnD probability; I stayed for the passionate lession! I'm not very interested mathematics but your delivery had so much excitement, I found myself THOROUGHLY entertained. Thank you!

    @landler656@landler656 Жыл бұрын
  • just landed here by chance, absolutely love how you solved the question of rolling 2d20 with advantage and then went above and beyond to figure out the n's and m's. also incredibly satisfying how math just WORKS

    @alexm892@alexm8926 ай бұрын
  • As a DM for D&D, it's really handy to remember the average for rolling an "A" number of "B"-sided dice is [ A • (B + 1) ] / 2. This of course works for any number of sides and any number of dice

    @nintendocyclone@nintendocyclone Жыл бұрын
    • Or in simpler terms, its the middle value+1, then round down if it is a decimal number. So for a d12, its 7, for a d8 its 5 and for a d120 its 61

      @Chris_winthers@Chris_winthers Жыл бұрын
    • Hold on, if we use this for, say, 2d20, then it would be 2x(20+1)÷2=21, and that just doesnt Seem right. Can anyone explain This?

      @Chris_winthers@Chris_winthers Жыл бұрын
    • @@Chris_winthers No, that's correct - you can't get 1 from 2d20 so the range is slightly restricted, hence it makes sense that the average will be 1 higher than the faces. Same as how the expected value for 2d6 is 7!

      @kirby1024@kirby1024 Жыл бұрын
    • @@Chris_winthers You are rolling two d20s. Both have an expected average of 10.5, which when you add them together you get 21.

      @King0fYou115@King0fYou115 Жыл бұрын
    • @@King0fYou115 oh, this is the average combined result. Thanks

      @Chris_winthers@Chris_winthers Жыл бұрын
  • 4:45 the 2/3 is because of the center of mass of a triangle being 1/3 above each of its sides. If you imagine having infinitely many sides on the die, the graph of the probability of landing on each side would approach a perfect triangle, so the average would be at 2/3 along the x-axis. Also, another explanation for the graph being a line is that the probability of getting each option is the odds of the first die being that number times the odds of the second die being below that number. Since the odds of the first die being that number is constant, then the odds of getting any given option would be linear since the number of options below that option is linear

    @leokastenberg800@leokastenberg800 Жыл бұрын
    • @@Mewobiba the average for 2dNk1 approaches 2/3 as N approaches infinity. It's never exactly 2/3 for any N

      @rorywagstaff9219@rorywagstaff9219 Жыл бұрын
    • ​@@Mewobiba The average as you approach infinitely many faces approaches 2/3. In the same vein, as explained in the video, the average for 1d20 is 10.5 (because obviously), and in general, the average for 1dN is N/2 + 1/2 As you approach infinitely many faces, the +1/2 matters less, so the average approaches exactly N/2. Similarly, the average for any small value of N with 2dNk1 will be _about_ 2/3 N, but will approach _exactly_ 2/3 N with infinitely large N

      @user-rv9vk8by5i@user-rv9vk8by5i Жыл бұрын
    • Converting a stepped line with infinite small steps into a straight line bears the danger of killing Pythagoras. So are you sure you can convert it?

      @NLGeebee@NLGeebee Жыл бұрын
    • @@NLGeebee Pretty sure that in this case it doesn't matter. The probability of getting any number could be found by dividing the area of the bar associated with that number to the area of the entire "stepped triangle" (this is what I'm gonna call this shape from now on) Now, while decreasing the step size doesn't change the length of the "stepped hypotenuse", which is the reason Pythagoras' theorem doesn't work with stepped triangles, no matter how small the step is, the area of the stepped triangle does indeed approach the area of a regular triangle. So, since probability is associated with the area, it's perfectly fine to do what the commenter above did.

      @SophieJMore@SophieJMore Жыл бұрын
    • @@NLGeebee The perimeter of the stepped triangle stays the same no matter how many steps it has, rather than approaching the true triangle. But the area behaves nicely (and never cared about Pythagoras in any case).

      @gmalivuk@gmalivuk Жыл бұрын
  • I remember making a spreadsheet for the "roll four six-sided dies, drop the lowest and add the rest", love your take on a similar thing !

    @guilhemmarty6287@guilhemmarty6287 Жыл бұрын
    • What were your findings there? I have been trying to figure out how to go about it.

      @benjaminmoroni@benjaminmoroni Жыл бұрын
    • @@benjaminmoroni i did it too but with "roll 3D6 and add the 2 best results" and the mean was 8.45333...

      @delta-chat@delta-chat Жыл бұрын
    • @@benjaminmoroni I, too, have made a roll four, pick three spreadsheet, and it works out to an expected value of a little over 12.24.

      @kevinr.9733@kevinr.97336 ай бұрын
    • ​@@kevinr.9733 I did the same and came up with 12.44, so we're definitely in the same ballpark

      @LouPanetta2@LouPanetta212 күн бұрын
  • This is amazing! When I was a TA in game theory I found a similar formula to use in action games for calculating the expected value of an offer, given that offer won. I could never figure out how to prove the formula though, just show that it intuitively worked. And now I see this video of you showing the maths behind it!

    @MrZernichow@MrZernichow Жыл бұрын
  • I love this so much. Starts out being about probability, then turns into geometry, then turns into algebra, then dances between the three. And whichever of these you're strongest in, it helps with your intuition for the other two.

    @sandystarr0@sandystarr0 Жыл бұрын
    • Really helps show that all of these areas of math are intricately related; they're not just separate subjects in school

      @Magesa@Magesa Жыл бұрын
    • Don't forget DnD!

      @ideegeniali@ideegeniali Жыл бұрын
    • Another way to look at the problem is through the idea of Effective Hit Points. (EHP) The formula for EHP's coefficient compared to base Hit Points (HP) is:[ (1+x) ] where x is the percentage of mitigation. So if x is 100%, then the HP total for a character is effectively doubled. At x=200%, EHP is tripled, and so on. (Of course with x=0%, EHP is the same value as base HP, because there is _no_ mitigating coefficient.) The effect that mitigation has on incoming damage can be figured out by flipping the equation so it become the coefficient:[ 1/(1+x) ]. A character with twice as much EHP as their base HP takes half damage, and with thrice as much takes only a third, making it _effectively_ that much HP, after damage reductions are applied. The law of averages suggests that over an infinite number of iterations, removing a fraction of hits due to a percentage chance to avoid all the incoming damage of a fraction of hits mathematically totals to the same amount of damage dealt as if they all hit, but were each reduced via mitigation. (Dodge is as good as armor, when spikiness isn't a factor.) This explains why damage dealt by rolling with advantage on average follows the formula:[ 1-1/(1+x) ] where x is the number of dice rolled. It's just anti-mitigation, through an avoidance mechanic. However, it is interesting that it the changes the shape of the distribution. In the non-average case, where each individual number matters, rolling advantage is _not_ the same as a crit / dodge mechanic.

      @ladymercy5275@ladymercy5275 Жыл бұрын
    • **tl ; dr** If World of Warcraft had a mechanic like rolls two (2) random numbers for an ability, and takes the higher value for it, then it would equate to armor penetration in the average case. Thus rolling for advantage ≈ armpen in the way most RPGs calculate damage these days.

      @ladymercy5275@ladymercy5275 Жыл бұрын
  • Brilliant! This is by far the best visualization of dice odds I've seen, and perfect for anyone trying to get a handle on TTRPG systems using nd6 as the core rolling mechanic.

    @sundaykessig-kinkaid7313@sundaykessig-kinkaid7313Ай бұрын
  • I’m impressed with his level of self-restraint in this video. Based on previous videos he has done, he has, as far as I can recall, always jumped at the opportunity to construct hypercubes with glue and dice. Just wonderful. Very good to see him growing as a person.

    @wtblessing@wtblessing6 ай бұрын
  • Notice that 1*(1^3 - 0^3) + 2*(2^3 - 1^3) + ... + n*(n^3 - (n-1)^3) = n^4 - (0^3 + 1^3 + 2^3 + ... + (n-1)^3), just by combining terms. This means our problem is related to Bernoulli's classical work on sums of powers. It is known that for any m the leading terms of 1^k + ... + n^k are n^k/(k+1) + n^(k-1)/2, which should directly imply Matt's conjecture!

    @johnchessant3012@johnchessant3012 Жыл бұрын
    • Here's a video illustrating the general formula for an n-sided die, rolled m times, and observe the kth largest of the m rolls. kzhead.info/sun/ZcehhNibpIR3po0/bejne.html

      @statisticsmatt@statisticsmatt Жыл бұрын
  • The reason the +1/2 comes into play is that standard dice aren't zero-indexed. A uniform distribution of 0 to 6 (or -.5 and 6.5) has a mean of 3, but the distribution from 1 to 6 (.5 to 6.5) is 7/2 or 3+1/2.

    @addymant@addymant Жыл бұрын
    • If it was continuous you would add 1/m for [1,n] vs [0,n-1] m is the amount of dice you are rolling Edit: this should also work even if the distribution is discrete Also this is assuming uniform distribution

      @iamanoob9747@iamanoob9747 Жыл бұрын
    • This isn't quite right, the +1/2 you're talking about doesn't have to do with the +1/2 seen in the video. If the standard dice was zero-indexed instead of one-indexed, then the expected value seen in the video would have -1/2 instead of +1/2. So, you get a "0.5" at the end regardless of which index you choose. The +1/2 you're referencing similarly doesn't have to do with zero-indexing versus one-indexing. It actually has to do with the number of sides on the dice. The mistake here, is that 0-6 is actually a 7-sided die. Not a 6-sided die. A 6-sided die marked 0-5, would have an EV of 2.5, which still ends in 0.5. It doesn't make much of a difference to shift everything by one, it's only caused when n has an odd parity. ~ But, also note that the "0.5" seen in this video, exists regardless of whether n is even or odd. It's always there, and is totally unrelated to the parity of n. So, these are unrelated phenomena. The "0.5" happens in the video totally independently of the "0.5" you mention above.

      @npip99@npip99 Жыл бұрын
    • @@npip99 the EV of a die with faces from 0 to n is n/2 You only get the -1/2 if you decide to define n as the number of sides instead of the highest value.

      @addymant@addymant Жыл бұрын
    • @@addymant your reasoning is actually the same. A six-sided dice can only be labeled from 0 to 5, otherwise it would have to be seven-sided.

      @PontusLarsson1@PontusLarsson1 Жыл бұрын
    • ​@@npip99 I think they were saying that the 1/2 comes from being 1 indexed because if it was 0 indexed then the formula would be: highest number / 2 instead of (highest number / 2) + 1. The number of sides isn't in the equation for expected value of a roll because the values come from the number written. The other way to look at it is to just calculate the average rolls value, and channel Gauss when adding sequential numbers (use the shortcut of adding the first and last, 2nd and 2nd last). So for a d6, you add up 1,2,3,4,5,6 and dividing by six, which is 3(6+1)(1/6) or (n/2)(6+1)(1/n). It's always highest + lowest divided by 2 ... plus the half because you can't roll a zero and the numbers are shifted over by 1 which bumps the average by 1/2. Many D&D players intuit this is a similar way, "well the middle is 10, but the average is between 1 and 20, not zero and 20 so the middle is 10.5 ... I think?" and it is very interesting to see.

      @freshhawk@freshhawk Жыл бұрын
  • I knew this from a thing called math A around here, lots of permutations and stuff, but the visual representation was really cool in this one. Never thought of it like that, and it would have been so helpful, when I was 15 in school (26 years ago :) ). Thanks for the upload.

    @ice9ify@ice9ify Жыл бұрын
  • that was one of these start page videos which proved to be really, really good, thank you :D

    @joschis.5192@joschis.5192 Жыл бұрын
  • For anyone wondering where the (3x)(x-1)+1 comes from when working out the shell numbers, start by looking at the shape of the shells. Each is a cube of size x with the next-size-smaller cube cut out of it. You can work out the size as (x³)-((x-1)³). Multiply that out and you get x³-x³+3x²-3x+1, which is 3x²-3x+1, which is (3x)(x-1)+1.

    @blacksheep9950@blacksheep9950 Жыл бұрын
  • Personally, for D&D, I found the median more interesting than the mean. A failed roll doesn't contribute to the next roll, so I really just care how often a roll is higher than the target.

    @3geek14@3geek14 Жыл бұрын
    • Here's a video illustrating the general formula for an n-sided die, rolled m times, and observe the kth largest of the m rolls. kzhead.info/sun/ZcehhNibpIR3po0/bejne.html

      @statisticsmatt@statisticsmatt Жыл бұрын
    • For two dice the median is n/√2, because to divide the triangle in half you need to cut it at 1/√2 of height from the tip (the area grows with the square), and because with more dice we deal with more and more dimensional objects I believe that general formula for a median is n/m√2 (that is n over the mth root of two).

      @pyglik2296@pyglik2296 Жыл бұрын
  • This video is incredible. I'm so happy I found this. I was actually trying to work out this exact stuff a few months ago. I was able to find the formula for two n-sided dice (using the spreadsheet method, naturally) but got hung up when I got to three dice, and generalizing it to any number of dice with any number of sides seemed beyond my ability. And as far as I could see via Google, there was no indication that anyone else had tried to do it. It never occurred to me to try a physical representation, but I would have gotten a lot further if it had. 😅

    @SolipsismSyndrome@SolipsismSyndrome11 ай бұрын
  • as someone with learning disabilities who's a very visual learner and has struggled a lot with algebra and math in general, this is SO COOL! Seeing the stacks of dice, it clicks and my brain goes "oh, of course!". It feels like finally being in on something that everyone else understands and I never have. :')

    @VermisTerrae@VermisTerrae Жыл бұрын
    • @J4zzling No, just an 4zzhole :)

      @tobistein9831@tobistein9831 Жыл бұрын
    • i think it's not necessarily the learning method but just the talent of Matt's to deliver

      @sakesaurus1706@sakesaurus17067 ай бұрын
  • Having an active conda installation but then manually entering the path to a completely different python instance is such a Parker way of programming 😄

    @hauslerful@hauslerful Жыл бұрын
    • it's almost like he wanted all of us to know that he uses homebrew's python installation and that he save his scripts on Dropbox

      @radadadadee@radadadadee Жыл бұрын
  • The 2/3 result makes so much sense when you notice the probabilities make a right angle triangle. As n goes to infinity you are essentially taking an integral, and the centre of mass of a triangle is at 1/3 it's height, so lay the triangle on its side with the point at 0 and hey presto the centre of mass is now at 2/3

    @LemonArsonist@LemonArsonist Жыл бұрын
    • geometrically this seems a very elegant solution ;)

      @Dr.RiccoMastermind@Dr.RiccoMastermind Жыл бұрын
    • I was wondering if there was a geometric way to find the area.

      @EpsilonRosePersonal@EpsilonRosePersonal Жыл бұрын
  • Absolutely stellar! Thank you for your time and effort!

    @bumblebeaver@bumblebeaver7 ай бұрын
  • As a DnD AND math nerd, this video was very exciting to watch. Especially when I saw the pattern of the centered hexagonal numbers and paused the video to work out the equation for myself! Math is so fun.

    @NUGGet-3562@NUGGet-35627 ай бұрын
  • This reminds me of something my brother and I did in a game for which we felt that the results of a single d6 roll were so important, that I came up with a method to make the rolls more weighted towards the average. We would roll 3 d6 instead of just 1, and throw out the high and low values, using the median as the result.

    @davepyne@davepyne Жыл бұрын
  • Side note: when Matt said "average" in this vid, he meant the mean, which is perfectly reasonable. But if you're actually playing D&D you almost always care about the median instead. With advantage, the median roll on a d20 is 15. This is why you may have heard that advantage is like a +5 bonus.

    @josephpierce8926@josephpierce8926 Жыл бұрын
    • But it's important to note that it's only *like* a +5 bonus, not actually the same. It depends on the DC. A flat roll with advantage can never beat a 21 but a +1 can. Of course given the nature of the game you have to generalize it when making that kind of decision, but it's something to keep in mind.

      @ansalem12@ansalem12 Жыл бұрын
    • *elven accuracy advantage just advantage I’ve always calculated as “+4ish” erring on the side of it being a little better, this tells me it’s about +3.5ish, though, better for stability, so as a DM you probably want to give out more advantage then +4s, depending on system.

      @thetzeentchianrepresentati5547@thetzeentchianrepresentati5547 Жыл бұрын
    • The average value when rolling a d20 is 10.5, the average value when rolling with advantage on a d20 is 13.825, which is only a 3.325 bonus. That being said, the bonuses from +3.325 and rolling with advantage are very different because if you need a nat 20, advantage only gives you a 9.75% chance rather than a +3 giving a 20% chance. With advantage, you prevent low rolls from being a problem but with bonuses to your roll you make your upper reach higher and things at your upper reach much easier to reach even as opposed to having advantage

      @ProbablyEzra@ProbablyEzra Жыл бұрын
    • @@jamess3395 Idk if you just looked at the original comment or actually read the replies, but my reply right before yours clearly states the average bonus to the roll....and it is NOT +3.825.

      @ProbablyEzra@ProbablyEzra Жыл бұрын
    • @@jamess3395 the average on a d20 is 10.5 stock, the average on an advantaged roll is something like 13.8, 13.8-10.5 is 3.3, which is less just under 3.5, but rounding it up to 3.5 makes everyone's life easier because it means less complex math on the fly, and it means I can just call the average on advantage is "a little under 14" or +3.5 equivalent when deciding to give it out vs. things like flat +2/4/6s I'm pretty sure the part you missed here was that pattern of 2/3 (advantage) 3/4 (elven accuracy (3 dice)), 4/5 (4 dice) doesn't work backwards for some reason, it's not 1/2 for one die, because there's no zero, so the minimum value is 1, but maximum is still 20, so it's a *little* higher then ten, this is true for every die. It's the reason you (generally) want to roll 2d6 rather then 1d12, your numbers are a little higher.

      @thetzeentchianrepresentati5547@thetzeentchianrepresentati5547 Жыл бұрын
  • There is actually an ability that allows you to roll 3 dice in D&D. Elven accuracy allows you to roll a 3rd dice when you have "advantage" (rolling 2 dice) on an attack roll. So doing the math and giving us an understanding of that really did help!

    @52392daner@52392daner11 ай бұрын
    • And the 4th is elven accuracy and lucky

      @dancinindadark@dancinindadark8 ай бұрын
    • Fun fact; the singular is die. So you have 1 die, several dice.

      @TNH91@TNH916 ай бұрын
    • @@TNH91 I prefer the term deeces

      @dancinindadark@dancinindadark6 ай бұрын
    • A group of meeses (singular moose). Makes sense to me.

      @Echs_D33@Echs_D333 ай бұрын
  • Maths always amazes me when something at first glance to be complicated to work out become such an elegant formula. Thank you so much.

    @RavenTheScythe@RavenTheScythe9 ай бұрын
  • D&D nerd time! Around 15:00 Matt is explaining why the lucky feat is so unbelievably good. The wording of the feat is that up to three times a day you can roll an additional d20 and pick the result you want. This turns rolling with disadvantage (the opposite of the rule from the first part of the video) into the three-dice craziness seen later.

    @Toran77928@Toran77928 Жыл бұрын
    • Which is also elven accuracy! And Elven accuracy can combine with lucky to have the four-dice ultra-super-advantage, which approaches 4/5 of the d20 (16) rather than 3/4 (15)

      @ttt5020@ttt5020 Жыл бұрын
    • And Silvery Barbs, which you can impose on someone else (usually an enemy) to make them roll another die and take the lower roll, is the equal and opposite effect.

      @liamwhite3522@liamwhite3522 Жыл бұрын
    • Super advantage is a fun debate topic. It's a popular interpretation of RAW that debatably deviates from RAI. In my opinion, you're not supposed to get super advantage from a disadvantageous situation. You're likely meant to resolve disadvantage, take the lower number, and then apply the lucky roll. Nonetheless, the rules as written inarguably support the super advantage interpretation.

      @huggiesdsc@huggiesdsc Жыл бұрын
    • @@huggiesdsc personally, that interaction doesn't really matter, since you can only use it 3 times per long rest. People thinking Lucky being overpowered is just a symptom of not throwing more or tougher encounters in order for those rerolls to be used up more. And personally, I don't get the absolute fear of people being able to actually succeed reliably a few times per day

      @luigifan4585@luigifan4585 Жыл бұрын
    • @@luigifan4585 as a perpetual dm, and I feel pretty experienced when I say this, that's too many encounters man. A nice, tidy session is gonne be about 2 encounters with plot development in between. A standard adventuring day would take 3 sessions, and that's gonna take 3 or 4 weeks in real time. A month to play out one adventuring day? The pacing is just too slow. That's just my take, though. Maybe my opinion will shift with time. Your other point though, like okay it's a limited resource but it's still wildly impactful. Just compared to what everyone else is doing, you're grabbing the narrative by the horns and redirecting it to your whim. I might allow super advantage just to let people revel in their power fantasy, but you gotta acknowledge it's a really good power.

      @huggiesdsc@huggiesdsc Жыл бұрын
  • There's another way of seeing the 2/3 thing. At 3:37, when you show the probability histogram for the 20-sided dice with advantage, it's clearly approximately a triangular distribution with min = 0, mode = 20, max = 20. The mean of a triangular distribution is (min + mode + max) / 3, which if the mode is equal to the maximum, will always be two thirds of that maximum.

    @carrots1550@carrots1550 Жыл бұрын
    • Or how about that you are simply "throwing away" the bottom 50% of the values from the unselected dice each time on the bottom line while keeping the "contribution" of the extra dice on the top line? I.e., one die (0.5)/(1.0), two dice (0.5+0.5)/(1.0+0.5), three dice (0.5+0.5+0.5)/(1.0+0.5+0.5) etc. [Times by n sides and plus a half each time to get the mean.] I.e., For two dice, the mean instead of being n*0.5+0.5 for one die thus becomes n*(0.5+0.5)/1.5+0.5 instead of n*(0.5+0.5)/2.0+0.5, for three dice it becomes n*(0.5+0.5+0.5)/2.0+0.5 instead of n*1.5/3.0+0.5 etc. I.e., mean=n*(m*0.5)/(1+(m-1)*0.5)+0.5 where n=number of sides and m=number of dice, I haven't checked if it works for more than four dice mind you, so that might be completely wrong!

      @TassieLorenzo@TassieLorenzo Жыл бұрын
    • @@TassieLorenzo Your intuition is correct as n goes to infinity, since the max of m draws from a uniform [0,1] distribution is m/(m+1).

      @ryanli5803@ryanli5803 Жыл бұрын
    • As an engineer I immediately recognized the connection between the average being 2/3 the maximum, and the fact that the center of mass of a right triangle is always 1/3 the side length away from the right angle. Just like whenever you see a circle you should expect to find pi, whenever you see a triangle you should look for thirds.

      @PirateOfPlayTime@PirateOfPlayTime Жыл бұрын
  • Great presentation. Thank you for giving the answer first, and then the math after. Good editing, great presentation. Have my like sir.

    @pauledwards2052@pauledwards2052 Жыл бұрын
  • Thank you for the great explanation of a question I was curious about but had no idea how to tackle!

    @MafiaCow01@MafiaCow01 Жыл бұрын
  • Hey Matt, thanks again for all of the great content. I picked up Humble Pi and really enjoyed it. Hope all has been well following the Antarctica cruise.

    @tabbbatpwns@tabbbatpwns Жыл бұрын
    • Hello! Glad you enjoyed it. Hope your post-Antarctica life has been good as well.

      @standupmaths@standupmaths Жыл бұрын
  • According to Matt's amended conjecture, rolling zero n-sided dice has an expected value of one half

    @NALYDretneprac@NALYDretneprac Жыл бұрын
    • Sounds like coin flip. So is a coin actually just D0?

      @happosade@happosade Жыл бұрын
    • just make it +1m/2m instead of +1/2.

      @karniumsden7883@karniumsden7883 Жыл бұрын
    • ​@@karniumsden7883 That would mean dividing by zero when m equals zero. You would probably either define the function piecewise or state it only holds for m > 0

      @NALYDretneprac@NALYDretneprac Жыл бұрын
    • @@happosade Not quite, you still need to flip at least one coin (m=1) to have an expected value! I think a two-sided coin would be a D2 because it has two possible outcomes. If we say that "rolling" a two-sided coin results in either a 1 or 2, Matt's conjecture does hold for m>0. However, it seems more natural that flipping a two-sided coin would result in either 0 (lose) or 1 (win). Perhaps we need a new category for coins such that a 'Cn' is a n-sided coin with outcomes 0 -> n-1. Perhaps we can use this notation to find the expected value of flipping a three-sided coin...

      @NALYDretneprac@NALYDretneprac Жыл бұрын
    • @@NALYDretneprac there are plenty of functions that are implicitly discontinuous because of a divide by zero. I just did define it piece-wise. the real question is 'what is a dice with negative sides, and does the function hold.'

      @karniumsden7883@karniumsden7883 Жыл бұрын
  • My 5 year old and myself found this so much fun. You have a new subscriber! Can't wait watch the other videos 😊

    @algmusicuk@algmusicuk Жыл бұрын
  • 12:58 - THANK YOUUUUUUU. OH MY GOD ive never been this happy for someone extending their theory and making a general rule

    @dinamosflams@dinamosflams Жыл бұрын
  • I'm honestly liking this specific problem a lot, as it may actually help me in implementing some mechanics in a game I want to make, making it very easy to do without computers while obscuring the real probability massively, as not many people have an intuitive understanding of how probabilities work in this case

    @Dominik-K@Dominik-K Жыл бұрын
    • Not Science BUT noteworthy-af for the Curious and/or Empathic and/or those who wanna be informed: 1 of the most Empathic Videos i ever saw just came out: "Why do I Care?' by 'Belief It Or Not'. Together with the GOP-Vidoes of 'Some More News', this really paints a Picture and i hope my comment here has effectively... spread... some Awareness.

      @nenmaster5218@nenmaster5218 Жыл бұрын
    • Have you considered using cards instead? The replacement in dice randomness can really hurt a game -- see why Catan added cards in one of the expansions to replace the dice, for example.

      @pfeilspitze@pfeilspitze Жыл бұрын
  • Great video Matt! I'm a dnd player, and I actually worked this out a couple of months ago for my players using excel. But you too it so much further, and gave some awesome explanations for why the math occurs. I absolutely love that you've simultaneous confirmed my nerdy working out of my geeky hobby, but also encouraged me continue exploring why things happen!

    @caywind7@caywind7 Жыл бұрын
    • It's what you come to expect of all of Matt's videos. You look at the topic and it seems relatively straightforward and sure enough the first couple minutes of the video seem to be wrapping it up. But it's a 20-minute video. And then, sure enough, he goes into all the depth and variation and related questions you didn't think of.

      @ps.2@ps.2 Жыл бұрын
  • Thanks Matt. My first view of your channel, which I heard of through Geoff M, who I heard of by the odd walk in Ruislip Lido! Walking is good for you!

    @PetertheRock.@PetertheRock. Жыл бұрын
  • When building a D&D character, you often need to decide between getting advantage on a certain type of roll (roll twice and pick the higher), or getting a flat numerical bonus (e.g. add 2 to your roll) to that type of roll. A direct comparison between these two kinds of bonuses is deceptively difficult, though -- the flat numerical bonus equivalent to rolling with advantage is *not* just the change in your average roll, because the *shape of the distribution of rolls* changes when rolling with advantage! See the graphs at 3:45 . This means that the "equivalent flat bonus" of rolling with advantage actually depends on the target you're trying to hit. In other words, if you're trying to beat a 19 on your d20 roll, advantage gives you less of a statistical boost to your chance of success than if you're trying to beat a 10. (Remember that you're trying to roll a certain number *or higher.* ) This means that the optimal choice between advantage and a flat numerical boost (which you can't change once you've built your character!) depends on the target numbers you'll typically be aiming for with that type of roll. This is one of the delicious subtle complexities of character building that I *love* about D&D.

    @thenefariousnerd7910@thenefariousnerd7910 Жыл бұрын
    • Is it generally possible to know in advance what type of rolls one will be needing? Is it something you can have knowledge of because you have studied the rulebooks - or more like something you can prepare for but never truly be sure of because of the discretion of the DM? The closest thing to DnD I've ever played is probably Divinity: Original Sin 2 which is a relatively deep CRPG

      @JohnDBlue@JohnDBlue Жыл бұрын
    • In what circumstance are you choosing between getting advantage or a +2 bonus in character creation, I can't think of any examples

      @BeatButton@BeatButton Жыл бұрын
    • A while back I had the same question that this video answers, and the best answer I could find was that it's not comparable to a flat numerical bonus, it simply doubles your chance of success in a given roll

      @andrewsad1@andrewsad1 Жыл бұрын
    • @@JohnDBlue typically, the probability of success on rolls in dnd 5th edition will be around 60%. Depending on how much you invest in a skill, it ranges from 40% to 80% chance of success. think of it like a normal distribution, with most rolls that you make around 60% and very difficult and very easy rolls being very rare. this means that advantage is actually worth a flat bonus somewhere around +4 or even up to +5 in most cases.

      @Apfeljunge666@Apfeljunge666 Жыл бұрын
    • the average with advantage is 2/3n+1/2, the average without it is 1/2n+1/2, so u can take the difference to see what modifier is needed on average to best advantage with whatever die. with a d20, it's about 3.3. might've made a couple errors but i think this is right, but please correct me if you see any mistakes.

      @Hooman1130a@Hooman1130a Жыл бұрын
  • To get the 1/2, you need to look at the second term of the expansion. In the case of 1 die, it would be n/2n = 1/2. In the case of 2 dice it would be (4n-n)/6n = 1/2. In the case of 3 dice, it would be (3n-n)/4n = 1/2. You lose it in the limit because that is small compared to n. But even that still approximates it. For the 2 dice case you have the additional term of -1/6n. For the 3 dice case you have the additional term of -1/4n. So it all depends on how many extra terms you want to throw in.

    @jeffreyblack666@jeffreyblack666 Жыл бұрын
    • Thanks for the explanation. I knew it wasn't because the dice aren't 0 indexed as some people are claiming. Also, with Matt's formula, when m->infinity, the average of a d6 would be 6.5 (m/m*6 + 1/2 = 6.5), which is clearly impossible. The formula is a nice approximation for practical numbers of dice faces and dice rolls. For more accuracy, the formula for the specific number of rolls must be derived.

      @star-iv@star-iv Жыл бұрын
    • @@star-iv the starting at 1 instead od zero is why it's plus 0.5 instead of minus. The obvious solution to make our maths easier would be to start at 0.5 and go up by 1.

      @tristanridley1601@tristanridley1601 Жыл бұрын
    • @@tristanridley1601 You mean a d6 with sides 0.5, 1.5, 2.5, 3.5, 4.5, 5.5?

      @star-iv@star-iv Жыл бұрын
    • @@star-iv yes, though as a joke.

      @tristanridley1601@tristanridley1601 Жыл бұрын
    • You can generalize it up to (m n)/(1 + m) + 1/2 - m/(12 n) + 0/n^2 + O(1/n^3). Starting with the inverse cube term, some weird things start happening, at least with my method.

      @viliml2763@viliml2763 Жыл бұрын
  • I loved this video and it's neat conclusion. This is a question I've been asking myself for a while.

    @thorgor5151@thorgor5151 Жыл бұрын
    • This is my first video I've seen of your channel, and now I have to see more.

      @thorgor5151@thorgor5151 Жыл бұрын
  • Thanks I really needed to understand this, I just wish didn't make me so nervous trying to think this through - will be watching it many times with paper and pen to get comfortable with my fear and slay it.

    @benjones1452@benjones1452 Жыл бұрын
  • Would LOVE to see a followup to see the average for character building: for each stat (you have 6 stats), you roll 4d6 and you drop the lowest dice* (so if you rolled a 3, 4, 4, and 5, you get rid of the 3 so your score is 13). Would love to see how the maths works for working out the average and standard deviation of this! *(note: there are other ways to pick your stats but this is the most fun)

    @paulthompson382@paulthompson382 Жыл бұрын
    • I may or may not have written an article on the subject of players cheating in character creation that looked at that in some detail.

      @spencerhall6052@spencerhall6052 Жыл бұрын
    • @@spencerhall6052 and would there be a link to said article? I would definitely be interested in reading this.

      @Thagrynor@Thagrynor Жыл бұрын
    • @@Thagrynor le .

      @TheScarvig@TheScarvig Жыл бұрын
  • This is your friendly reminder that the singular of dice is "die". Thank you for the wonderful content!

    @benjaminanderson1014@benjaminanderson1014 Жыл бұрын
    • Came looking for this ...

      @andrewmunro8830@andrewmunro8830 Жыл бұрын
    • Do you really think Matt isn't aware of this? I'm sure it's a deliberate style choice, just like his choice to refer to everyone with the pronouns 'they/them'

      @tomwilkinson9235@tomwilkinson9235 Жыл бұрын
    • I was just about to say the same thing. It's like nails on a chalkboard to me when people get this wrong.

      @00058000@00058000 Жыл бұрын
    • My motto is: never say die!

      @standupmaths@standupmaths Жыл бұрын
    • @@tomwilkinson9235 I don't think it's unlikely that he's unaware of it. Many english speakers are unaware of it. Also, with using they/them pronouns there's a reason for that. It avoids potentially misgendering someone. I can't think of a similar reason why using dice instead of die. Unless he's trying to avoid demonetization for talking about death?

      @benjaminanderson1014@benjaminanderson1014 Жыл бұрын
  • 20:57 As soon as he started building the 3D model, my brain said "yes yes, I get that, but how would we solve 4 dice?!" and this was exactly the face I made as by brain asked the ridiculous question!

    @wilfdarr@wilfdarr Жыл бұрын
    • 10/10 face!

      @kevinmeeker2832@kevinmeeker2832 Жыл бұрын
    • I immediately thought "he needs a fourth dimension" and couldn't get a picture in my head until Matt mentioned hypercubes.

      @kantpredict@kantpredict Жыл бұрын
  • Fascinating video, reminded me a bit about when I asked my statistics lecturer about predicting what numbers were most likely when rolling for stats, (rolling 4 die and dropping the lowest). Fun memory, and very interesting video :)

    @Shadarfaile@Shadarfaile Жыл бұрын
  • Stand-up Maths + DnD? I’m here for it!

    @kevinhocking3531@kevinhocking3531 Жыл бұрын
  • another similar but more complicated scenario that comes up frequently: Roll 4 six sided dice, and add up the highest 3 values. I was always told that this averages out to about 12.5 but i've never been able to confirm that with math

    @crazygab50@crazygab50 Жыл бұрын
    • I've run a python script about it and it comes out to around 12.25 after 1 million rolls. Since they are dependent on each other you cant just take the math for highest of 4, 3, and 2 and add them together, which would give you somewhere around 13.3 as the average... it is between rolling 2 normally and 2 take the highest(11.5) and that, so it makes sense. I'd actually be interested in the math behind x dice drop y dice lowest too.

      @christopherperkins2361@christopherperkins2361 Жыл бұрын
    • Short answer: I’ve worked it out once before. I got that the mean is 12.2446 (rounded to nearest thousandth), and that the mode is 13.

      @mathmusicandlooks@mathmusicandlooks Жыл бұрын
    • @@mathmusicandlooks Just did it for fun ans I get 12.2446 too !!

      @gthyf1@gthyf1 Жыл бұрын
    • just plug it into anydice

      @kori228@kori228 Жыл бұрын
    • @@kori228 Sure, but we want to see the math, and not just for top 3 of 4, but for top x of m n-sided dice, x

      @zvxcvxcz@zvxcvxcz Жыл бұрын
  • Wow! That just blew my mind.🤯 You made an obscure reality really clear. Thank you.

    @MisterHen@MisterHen Жыл бұрын
  • This was good. Loved the video. Thank you very much for doing this.

    @StealthySandwich@StealthySandwich Жыл бұрын
  • This is indispensable information for aspiring designers of tabletop/board games! This reminds me of how Perci Diaconis (from Numberphile) was working with his grad students on the best ways to shuffle very large decks of cards "for Dungeons & Dragons and silly stuff like that" but of course it was for Magic: The Gathering commander decks. I wonder if they ever found it? 🤔

    @otakuribo@otakuribo Жыл бұрын
  • I love how accessible you make your content. I have trouble recalling every implication of a mathematical relationship between 2 things, but that doesn’t matter. You explain things with terms that make sense as you are writing out the somewhat complex relationships things have. Even as a joke around 16:20, you quickly explained what odd numbers are. You do this in such a natural way that stuff I already know isn’t annoying to hear either. One of the most important aspects of teaching is keeping everyone engaged and you do such an amazing job.

    @remkat@remkat Жыл бұрын
  • When you watch so many DnD videos because of Baldur’s Gate 3 that KZhead decides to serve you a video on dice math.

    @Bigshot0910@Bigshot09108 ай бұрын
  • It’s amazing. Interesting and gives a room for analysis. Thank you.

    @user-ow2yp9oy9e@user-ow2yp9oy9eАй бұрын
  • Man i was like "i hope he does 3 dice, no maybe even n dice that would be so cool" Thanks Matt you always deliver

    @SquashyPan@SquashyPan Жыл бұрын
    • Here's a video illustrating the general formula for an n-sided die, rolled m times, and observe the kth largest of the m rolls. kzhead.info/sun/ZcehhNibpIR3po0/bejne.html

      @statisticsmatt@statisticsmatt Жыл бұрын
    • Did not deliver... did not live up to expectations... I wanted to see top x of m n-sided dice, not just top 1.

      @zvxcvxcz@zvxcvxcz Жыл бұрын
  • Okay, this is really cool. However, I've always wondered about the dice rolling setup often used for rolling character stats, 4d6 drop the lowest? That one's a really weird case, and I'd love a video about that! I tried figuring some of the maths behind it before, but didn't get very far. As I'm thinking about it, though, I imagine that it is, to some extent, an extention of this same problem.

    @noahlebaron729@noahlebaron729 Жыл бұрын
    • It is indeed the same problem but slightly more complicated. What kind of maths are you interested in? Might invest some time into it tomorrow

      @heart.9889@heart.9889 Жыл бұрын
    • I've worked this out before with a more general approach. If you're interested in my results just let me know and I'll dig up my papers.

      @ronandevlin1479@ronandevlin1479 Жыл бұрын
    • That would be good to know, since I really, really, really hate rolling for stats.

      @cylondorado4582@cylondorado4582 Жыл бұрын
    • I found a website a while back that would let you enter a dice rolling instruction (e.g. 4d6d1 would roll 4d6 drop lowest) and it would generate the distribution and useful characteristics. Unfortunately I can't remember the website.

      @matthewparker9276@matthewparker9276 Жыл бұрын
    • I always thought this meant the average of d6 was 3~4 and then the average of the last one was 5. So like rolling 3 dice but for an average roll of 12 or 4 per die.

      @chaotickreg7024@chaotickreg7024 Жыл бұрын
  • That was the most pleasure I ever had watching KZhead - thank-you !

    @chriscook21@chriscook21 Жыл бұрын
  • As soon as I saw the barchart and the 2/3 estimation, I thought: "The center of gravity of a triangle!"

    @calinacho7704@calinacho7704 Жыл бұрын
  • As an artist who avoids maths whenever possible I really enjoyed this. I wish I had you as a math teacher in high school then I would have loved it. Really great presentation and you have great charisma.

    @jessewieman6955@jessewieman6955 Жыл бұрын
  • Fun fact about dice: A standard set of dice containing a d4, d6, d8, 2 d10’s, d12 and d20 contains the 5 platonic solids and a d10

    @jrex8322@jrex8322 Жыл бұрын
    • And the reason the only non-platonic solid is included at all is the same as the reason why a standard set comes with two of them: because the original designers of D&D wanted to be able to simulate rolling a 100-sided die to get percentage values between 1% and 100%. We roll d% by rolling two d10s and designating one of them as the tens digit and the other as the ones digit. A standard die set will often contain one d10 that's labeled normally, and another that has multiples of 10 on each face instead of single digits, so it's easily clear which die is which digit.

      @CosmicPlatonix@CosmicPlatonix Жыл бұрын
    • And a D10 is what you get when you take a dodecahedron and put a pentagonal pyramid on each of two opposite sides, effectively turning the other 10 sides into kite shapes.

      @wolf1066@wolf1066 Жыл бұрын
    • From this alone we can see that the d10 is the odd one out and should be destroyed. This would also make the D&D rules more dozenal-friendly, which is a plus.

      @trejkaz@trejkaz Жыл бұрын
    • Fun fact about regular polyhedra, the platonic solids are just a small subset of them. There are in fact 48 regular polyhedra. In 3 dimensional space.

      @livedandletdie@livedandletdie Жыл бұрын
    • @@livedandletdie Most of them are impossible to use as dice, but that's okay because there's another group of polyhedra that the Platonic Solids are just a small subset of: the Isohedra. The d10 is another isohedron, and so are the d60 and d120 that are briefly shown in this video. The isohedra are defined by a level of symmetry that specifically makes them perfect for use as dice: if the faces aren't labeled, an isohedron will look exactly the same no matter which face you're looking at, because for any two faces on the polyhedron there will be a valid symmetry of the shape that maps one face onto the other.

      @CosmicPlatonix@CosmicPlatonix Жыл бұрын
  • I like how you have a d120! I really like The Dice Lab's dice, and I'm glad you supported them!

    @alexandermcclure6185@alexandermcclure61856 ай бұрын
  • I think the expected value has a nice correlation with the centre of gravity of a triangle, which is why the ratio tends to 2/3 as n tends to infinity, as the graph starts resembling a triangle more and more.

    @BV-mg1ek@BV-mg1ek Жыл бұрын
  • 12:49 to clarify, the expected result of rolling typical advantage (i.e roll two dice, pick the higher number) for an n sided dice isn't *exactly* 2/3 - that's the limit of the expected result, as n tends to infinity - hence why for using d20s (in other words using n-sided dice when n=20) the expected result is not 20*2/3 = 13.3recurring, it's just decently close - as you rolled two dice where n approaches infinity, *then* you'd see the limit of n*2/3 much more accurately I realise this was matt speaking in the context of "a general rule of thumb", but I thought I'd comment just to hammer it home for those who aren't used to working with limits, but who may be min-maxers in DnD (i.e who enjoy using maths to inform them what the optimal customisations to make to their character are) otherwise very nifty video that explains something I've never considered before :D and now we're getting onto double advantage! yippee!

    @CorneliusThroatworthy@CorneliusThroatworthy Жыл бұрын
    • Thanks. I wondered how the odds could be 13.825 and 13.33333 at the same time

      @CrankyxPants@CrankyxPants Жыл бұрын
    • Thanks! I tried writing my own simulation and couldn't get the resulting average to follow matt's formula. But now I realize that's because I used 6-sided dice, instead of infinity-sided dice! :-)

      @andersmusikka@andersmusikka Жыл бұрын
    • He explains this at the end, the equation is actually 2/3n + 1/2

      @Caesarr7@Caesarr7 Жыл бұрын
    • @@Caesarr7 not exactly, it is (n+1)(4n-1)/6n. It is NOT 2n/3 + 1/2. It tends to 2n/3, and starts at around 2n/3 +1/2, that's it.

      @antoinegermain1166@antoinegermain1166 Жыл бұрын
    • This makes perfect sense! I understand that one was the limit and one was the result of... something? But then what did the limit apply to? Basically, the limit would be the average result of a die which whose number of faces would equal infinity. That makes perfect sense. It was just not stated that way. Matt was just very excited about this.

      @EmmanuelEytan@EmmanuelEytan Жыл бұрын
KZhead