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

Sdílet
Vložit
  • čas přidán 30. 06. 2022
  • 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
  • Zábava

Komentáře • 4,1K

  • @standupmaths
    @standupmaths  Před rokem +2684

    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

    • @LoneEagle2061
      @LoneEagle2061 Před rokem +50

      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 :-)

    • @QlueDuPlessis
      @QlueDuPlessis Před rokem +3

      Do we get a standard distribution curve?🤔

    • @QlueDuPlessis
      @QlueDuPlessis Před rokem +19

      Three dice and discard the high and low

    • @siraaron4462
      @siraaron4462 Před rokem +5

      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?

    • @rmsgrey
      @rmsgrey Před rokem +14

      @@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.

  • @unfortunatelyevil1767
    @unfortunatelyevil1767 Před rokem +3786

    "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*

    • @reversev9778
      @reversev9778 Před rokem +82

      Gotta love Matt

    • @nic5423
      @nic5423 Před rokem +60

      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

    • @lewismassie
      @lewismassie Před rokem +90

      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

    • @unfortunatelyevil1767
      @unfortunatelyevil1767 Před rokem +142

      @@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!

    • @VeteranVandal
      @VeteranVandal Před rokem +3

      Which seems objectively harder in this case.

  • @jackielinde7568
    @jackielinde7568 Před rokem +5211

    As someone who's spent HOURS building dice towers, GLUEING DICE TOGETHER IS CHEATING, MATT!!!

    • @idontwantahandlethough
      @idontwantahandlethough Před rokem +648

      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!

    • @jackielinde7568
      @jackielinde7568 Před rokem +149

      @@idontwantahandlethough Okay, I will say making and gluing Lego kits together for other people is worse... but not by much.

    • @ninjabob2456
      @ninjabob2456 Před rokem +138

      @@idontwantahandlethough Maybe Diane liked assembling Lego herself...

    • @mmseng2
      @mmseng2 Před rokem +76

      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.

    • @elliott614
      @elliott614 Před rokem +11

      is interleaving cheating or just better strategy. wait what is this "building dice towers"? that's a thing?

  • @coloringontheline
    @coloringontheline Před rokem +1436

    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!

    • @tylerpeacock8245
      @tylerpeacock8245 Před rokem +94

      A rhombic dodecahedron of course

    • @stephanevalladier6210
      @stephanevalladier6210 Před rokem +11

      ​@@tylerpeacock8245 I was about to say!

    • @insomnia20422
      @insomnia20422 Před rokem +23

      Well you could try to throw a hypercube at them but then again that would probably rip a hole in our 3 dimensional reality...

    • @WalkerBoh84
      @WalkerBoh84 Před rokem +13

      @@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!

    • @derpnerpwerp
      @derpnerpwerp Před rokem +8

      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!"

  • @Masheeable
    @Masheeable Před rokem +274

    "...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. :)

    • @twagetomato
      @twagetomato Před rokem +2

      Caught me so off guard, and I was delighted by this twist

    • @popcorny007
      @popcorny007 Před 4 měsíci +1

      14:02 in case anyone was wondering!

  • @misterscottintheway
    @misterscottintheway Před rokem +944

    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.

    • @viceliag3916
      @viceliag3916 Před rokem +98

      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

    • @tharrock337
      @tharrock337 Před rokem +9

      @@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.

    • @thetzeentchianrepresentati5547
      @thetzeentchianrepresentati5547 Před rokem +8

      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

    • @ImmortalAbsol
      @ImmortalAbsol Před rokem +1

      Stand up maths after all

    • @GeekProdigyGuy
      @GeekProdigyGuy Před rokem +1

      @@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

  • @AlphaPhoenixChannel
    @AlphaPhoenixChannel Před rokem +749

    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.

  • @mr.zvonek9565
    @mr.zvonek9565 Před rokem +791

    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.

    • @Slimmeyy
      @Slimmeyy Před rokem +173

      Another benefit is that the Great Sword's minimum damage is 2 instead of 1 (can't roll lower than 1+1)

    • @awesomenesschanel
      @awesomenesschanel Před rokem +85

      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

    • @x9n_
      @x9n_ Před rokem +30

      @@Slimmeyy that's why the average is higher

    • @joshuagrant7812
      @joshuagrant7812 Před rokem +149

      great axe is better because rolling big dice is more fun

    • @aogasd
      @aogasd Před rokem +85

      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.

  • @TailsClock
    @TailsClock Před rokem +147

    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!

    • @AquaticDot
      @AquaticDot Před rokem +22

      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).

    • @minderbart1
      @minderbart1 Před rokem +1

      @@AquaticDot which is why i was rolling in laughter when it happened to me 3 times in a row.

    • @tobistein9831
      @tobistein9831 Před rokem +1

      @@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 :)

    • @AquaticDot
      @AquaticDot Před rokem +1

      @@tobistein9831 Right, I mistakenly forgot that both dice are unique and so you'd count those possibilities twice.

  • @degv364
    @degv364 Před rokem +607

    The mathematical demonstration of why "Elven Accuracy" is such a good feat. Great video Matt!

    • @double124
      @double124 Před rokem +40

      Alright, listen. Arcane Trickster with Find Familiar (Owl Familiar!) and Elven Accuracy. It's disgusting, and I love it.

    • @karlashley8680
      @karlashley8680 Před rokem +6

      I mean, 2/3 vs 3/4 really isn't that much of an increase.

    • @inazuma-fulgur
      @inazuma-fulgur Před rokem +44

      @@karlashley8680 that's almost 8.5%

    • @rehbeinator
      @rehbeinator Před rokem +75

      @@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!

    • @KaitlynBurnellMath
      @KaitlynBurnellMath Před rokem +18

      @@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.

  • @connorgrynol9021
    @connorgrynol9021 Před rokem +1793

    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.

    • @MannyBrum
      @MannyBrum Před rokem +312

      Math goes out the window when the rolls happen in a game with stakes.

    • @connorgrynol9021
      @connorgrynol9021 Před rokem +214

      @@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.

    • @AlbertaGeek
      @AlbertaGeek Před rokem +167

      ...A Halfling Divination Wizard who, at level 4, takes the _Lucky_ feat.

    • @connorgrynol9021
      @connorgrynol9021 Před rokem +43

      @@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.

    • @KyleCorbeau
      @KyleCorbeau Před rokem +101

      I'm all for math probabilities, but that's the universe telling you to roll a new character.

  • @kylerivera3470
    @kylerivera3470 Před rokem +129

    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.

    • @bigman3274
      @bigman3274 Před rokem +15

      @@ChaosLord5129
      🫴 L
      here you go

    • @Snaps12345
      @Snaps12345 Před rokem +3

      Im pretty sure dicey dungeon fucks with the RNG sometimes (could be bias tho)
      Still works in theory

    • @Lacie9
      @Lacie9 Před rokem +12

      @@ChaosLord5129 ratio

    • @corruleumblue3317
      @corruleumblue3317 Před 8 měsíci +3

      "so it gets MUCH crazier as the game goes on" Like splitting a 1 to get two 1s. :P

    • @TehNoobiness
      @TehNoobiness Před 8 měsíci +5

      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...

  • @benvoliothefirst
    @benvoliothefirst Před rokem +244

    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.

    • @JamesThompson-zu3bq
      @JamesThompson-zu3bq Před 11 měsíci +3

      Now picture the 4d cube

    • @nelus7276
      @nelus7276 Před 8 měsíci +5

      ​@@tigriscallidus4477I did and couldn't understand it. Probably because it was mostly text and not enough pictures.

    • @Vicho1079
      @Vicho1079 Před 7 měsíci

      ​@@nelus7276skill issue. read and write are a sub type of visual learning btw XD XD

    • @baronvonbeandip
      @baronvonbeandip Před 4 měsíci

      Stop propagating the VAK (Visual-Auditory-Kinesthetic) system. It's been debunked forever.

  • @DerekWoolverton
    @DerekWoolverton Před rokem +388

    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.

    • @mujtabaalam5907
      @mujtabaalam5907 Před rokem +14

      What shape were you aiming for?

    • @U014B
      @U014B Před rokem +62

      @@mujtabaalam5907 NO MORE QUESTIONS

    • @SimonBuchanNz
      @SimonBuchanNz Před rokem +1

      Wait, does a hypercube have a unique diagonal? There's no such unique diagonal for a cube.

    • @idontwantahandlethough
      @idontwantahandlethough Před rokem +9

      @@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)

    • @sachathehuman4234
      @sachathehuman4234 Před rokem +8

      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

  • @adam_badam
    @adam_badam Před rokem +924

    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)

    • @Moingboy
      @Moingboy Před rokem +75

      I would very much like to see the analysis of this value as well!

    • @iamanoob9747
      @iamanoob9747 Před rokem +33

      The answer is 7+the best die. Using the formula in the video 12.3 would be the advantage stat.

    • @edderiofer
      @edderiofer Před rokem +33

      @@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.

    • @dontich
      @dontich Před rokem +9

      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.

    • @HeavyMetalMouse
      @HeavyMetalMouse Před rokem +30

      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.

  • @coryzilligen790
    @coryzilligen790 Před rokem +57

    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?

    • @captainepictrick
      @captainepictrick Před rokem +10

      Also it is common for DM's to reroll 1's in this process, at least every DM I've meet has allowed it

    • @coryzilligen790
      @coryzilligen790 Před rokem +11

      @@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!

    • @ghoulofmetal
      @ghoulofmetal Před rokem +2

      There are also ways to have super advantage rolling 3 or more dice for a single roll

    • @ignathiel
      @ignathiel Před rokem +2

      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

    • @zacheryayers4139
      @zacheryayers4139 Před 11 měsíci +3

      @@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.

  • @VoriuM
    @VoriuM Před rokem +28

    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.

  • @G1NZOU
    @G1NZOU Před rokem +598

    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.

    • @rzezzy1
      @rzezzy1 Před rokem +81

      Please tell me you made up the most ridiculous negative consequence you could think of

    • @palkd8296
      @palkd8296 Před rokem +9

      Haha what an unlucky bunch!

    • @pvic6959
      @pvic6959 Před rokem +29

      sometimes the dice are the ones that tell the story lol

    • @IceMetalPunk
      @IceMetalPunk Před rokem +59

      "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?"

    • @ppppppqqqppp
      @ppppppqqqppp Před rokem +41

      @@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.

  • @mariow.3063
    @mariow.3063 Před rokem +699

    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.

    • @conorlamere399
      @conorlamere399 Před rokem +8

      +

    • @cajungames
      @cajungames Před rokem +10

      We need this !

    • @kotori87gaming89
      @kotori87gaming89 Před rokem +20

      Yes please! The math behind risk is fascinating, and I would love to see you explore it.

    • @hakonatli
      @hakonatli Před rokem +3

      Bump

    • @justincatlett56
      @justincatlett56 Před rokem +6

      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.

  • @andrewellis3447
    @andrewellis3447 Před rokem +11

    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.

    • @Zraknul
      @Zraknul Před rokem +2

      Going through the risk comment by Mario W, someone corrected an answer to 6.65% advantage for the attacker.

    • @dwakeling1
      @dwakeling1 Před 3 měsíci

      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

  • @paulcoy9060
    @paulcoy9060 Před rokem +11

    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.

    • @karpidis
      @karpidis Před 15 dny

      And we throw logic of the window. How someone cheering you up doubles your chances?

    • @apples6684
      @apples6684 Před 6 hodinami

      ​@@karpidis it's a fantasy game with wizards and goblins and all that stuff they already threw real world logic out of the window.

  • @ClostridiumChampion
    @ClostridiumChampion Před rokem +286

    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.

    • @ancientswordrage
      @ancientswordrage Před rokem +14

      That's smart and so are you

    • @ronandevlin1479
      @ronandevlin1479 Před rokem +5

      Nice insight! I'll have to think about this line of reasoning some more.

    • @austingarcia6060
      @austingarcia6060 Před rokem +13

      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.

    • @duongquocthongho2117
      @duongquocthongho2117 Před rokem +8

      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.

    • @xidarian
      @xidarian Před rokem +1

      Wow. That blew my mind.

  • @mqb3gofjzkko7nzx38
    @mqb3gofjzkko7nzx38 Před rokem +450

    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.

    • @seraphina985
      @seraphina985 Před rokem +45

      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.

    • @statisticsmatt
      @statisticsmatt Před rokem +7

      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. czcams.com/video/2chTtcmRAsU/video.html

    • @rein7046
      @rein7046 Před rokem +30

      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.

    • @fisharepeopletoo9653
      @fisharepeopletoo9653 Před rokem +21

      The REAL problem is, if I'm the one playing in your example situation, I'm rolling two 1's every time.

    • @duckrutt
      @duckrutt Před rokem +9

      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

  • @Blackadder125
    @Blackadder125 Před 6 měsíci +11

    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!

  • @Zachpi
    @Zachpi Před rokem +4

    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

  • @blackmber
    @blackmber Před rokem +416

    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.

    • @finleyburns4918
      @finleyburns4918 Před rokem +19

      and then you consider that most stats have a positive modifier by the time your 4th level, and advantage seems pretty important

    • @Nebafyer_DandD
      @Nebafyer_DandD Před rokem +37

      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.

    • @Ahdok1
      @Ahdok1 Před rokem +34

      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.

    • @MikelSyn
      @MikelSyn Před rokem +2

      @@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?

    • @xanderh2404
      @xanderh2404 Před rokem +8

      @@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.

  • @davidh.4944
    @davidh.4944 Před rokem +314

    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.

    • @CandeIero
      @CandeIero Před rokem +43

      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!

    • @jonghyeonlee5877
      @jonghyeonlee5877 Před rokem +10

      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.)

    • @dtaggartofRTD
      @dtaggartofRTD Před rokem +4

      For those interested in reading the article mentioned in this issue, the Internet Archive has a copy.

    • @50mt
      @50mt Před rokem +4

      "It's available on the internet archive."
      ... for now, at least

    • @dtaggartofRTD
      @dtaggartofRTD Před rokem +10

      @@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.

  • @JMhellendoorn
    @JMhellendoorn Před rokem +79

    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.

    • @surajvkothari
      @surajvkothari Před rokem +15

      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!

    • @PaulCotterCanada
      @PaulCotterCanada Před rokem +1

      An interesting video from Dave's garage. Python versus various flavours of "C": czcams.com/video/D3h62rgewZM/video.html

    • @advancewarstournamentseries
      @advancewarstournamentseries Před rokem +4

      It's all pseudo random numbers though, a real person would roll in a completely different way, which makes all of this theoretical

    • @Legitosity
      @Legitosity Před 8 měsíci

      I've thought about trying to program shuffling a deck of cards to more accurately represent how a human would, instead of random swapping

  • @TristanChicklowski
    @TristanChicklowski Před rokem

    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!

  • @singerofsongs468
    @singerofsongs468 Před rokem +213

    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.

    • @juliuswarburton
      @juliuswarburton Před rokem +16

      It actually tells you the average is about 12 in the 2nd, 3rd, and 5th edition player's handbooks.

    • @juliuswarburton
      @juliuswarburton Před rokem +19

      @Smee Self I can't speak for the fourth edition. I don't have it.

    • @jayteegamble
      @jayteegamble Před rokem +13

      @@juliuswarburton I think it's more complicated than that because you have to factor in all of the cheating everyone will do.

    • @achtsekundenfurz7876
      @achtsekundenfurz7876 Před rokem +16

      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.

    • @CatCheshireThe
      @CatCheshireThe Před rokem +1

      @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.

  • @ryanclark1878
    @ryanclark1878 Před rokem +247

    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! 🤯😁

    • @aiocafea
      @aiocafea Před rokem +25

      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

    • @newciouss
      @newciouss Před rokem

      Finally its here. YES
      czcams.com/video/J55WNzIRIUM/video.html.

    • @starseeker3311
      @starseeker3311 Před rokem +4

      Was going to say, surprised that wasn't mentioned!

    • @AdamRidley11
      @AdamRidley11 Před rokem +2

      Even cooler, the centroid of a tetrahedron is 3/4 down from the top!

  • @artempozdniakov2850
    @artempozdniakov2850 Před 3 měsíci +2

    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.

  • @QT5656
    @QT5656 Před rokem

    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.

  • @GuillotinedChemistry
    @GuillotinedChemistry Před rokem +320

    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!

    • @nenmaster5218
      @nenmaster5218 Před rokem +4

      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.

    • @fuckyoutubefuckinghandles
      @fuckyoutubefuckinghandles Před rokem +2

      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.

    • @OpiatesAndTits
      @OpiatesAndTits Před rokem +4

      If I saw this video freshman year of high school before CZcams existed I’d have taken math a lot more seriously. This specific video about TTRPG dice rolls :p

    • @GuillotinedChemistry
      @GuillotinedChemistry Před rokem

      @@OpiatesAndTits I agree wholeheartedly.

    • @ThePhunnman5
      @ThePhunnman5 Před rokem +4

      @@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!

  • @edderiofer
    @edderiofer Před rokem +230

    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.

    • @Hooman1130a
      @Hooman1130a Před rokem

      k?

    • @kindoflame
      @kindoflame Před rokem +16

      @@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.

    • @spacelem
      @spacelem Před rokem +14

      @@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.

    • @robertovillagran5364
      @robertovillagran5364 Před rokem

      I was hoping he’d go into picking the lowest of the rolls, luckily the comments have my back

    • @gammakay521
      @gammakay521 Před rokem

      is this edderiofer from the maths subreddit?

  • @colewilkinson74
    @colewilkinson74 Před rokem

    I have seriously wondered what the answer for this specific question was for years now. Thank you for taking the time to explain it!

  • @landler656
    @landler656 Před rokem +5

    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!

  • @coryman125
    @coryman125 Před rokem +82

    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!

    • @Markus-zb5zd
      @Markus-zb5zd Před rokem +4

      n-dimensional objects for best out of n-dice!

  • @sandystarr0
    @sandystarr0 Před rokem +49

    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.

    • @Magesa
      @Magesa Před rokem +1

      Really helps show that all of these areas of math are intricately related; they're not just separate subjects in school

    • @ideegeniali
      @ideegeniali Před rokem

      Don't forget DnD!

    • @ladymercy5275
      @ladymercy5275 Před rokem

      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 Před rokem

      **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.

  • @paladin1164
    @paladin1164 Před rokem +2

    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!

  • @Deadl0ck
    @Deadl0ck Před rokem +108

    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.

  • @addymant
    @addymant Před rokem +205

    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.

    • @iamanoob9747
      @iamanoob9747 Před rokem +1

      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

    • @npip99
      @npip99 Před rokem +19

      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.

    • @addymant
      @addymant Před rokem +9

      @@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.

    • @PontusLarsson1
      @PontusLarsson1 Před rokem +3

      @@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.

    • @freshhawk
      @freshhawk Před rokem +1

      ​@@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.

  • @nintendocyclone
    @nintendocyclone Před rokem +117

    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

    • @Chris_winthers
      @Chris_winthers Před rokem

      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 Před rokem

      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?

    • @kirby1024
      @kirby1024 Před rokem +9

      @@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!

    • @King0fYou115
      @King0fYou115 Před rokem +4

      @@Chris_winthers You are rolling two d20s. Both have an expected average of 10.5, which when you add them together you get 21.

    • @Chris_winthers
      @Chris_winthers Před rokem +5

      @@King0fYou115 oh, this is the average combined result. Thanks

  • @52392daner
    @52392daner Před 11 měsíci +20

    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!

    • @dancinindadark
      @dancinindadark Před 8 měsíci +1

      And the 4th is elven accuracy and lucky

    • @TNH91
      @TNH91 Před 6 měsíci +1

      Fun fact; the singular is die. So you have 1 die, several dice.

    • @dancinindadark
      @dancinindadark Před 6 měsíci +1

      @@TNH91 I prefer the term deeces

    • @Echs_D33
      @Echs_D33 Před 3 měsíci

      A group of meeses (singular moose). Makes sense to me.

  • @guilhemmarty6287
    @guilhemmarty6287 Před rokem +10

    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 !

    • @benjaminmoroni
      @benjaminmoroni Před rokem +1

      What were your findings there? I have been trying to figure out how to go about it.

    • @delta-chat
      @delta-chat Před rokem

      @@benjaminmoroni i did it too but with "roll 3D6 and add the 2 best results" and the mean was 8.45333...

    • @kevinr.9733
      @kevinr.9733 Před 6 měsíci +3

      @@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.

    • @LouPanetta2
      @LouPanetta2 Před 13 dny

      ​@@kevinr.9733 I did the same and came up with 12.44, so we're definitely in the same ballpark

  • @hauslerful
    @hauslerful Před rokem +74

    Having an active conda installation but then manually entering the path to a completely different python instance is such a Parker way of programming 😄

    • @radadadadee
      @radadadadee Před rokem +6

      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

  • @NALYDretneprac
    @NALYDretneprac Před rokem +35

    According to Matt's amended conjecture, rolling zero n-sided dice has an expected value of one half

    • @happosade
      @happosade Před rokem +1

      Sounds like coin flip. So is a coin actually just D0?

    • @karniumsden7883
      @karniumsden7883 Před rokem

      just make it +1m/2m instead of +1/2.

    • @NALYDretneprac
      @NALYDretneprac Před rokem

      ​@@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 Před rokem +3

      @@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...

    • @karniumsden7883
      @karniumsden7883 Před rokem +3

      @@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.'

  • @alexm892
    @alexm892 Před 6 měsíci

    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

  • @SolipsismSyndrome
    @SolipsismSyndrome Před 11 měsíci

    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. 😅

  • @josephpierce8926
    @josephpierce8926 Před rokem +455

    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.

    • @ansalem12
      @ansalem12 Před rokem +105

      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.

    • @thetzeentchianrepresentati5547
      @thetzeentchianrepresentati5547 Před rokem +8

      *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.

    • @ProbablyEzra
      @ProbablyEzra Před rokem +31

      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 Před rokem +8

      @@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.

    • @thetzeentchianrepresentati5547
      @thetzeentchianrepresentati5547 Před rokem +5

      @@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.

  • @johnchessant3012
    @johnchessant3012 Před rokem +19

    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!

    • @statisticsmatt
      @statisticsmatt Před rokem

      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. czcams.com/video/2chTtcmRAsU/video.html

  • @BV-mg1ek
    @BV-mg1ek Před rokem +3

    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.

  • @MrZernichow
    @MrZernichow Před rokem

    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!

  • @3geek14
    @3geek14 Před rokem +81

    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.

    • @statisticsmatt
      @statisticsmatt Před rokem +2

      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. czcams.com/video/2chTtcmRAsU/video.html

    • @pyglik2296
      @pyglik2296 Před rokem +2

      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).

  • @leokastenberg800
    @leokastenberg800 Před rokem +80

    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

    • @rorywagstaff9219
      @rorywagstaff9219 Před rokem +1

      @@Mewobiba the average for 2dNk1 approaches 2/3 as N approaches infinity. It's never exactly 2/3 for any N

    • @user-rv9vk8by5i
      @user-rv9vk8by5i Před rokem

      ​@@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

    • @NLGeebee
      @NLGeebee Před rokem

      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?

    • @SophieJMore
      @SophieJMore Před rokem +1

      @@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.

    • @gmalivuk
      @gmalivuk Před rokem +1

      @@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).

  • @ice9ify
    @ice9ify Před rokem

    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.

  • @MafiaCow01
    @MafiaCow01 Před rokem

    Thank you for the great explanation of a question I was curious about but had no idea how to tackle!

  • @LemonArsonist
    @LemonArsonist Před rokem +17

    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

  • @wtblessing
    @wtblessing Před 6 měsíci +1

    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.

  • @sundaykessig-kinkaid7313
    @sundaykessig-kinkaid7313 Před měsícem

    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.

  • @carrots1550
    @carrots1550 Před rokem +79

    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.

    • @TassieLorenzo
      @TassieLorenzo Před rokem +6

      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!

    • @ryanli5803
      @ryanli5803 Před rokem +2

      @@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).

    • @PirateOfPlayTime
      @PirateOfPlayTime Před rokem +9

      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.

  • @kevinhocking3531
    @kevinhocking3531 Před rokem +15

    Stand-up Maths + DnD?
    I’m here for it!

  • @wilfdarr
    @wilfdarr Před rokem +7

    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!

    • @kevinmeeker2832
      @kevinmeeker2832 Před rokem

      10/10 face!

    • @kantpredict
      @kantpredict Před rokem +1

      I immediately thought "he needs a fourth dimension" and couldn't get a picture in my head until Matt mentioned hypercubes.

  • @bumblebeaver
    @bumblebeaver Před 7 měsíci

    Absolutely stellar! Thank you for your time and effort!

  • @davepyne
    @davepyne Před rokem +35

    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.

  • @blacksheep9950
    @blacksheep9950 Před rokem +29

    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.

  • @doctordave4731
    @doctordave4731 Před rokem +5

    Came across this really enjoyable video recently. One small point, at 21:51, I think the 5th rhombic dodecahedral number is 369 not 269.

    • @greenrobinro
      @greenrobinro Před rokem

      🤣 Looked up the sequence and just thought that mistake is too obvious that no one else noticed. Turns out you already wrote a comment about it.

  • @joschis.5192
    @joschis.5192 Před rokem

    that was one of these start page videos which proved to be really, really good, thank you :D

  • @Toran77928
    @Toran77928 Před rokem +160

    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.

    • @ttt5020
      @ttt5020 Před rokem +28

      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)

    • @liamwhite3522
      @liamwhite3522 Před rokem +11

      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.

    • @huggiesdsc
      @huggiesdsc Před rokem +30

      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.

    • @luigifan4585
      @luigifan4585 Před rokem +7

      @@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

    • @huggiesdsc
      @huggiesdsc Před rokem +26

      @@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.

  • @paulthompson382
    @paulthompson382 Před rokem +60

    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)

    • @spencerhall6052
      @spencerhall6052 Před rokem +4

      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.

    • @Thagrynor
      @Thagrynor Před rokem +2

      @@spencerhall6052 and would there be a link to said article? I would definitely be interested in reading this.

    • @TheScarvig
      @TheScarvig Před rokem

      @@Thagrynor le .

  • @thorgor5151
    @thorgor5151 Před rokem

    I loved this video and it's neat conclusion.
    This is a question I've been asking myself for a while.

    • @thorgor5151
      @thorgor5151 Před rokem

      This is my first video I've seen of your channel, and now I have to see more.

  • @pauledwards2052
    @pauledwards2052 Před rokem

    Great presentation. Thank you for giving the answer first, and then the math after. Good editing, great presentation. Have my like sir.

  • @crazygab50
    @crazygab50 Před rokem +50

    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

    • @christopherperkins2361
      @christopherperkins2361 Před rokem +8

      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.

    • @mathmusicandlooks
      @mathmusicandlooks Před rokem +5

      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.

    • @gthyf1
      @gthyf1 Před rokem +1

      @@mathmusicandlooks Just did it for fun ans I get 12.2446 too !!

    • @kori228
      @kori228 Před rokem

      just plug it into anydice

    • @zvxcvxcz
      @zvxcvxcz Před rokem +4

      @@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

  • @benjaminanderson1014
    @benjaminanderson1014 Před rokem +20

    This is your friendly reminder that the singular of dice is "die". Thank you for the wonderful content!

    • @andrewmunro8830
      @andrewmunro8830 Před rokem +3

      Came looking for this ...

    • @tomwilkinson9235
      @tomwilkinson9235 Před rokem +2

      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'

    • @00058000
      @00058000 Před rokem +4

      I was just about to say the same thing. It's like nails on a chalkboard to me when people get this wrong.

    • @standupmaths
      @standupmaths  Před rokem +16

      My motto is: never say die!

    • @benjaminanderson1014
      @benjaminanderson1014 Před rokem +1

      @@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?

  • @PetertheRock.
    @PetertheRock. Před rokem +1

    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!

  • @VermisTerrae
    @VermisTerrae Před rokem +63

    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. :')

    • @tobistein9831
      @tobistein9831 Před rokem

      @J4zzling No, just an 4zzhole :)

    • @sakesaurus1706
      @sakesaurus1706 Před 7 měsíci

      i think it's not necessarily the learning method but just the talent of Matt's to deliver

  • @tabbbatpwns
    @tabbbatpwns Před rokem +50

    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.

    • @standupmaths
      @standupmaths  Před rokem +22

      Hello! Glad you enjoyed it. Hope your post-Antarctica life has been good as well.

  • @Dominik-K
    @Dominik-K Před rokem +41

    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

    • @nenmaster5218
      @nenmaster5218 Před rokem +1

      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.

    • @pfeilspitze
      @pfeilspitze Před rokem

      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.

  • @RavenTheScythe
    @RavenTheScythe Před 9 měsíci

    Maths always amazes me when something at first glance to be complicated to work out become such an elegant formula. Thank you so much.

  • @StealthySandwich
    @StealthySandwich Před rokem

    This was good. Loved the video. Thank you very much for doing this.

  • @thenefariousnerd7910
    @thenefariousnerd7910 Před rokem +61

    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.

    • @JohnDBlue
      @JohnDBlue Před rokem +1

      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

    • @BeatButton
      @BeatButton Před rokem +6

      In what circumstance are you choosing between getting advantage or a +2 bonus in character creation, I can't think of any examples

    • @andrewsad1
      @andrewsad1 Před rokem

      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

    • @Apfeljunge666
      @Apfeljunge666 Před rokem +1

      @@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.

    • @Hooman1130a
      @Hooman1130a Před rokem

      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.

  • @jeffreyblack666
    @jeffreyblack666 Před rokem +35

    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.

    • @star-iv
      @star-iv Před rokem +1

      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.

    • @tristanridley1601
      @tristanridley1601 Před rokem

      @@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.

    • @star-iv
      @star-iv Před rokem +1

      @@tristanridley1601 You mean a d6 with sides 0.5, 1.5, 2.5, 3.5, 4.5, 5.5?

    • @tristanridley1601
      @tristanridley1601 Před rokem

      @@star-iv yes, though as a joke.

    • @viliml2763
      @viliml2763 Před rokem

      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.

  • @algmusicuk
    @algmusicuk Před rokem

    My 5 year old and myself found this so much fun. You have a new subscriber! Can't wait watch the other videos 😊

  • @otakuribo
    @otakuribo Před rokem +18

    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? 🤔

  • @caywind7
    @caywind7 Před rokem +16

    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!

    • @ps.2
      @ps.2 Před rokem +3

      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.

  • @NUGGet-3562
    @NUGGet-3562 Před 7 měsíci +1

    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.

  • @calinacho7704
    @calinacho7704 Před rokem +3

    As soon as I saw the barchart and the 2/3 estimation, I thought: "The center of gravity of a triangle!"

  • @SquashyPan
    @SquashyPan Před rokem +45

    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

    • @statisticsmatt
      @statisticsmatt Před rokem

      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. czcams.com/video/2chTtcmRAsU/video.html

    • @zvxcvxcz
      @zvxcvxcz Před rokem

      Did not deliver... did not live up to expectations... I wanted to see top x of m n-sided dice, not just top 1.

  • @noahlebaron729
    @noahlebaron729 Před rokem +41

    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.

    • @heart.9889
      @heart.9889 Před rokem +2

      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

    • @ronandevlin1479
      @ronandevlin1479 Před rokem +1

      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.

    • @cylondorado4582
      @cylondorado4582 Před rokem

      That would be good to know, since I really, really, really hate rolling for stats.

    • @matthewparker9276
      @matthewparker9276 Před rokem +1

      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.

    • @chaotickreg7024
      @chaotickreg7024 Před rokem

      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.

  • @justcallmexen
    @justcallmexen Před rokem +1

    I have been playing a game called Dicey Dungeons and been thinking on this sort of thing, and this kinda confirms my thoughts on it. In the game you can receive the "Frozen" status, which rerolls your highest roll into a 1 for each stack of freeze, which acts like rolling with disadvantage if your goal is to roll a higher number (it's not always, not to mention you can roll far more than two dice at once, just a simple example)

  • @NecroWolfExPaladin
    @NecroWolfExPaladin Před 5 měsíci +2

    Relating to D&D advantage, when you generate ability scores (1-18) a common way to generate them is to roll 4D6 and drop the lowest (3-18). I'm pretty sure after this that I can work out the math now, but it might be neat to see you do a vid on this and see what interesting things fall out when you tweak the question as you did here.

  • @CorneliusThroatworthy
    @CorneliusThroatworthy Před rokem +7

    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!

    • @CrankyxPants
      @CrankyxPants Před rokem +1

      Thanks. I wondered how the odds could be 13.825 and 13.33333 at the same time

    • @andersmusikka
      @andersmusikka Před rokem +1

      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! :-)

    • @Caesarr7
      @Caesarr7 Před rokem

      He explains this at the end, the equation is actually 2/3n + 1/2

    • @antoinegermain1166
      @antoinegermain1166 Před rokem

      @@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.

    • @EmmanuelEytan
      @EmmanuelEytan Před rokem +1

      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.

  • @remkat
    @remkat Před rokem +4

    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.

  • @user-ow2yp9oy9e
    @user-ow2yp9oy9e Před měsícem

    It’s amazing. Interesting and gives a room for analysis. Thank you.

  • @Bigshot0910
    @Bigshot0910 Před 8 měsíci +3

    When you watch so many DnD videos because of Baldur’s Gate 3 that CZcams decides to serve you a video on dice math.

  • @kainotachi
    @kainotachi Před rokem +38

    I've always looked at the extra 1/2 for the average roll as a result of the lowest possible value being a 1. n/2 calculates the midpoint between 0 and n, but you can't roll a 0. What you actually need is the midpoint between 1 and n, so you need to calculate (1+n)/2.

    • @gnostechnician
      @gnostechnician Před rokem +2

      Interesting. This doesn't work for more than two dice... but it DOES handle the zero case correctly (the +0.5 method gives you the answer that rolling zero dice, or a 0-sided die, gives you a mean roll of 0.5). I wonder how to make it thorough?

    • @kainotachi
      @kainotachi Před rokem +4

      @@gnostechnician It actually kind of works even better for multiple dice, since roll results become more and more of a regular distribution as you increase the dice! Due to the number of possible combinations that get the same result, the the median value becomes much more likely the more dice you add, while the further out values become much more unlikely.
      You just need to replace the 1 with the number of dice, since the minimum possible value on each of them is a 1. So the average value for 2d6 would be (2+12)/2, or 7, the fairly common knowledge answer, while 3d6 would be (3+18)/3, or 10.5.
      Now as for how to work that into the math for rolling with advantage, that I'm less sure of.
      edit: I also hadn't considered multiple dice of different sizes, but a bit of basic calculation seems like it should work in that case, as well. Rolling a d6 and a d20 together, the minimum roll would be a 2 and the maximum would be 26, so (2+26)/2 would give you 14. I haven't completely worked it out for certain, but it seems correct. The average value of a d6 and d20 alone are 3.5 and 10.5, respectively, so it would make sense for the average roll of them combined to be 14.

    • @SkullbombRaging
      @SkullbombRaging Před rokem +2

      I did some guessing and checking and found that (m/(m+1))n+(0.5-0.00416666666m) seems to make it work with m = 2 and m = 3. I'd check the rest but I'm not sure how to do the math to make sure my answers are correct.
      Any thoughts?

  • @bennokrickl8135
    @bennokrickl8135 Před rokem +5

    The 2/3 would have also been obvious viewing it geometricall, because as n->infinity the bar chart becomes a right triangle. That right triangle can be split in two equal areas by a line at x=2/3*n. So again a geometric solution to statistics :)

  • @bibleboardgames5199
    @bibleboardgames5199 Před 10 měsíci

    Thank you!!!
    I have a draft board game design where I was adding two 6-sided dice together but that made the game swings feel too lucky. And only rolling 1 die to reduce the difference isn't as fun as rolling multiple dice. Now that I know the ratio of 1/2, 2/3, 3/4, and 4/5 (+ 1/2), I can see ways of adding more dice into the design while limiting the difference between players. Nice!!!

  • @wadman2314
    @wadman2314 Před rokem

    This was really interesting and considering I'm not math literate or practiced at math, I understood enough to follow along. Well done.
    Would you be interested in analyzing the math behind rolling character stats in D&D? There are different ways to do it, but the method my friends and I use is to roll 4d6, re-roll 1s and 2s once, add the three highest numbers for an ability score, and repeat for a total of six ability scores. I would enjoy learning about how that works.

  • @jrex8322
    @jrex8322 Před rokem +22

    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

    • @CosmicPlatonix
      @CosmicPlatonix Před rokem +13

      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.

    • @wolf1066
      @wolf1066 Před rokem

      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.

    • @trejkaz
      @trejkaz Před rokem +3

      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.

    • @livedandletdie
      @livedandletdie Před rokem +1

      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.

    • @CosmicPlatonix
      @CosmicPlatonix Před rokem +3

      @@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.