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

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ธ.ค. 2024

ความคิดเห็น • 4.2K

  • @standupmaths
    @standupmaths  2 ปีที่แล้ว +2774

    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 2 ปีที่แล้ว +52

      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 2 ปีที่แล้ว +3

      Do we get a standard distribution curve?🤔

    • @QlueDuPlessis
      @QlueDuPlessis 2 ปีที่แล้ว +20

      Three dice and discard the high and low

    • @siraaron4462
      @siraaron4462 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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.

  • @misterscottintheway
    @misterscottintheway 2 ปีที่แล้ว +1024

    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 2 ปีที่แล้ว +106

      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 2 ปีที่แล้ว +12

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

    • @The_Murder_Party
      @The_Murder_Party 2 ปีที่แล้ว +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 2 ปีที่แล้ว +1

      Stand up maths after all

    • @GeekProdigyGuy
      @GeekProdigyGuy 2 ปีที่แล้ว +2

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

  • @coloringontheline
    @coloringontheline 2 ปีที่แล้ว +1593

    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!

    • @theyonlycomeoutwhenitsquiet
      @theyonlycomeoutwhenitsquiet 2 ปีที่แล้ว +105

      A rhombic dodecahedron of course

    • @stephanevalladier6210
      @stephanevalladier6210 2 ปีที่แล้ว +12

      ​@@theyonlycomeoutwhenitsquiet I was about to say!

    • @WalkerBoh84
      @WalkerBoh84 2 ปีที่แล้ว +15

      @InSomnia DrEvil 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 2 ปีที่แล้ว +10

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

    • @rennleitung_7
      @rennleitung_7 ปีที่แล้ว +2

      The 4d seems a little bit weird as long as you look at it as an extra dimension to a 3d cube, but it instantly shows all it's beauty if you look at it as a squared Parker-square.

  • @degv364
    @degv364 2 ปีที่แล้ว +626

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

    • @double124
      @double124 2 ปีที่แล้ว +43

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

    • @karlashley8680
      @karlashley8680 2 ปีที่แล้ว +6

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

    • @inazuma-fulgur
      @inazuma-fulgur 2 ปีที่แล้ว +46

      @@karlashley8680 that's almost 8.5%

    • @rehbeinator
      @rehbeinator 2 ปีที่แล้ว +80

      @@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 2 ปีที่แล้ว +21

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

  • @mr.zvonek9565
    @mr.zvonek9565 2 ปีที่แล้ว +873

    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 2 ปีที่แล้ว +190

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

    • @awesomenesschanel
      @awesomenesschanel 2 ปีที่แล้ว +92

      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_ 2 ปีที่แล้ว +38

      @@Slimmeyy that's why the average is higher

    • @joshuagrant7812
      @joshuagrant7812 2 ปีที่แล้ว +162

      great axe is better because rolling big dice is more fun

    • @aogasd
      @aogasd 2 ปีที่แล้ว +94

      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.

  • @adam.antoise.97
    @adam.antoise.97 2 ปีที่แล้ว +941

    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 2 ปีที่แล้ว +77

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

    • @iamanoob9747
      @iamanoob9747 2 ปีที่แล้ว +35

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

    • @edderiofer
      @edderiofer 2 ปีที่แล้ว +35

      @@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 2 ปีที่แล้ว +10

      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 2 ปีที่แล้ว +31

      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.

  • @connorgrynol9021
    @connorgrynol9021 2 ปีที่แล้ว +1832

    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 2 ปีที่แล้ว +324

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

    • @connorgrynol9021
      @connorgrynol9021 2 ปีที่แล้ว +223

      @@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 2 ปีที่แล้ว +179

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

    • @connorgrynol9021
      @connorgrynol9021 2 ปีที่แล้ว +48

      @@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 2 ปีที่แล้ว +108

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

  • @jackielinde7568
    @jackielinde7568 2 ปีที่แล้ว +5314

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

    • @idontwantahandlethough
      @idontwantahandlethough 2 ปีที่แล้ว +665

      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 2 ปีที่แล้ว +155

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

    • @ninjabob2456
      @ninjabob2456 2 ปีที่แล้ว +143

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

    • @mmseng2
      @mmseng2 2 ปีที่แล้ว +80

      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 2 ปีที่แล้ว +11

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

  • @Masheeable
    @Masheeable 2 ปีที่แล้ว +315

    "...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 2 ปีที่แล้ว +2

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

    • @popcorny007
      @popcorny007 ปีที่แล้ว +1

      14:02 in case anyone was wondering!

  • @AlphaPhoenixChannel
    @AlphaPhoenixChannel 2 ปีที่แล้ว +772

    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.

  • @DerekWoolverton
    @DerekWoolverton 2 ปีที่แล้ว +410

    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 2 ปีที่แล้ว +15

      What shape were you aiming for?

    • @U014B
      @U014B 2 ปีที่แล้ว +64

      @@mujtabaalam5907 NO MORE QUESTIONS

    • @SimonBuchanNz
      @SimonBuchanNz 2 ปีที่แล้ว +2

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

    • @idontwantahandlethough
      @idontwantahandlethough 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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

  • @G1NZOU
    @G1NZOU 2 ปีที่แล้ว +616

    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 2 ปีที่แล้ว +85

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

    • @palkd8296
      @palkd8296 2 ปีที่แล้ว +10

      Haha what an unlucky bunch!

    • @pvic6959
      @pvic6959 2 ปีที่แล้ว +31

      sometimes the dice are the ones that tell the story lol

    • @IceMetalPunk
      @IceMetalPunk 2 ปีที่แล้ว +62

      "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 2 ปีที่แล้ว +42

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

  • @TailsClock
    @TailsClock 2 ปีที่แล้ว +169

    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 2 ปีที่แล้ว +25

      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 2 ปีที่แล้ว +2

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

    • @tobistein9831
      @tobistein9831 ปีที่แล้ว +4

      @@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 ปีที่แล้ว +2

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

  • @mariow.3063
    @mariow.3063 2 ปีที่แล้ว +708

    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 2 ปีที่แล้ว +8

      +

    • @cajungames
      @cajungames 2 ปีที่แล้ว +10

      We need this !

    • @kotori87gaming89
      @kotori87gaming89 2 ปีที่แล้ว +20

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

    • @hakonatli
      @hakonatli 2 ปีที่แล้ว +3

      Bump

    • @justincatlett56
      @justincatlett56 2 ปีที่แล้ว +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.

  • @unfortunatelyevil1767
    @unfortunatelyevil1767 2 ปีที่แล้ว +3911

    "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 2 ปีที่แล้ว +85

      Gotta love Matt

    • @nic5423
      @nic5423 2 ปีที่แล้ว +63

      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 2 ปีที่แล้ว +93

      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 2 ปีที่แล้ว +151

      @@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 2 ปีที่แล้ว +3

      Which seems objectively harder in this case.

  • @GuillotinedChemistry
    @GuillotinedChemistry 2 ปีที่แล้ว +324

    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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +4

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

    • @GuillotinedChemistry
      @GuillotinedChemistry 2 ปีที่แล้ว

      @@OpiatesAndTits I agree wholeheartedly.

    • @ThePhunnman5
      @ThePhunnman5 2 ปีที่แล้ว +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!

  • @kylerivera3470
    @kylerivera3470 2 ปีที่แล้ว +149

    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 2 ปีที่แล้ว +15

      @ChaosLord5129
      🫴 L
      here you go

    • @Snaps12345
      @Snaps12345 2 ปีที่แล้ว +4

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

    • @Lacie9
      @Lacie9 ปีที่แล้ว +12

      @ChaosLord5129 ratio

    • @corruleumblue3317
      @corruleumblue3317 ปีที่แล้ว +5

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

    • @TehNoobiness
      @TehNoobiness ปีที่แล้ว +6

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

  • @davidh.4944
    @davidh.4944 2 ปีที่แล้ว +321

    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 2 ปีที่แล้ว +45

      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 2 ปีที่แล้ว +11

      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 2 ปีที่แล้ว +4

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

    • @50mt
      @50mt 2 ปีที่แล้ว +4

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

    • @dtaggartofRTD
      @dtaggartofRTD 2 ปีที่แล้ว +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.

  • @coryman125
    @coryman125 2 ปีที่แล้ว +86

    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 2 ปีที่แล้ว +4

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

  • @VoriuM
    @VoriuM 2 ปีที่แล้ว +38

    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.

  • @blackmber
    @blackmber 2 ปีที่แล้ว +424

    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 2 ปีที่แล้ว +20

      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 2 ปีที่แล้ว +39

      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.

    • @SocksAndPuppets
      @SocksAndPuppets 2 ปีที่แล้ว +37

      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 2 ปีที่แล้ว +3

      @@SocksAndPuppets 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 2 ปีที่แล้ว +9

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

  • @edderiofer
    @edderiofer 2 ปีที่แล้ว +232

    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 2 ปีที่แล้ว

      k?

    • @kindoflame
      @kindoflame 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว

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

    • @gammakay521
      @gammakay521 2 ปีที่แล้ว +1

      is this edderiofer from the maths subreddit?

  • @sandystarr0
    @sandystarr0 2 ปีที่แล้ว +50

    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 2 ปีที่แล้ว +1

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

    • @ideegeniali
      @ideegeniali 2 ปีที่แล้ว

      Don't forget DnD!

  • @benvoliothefirst
    @benvoliothefirst 2 ปีที่แล้ว +252

    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 ปีที่แล้ว +3

      Now picture the 4d cube

    • @nelus7276
      @nelus7276 ปีที่แล้ว +6

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

    • @Vicho1079
      @Vicho1079 ปีที่แล้ว

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

    • @benjiusofficial
      @benjiusofficial ปีที่แล้ว

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

  • @mqb3gofjzkko7nzx38
    @mqb3gofjzkko7nzx38 2 ปีที่แล้ว +455

    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 2 ปีที่แล้ว +46

      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 2 ปีที่แล้ว +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. th-cam.com/video/2chTtcmRAsU/w-d-xo.html

    • @rein7046
      @rein7046 2 ปีที่แล้ว +31

      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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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

  • @leokastenberg800
    @leokastenberg800 2 ปีที่แล้ว +79

    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 2 ปีที่แล้ว +1

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

    • @Seb135-e1i
      @Seb135-e1i 2 ปีที่แล้ว

      ​@@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 2 ปีที่แล้ว

      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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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).

  • @ClostridiumChampion
    @ClostridiumChampion 2 ปีที่แล้ว +288

    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 2 ปีที่แล้ว +15

      That's smart and so are you

    • @ronandevlin1479
      @ronandevlin1479 2 ปีที่แล้ว +5

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

    • @austingarcia6060
      @austingarcia6060 2 ปีที่แล้ว +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 2 ปีที่แล้ว +9

      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 2 ปีที่แล้ว +1

      Wow. That blew my mind.

  • @paulcoy9060
    @paulcoy9060 2 ปีที่แล้ว +16

    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 7 หลายเดือนก่อน

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

    • @apples6684
      @apples6684 7 หลายเดือนก่อน +3

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

  • @nintendocyclone
    @nintendocyclone 2 ปีที่แล้ว +118

    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 2 ปีที่แล้ว

      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 2 ปีที่แล้ว

      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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +5

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

  • @singerofsongss
    @singerofsongss 2 ปีที่แล้ว +217

    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 2 ปีที่แล้ว +16

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

    • @juliuswarburton
      @juliuswarburton 2 ปีที่แล้ว +19

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

    • @jayteegamble
      @jayteegamble 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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.

  • @blacksheep9950
    @blacksheep9950 2 ปีที่แล้ว +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.

  • @landler656
    @landler656 2 ปีที่แล้ว +7

    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!

  • @ryanclark1878
    @ryanclark1878 2 ปีที่แล้ว +253

    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 2 ปีที่แล้ว +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 2 ปีที่แล้ว

      Finally its here. YES
      th-cam.com/video/J55WNzIRIUM/w-d-xo.html.

    • @starseeker3311
      @starseeker3311 2 ปีที่แล้ว +4

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

    • @AdamRidley11
      @AdamRidley11 2 ปีที่แล้ว +2

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

    • @radarksu
      @radarksu 3 หลายเดือนก่อน

      @@AdamRidley11 Do you figure that the centroid of a pentagonal pyramid is (4/5)ths of the way down from the top?

  • @caywind7
    @caywind7 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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.

  • @johnchessant3012
    @johnchessant3012 2 ปีที่แล้ว +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 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. th-cam.com/video/2chTtcmRAsU/w-d-xo.html

  • @andrewellis3447
    @andrewellis3447 2 ปีที่แล้ว +16

    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 2 ปีที่แล้ว +3

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

    • @dwakeling1
      @dwakeling1 10 หลายเดือนก่อน +4

      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

    • @natalynn9824
      @natalynn9824 4 หลายเดือนก่อน +2

      I once had a risk simulator where you could plug in the attacker and defender army sizes to see your chances. For any large numbers, the attacker almost always wins. Mainly because the second highest goes to the attacker very often even though the highest often goes to the defender (winning ties)

  • @davepyne
    @davepyne 2 ปีที่แล้ว +36

    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.

  • @Toran77928
    @Toran77928 2 ปีที่แล้ว +159

    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 2 ปีที่แล้ว +29

      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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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.

  • @Dominik-K
    @Dominik-K 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว

      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.

  • @Deadl0ck
    @Deadl0ck 2 ปีที่แล้ว +112

    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.

  • @tabbbatpwns
    @tabbbatpwns 2 ปีที่แล้ว +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  2 ปีที่แล้ว +22

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

  • @carrots1550
    @carrots1550 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +8

      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.

  • @thenefariousnerd7910
    @thenefariousnerd7910 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว

      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 2 ปีที่แล้ว +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 2 ปีที่แล้ว

      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.

  • @artempozdniakov2850
    @artempozdniakov2850 11 หลายเดือนก่อน +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.

  • @LemonArsonist
    @LemonArsonist 2 ปีที่แล้ว +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

  • @remkat
    @remkat 2 ปีที่แล้ว +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.

  • @3geek14
    @3geek14 2 ปีที่แล้ว +82

    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 2 ปีที่แล้ว +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. th-cam.com/video/2chTtcmRAsU/w-d-xo.html

    • @pyglik2296
      @pyglik2296 2 ปีที่แล้ว +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).

  • @paladin1164
    @paladin1164 2 ปีที่แล้ว +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!

  • @jeffreyblack666
    @jeffreyblack666 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว

      @@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 2 ปีที่แล้ว +1

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

    • @tristanridley1601
      @tristanridley1601 2 ปีที่แล้ว

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

    • @viliml2763
      @viliml2763 2 ปีที่แล้ว

      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.

  • @hauslerful
    @hauslerful 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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

  • @addymant
    @addymant 2 ปีที่แล้ว +206

    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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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.

  • @guilhemmarty6287
    @guilhemmarty6287 2 ปีที่แล้ว +12

    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 2 ปีที่แล้ว +1

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

    • @delta-chat
      @delta-chat ปีที่แล้ว

      @@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 ปีที่แล้ว +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 7 หลายเดือนก่อน

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

  • @paulthompson382
    @paulthompson382 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +2

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

    • @TheScarvig
      @TheScarvig 2 ปีที่แล้ว

      @@Thagrynor le .

  • @kevinhocking3531
    @kevinhocking3531 2 ปีที่แล้ว +16

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

  • @otakuribo
    @otakuribo 2 ปีที่แล้ว +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? 🤔

  • @wtblessing
    @wtblessing ปีที่แล้ว +2

    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.

  • @crazygab50
    @crazygab50 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +1

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

    • @kori228
      @kori228 2 ปีที่แล้ว

      just plug it into anydice

    • @zvxcvxcz
      @zvxcvxcz 2 ปีที่แล้ว +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

  • @jessewieman6955
    @jessewieman6955 2 ปีที่แล้ว +9

    As an artist who avoids maths whenever possible I really enjoyed this. I wish I had you as a math teacher in high school then I would have loved it. Really great presentation and you have great charisma.

  • @SquashyPan
    @SquashyPan 2 ปีที่แล้ว +46

    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 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. th-cam.com/video/2chTtcmRAsU/w-d-xo.html

    • @zvxcvxcz
      @zvxcvxcz 2 ปีที่แล้ว

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

  • @coryzilligen790
    @coryzilligen790 2 ปีที่แล้ว +58

    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 2 ปีที่แล้ว +11

      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 2 ปีที่แล้ว +13

      @@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 2 ปีที่แล้ว +2

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

    • @ignathiel
      @ignathiel 2 ปีที่แล้ว +3

      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 ปีที่แล้ว +4

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

  • @NALYDretneprac
    @NALYDretneprac 2 ปีที่แล้ว +37

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

    • @happosade
      @happosade 2 ปีที่แล้ว +2

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

    • @karniumsden7883
      @karniumsden7883 2 ปีที่แล้ว

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

    • @NALYDretneprac
      @NALYDretneprac 2 ปีที่แล้ว

      ​@@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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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.'

  • @josephpierce8926
    @josephpierce8926 2 ปีที่แล้ว +454

    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 2 ปีที่แล้ว +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.

    • @The_Murder_Party
      @The_Murder_Party 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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.

    • @The_Murder_Party
      @The_Murder_Party 2 ปีที่แล้ว +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.

  • @noreply5576
    @noreply5576 2 ปีที่แล้ว +7

    A long time ago I wrote a very simple 'bias' function for my own personal random number generator library and now thanks to this video I know what it actually simulates, i.e. rolling n dice and taking the highest value. Back then I just used a function plotter program and some experimentation to get a system that produced nice results, I had no idea that this is what I was doing.
    Anyways, all it does is take the normalized output of a PRNG (i.e. random float between 0 and 1) to the power of a 'bias' parameter, which also has to be a number between 0 and 1 (so 'prng^bias')*. When I use 1/2 for the bias and convert the resulting skewed random numbers to dice values, I get the same distribution as the "rolling two dice" scenario and with 1/3 it's the same as three dice etc. What's kinda funny is that this also means you could throw 1.5 or 2.25 dice and take the highest number with this.
    * Actually, it uses 'prng^(1-bias)' for nicer input, as in, higher bias skews the results more. Also it reverses the result on negative bias input ('1-result'), so you can simulate always taking the lower number as well. This means you can specify a bias parameter between -1 and 1, where 0 doesn't skew it at all and the closer it gets to either limit, it skews it more towards the lower or higher numbers, which is a nice property.

    • @statisticsmatt
      @statisticsmatt 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. th-cam.com/video/2chTtcmRAsU/w-d-xo.html

  • @Zachpi
    @Zachpi 2 ปีที่แล้ว +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

  • @QuantumHistorian
    @QuantumHistorian 2 ปีที่แล้ว +12

    The case of m dice with n faces where n->infinity is pretty easy to do by taking the continuum limit.
    Following the same arguments as in the video, the probability p(k) of getting outcome k (between 1 and n) is proportional to k^(m-1). So p(k) = N k^(m-1). Note that for one dice this is a constant, for two it's linearly increasing, etc... This is the concentration of measure towards high values that makes rolling with advantage powerful.
    N is found by normalising the distribution. To do that, rather than dealing with messy sums, we instead let k be a continuous variable and integrate: [p(k) dk from 0 to n] = 1 enables us to find N, resulting in p(k) = m k^(m-1) / n^m.
    To find the expectation value, we integrate again: E = [p(k)k dk from 0 to n] = m/(m+1) n^(m+1)/n^m = n m/(m+1)
    The ratio is E/n = m/(m+1) as expected.
    The factor of 1/2 is missing in the expression for E because the continuous limit essentially only keeps the leading order terms, and a constant factor is certainly not. And anyway, we're integrating from 0 while the dice are 1 indexed.

    • @statisticsmatt
      @statisticsmatt 2 ปีที่แล้ว +1

      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. th-cam.com/video/2chTtcmRAsU/w-d-xo.html

  • @noahlebaron729
    @noahlebaron729 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว

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

    • @matthewparker9276
      @matthewparker9276 2 ปีที่แล้ว +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 2 ปีที่แล้ว

      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.

  • @CorneliusThroatworthy
    @CorneliusThroatworthy 2 ปีที่แล้ว +8

    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 2 ปีที่แล้ว +2

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

    • @andersmusikka
      @andersmusikka 2 ปีที่แล้ว +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 2 ปีที่แล้ว

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

    • @antoinegermain1166
      @antoinegermain1166 2 ปีที่แล้ว +1

      @@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 2 ปีที่แล้ว +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.

  • @Blackadder125
    @Blackadder125 ปีที่แล้ว +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!

  • @HolrikImalo
    @HolrikImalo 2 ปีที่แล้ว +14

    Thank you for the video, very interesting patterns explained in an intuitive manner as always!
    However, I believe there is an error in the equation suggested on the end (24:50). Assuming m going to infinity, m/(m+1) would cancel out and the equation would give an average value of (n+1/2) for a n-sided dice (e.g. average value of 6.5 for a D6), which should not be possible...?
    Reformulating the equation to (n+1)*m/(m+1) would still work for n=1, giving an average value of 3.5. Assuming m going to infinity, it would give an average value of n, which is what you would expect. Considering n=20 and m=3 (20:10), this equation would give us a value of 15.75, which is also not exactly 15.4875.
    As such, looking into the patterns presented by Matt (12:00 and 20:10), I believe the actual average highest value equation for m rolls of n-sided dices would look something like 1/(m+1)*(n+1)*(mn-1). However this equation is also wrong, as picking m=2 and n=1 would give us 1/(2+1)*(1+1)*(2*1-1) = 1/2*3*1 = 2/3, although it should be 1. This is of course assuming a 1-sided "dice", i.e. a perfect sphere, would stop rolling eventually.
    Maybe there is a deeper pattern? Or maybe it would be simpler to look at dices numbered from 0 to n-1 rather than dices numbered from 1 to n. I have no idea.

    • @DylanNelsonSA
      @DylanNelsonSA 2 ปีที่แล้ว +2

      The 1/2 is correct, but there are further correction terms. The average is m/(m + 1) n + 1/2 + (something)/n + (something else)/n^2 + ... + (yet another constant)/n^{m - 1}

    • @darick2133
      @darick2133 2 ปีที่แล้ว

      The n part has to be wrong
      With m to infinity you would result in an average larger than the sides of the dice
      Test with 19 dice of 2 sides, that results in more than 2 allready.
      0.95x2+0.5 = 2.4,
      I dont think so. Unless i read something wrong

    • @beatjackle7641
      @beatjackle7641 2 ปีที่แล้ว

      I suggest m/(m+1)*n+1/(m+1)=(mn+1)/(m+1).
      My Idea comes from reset the numbers of the dice from 0 to n-1. Then the math is easier. In the end you can add 1 to the result:
      I got the term: m/(m+1)*(n-1)+1 and with algebra I'll end up to m/(m+1)*n+1/(m+1)=(mn+1)/(m+1).
      As @Dylan mentioned, the exact term is a bit longer, but its a o(1), so there might be a little deviation. But for m=1 it is exact and even for n=1
      If you wanna prove this, I'd recommend you to work it out with o(n) notation. I think this will help a lot.

    • @DylanNelsonSA
      @DylanNelsonSA 2 ปีที่แล้ว

      As for the behaviour as m tends to infinity, the exponents of m in the "other terms" part of my reply increase as the exponent on n decreases, and so these "correction" terms become more dominant as m increases.

  • @jrex8322
    @jrex8322 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว

      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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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.

  • @VermisTerrae
    @VermisTerrae 2 ปีที่แล้ว +64

    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 ปีที่แล้ว

      @J4zzling No, just an 4zzhole :)

    • @sakesaurus
      @sakesaurus ปีที่แล้ว

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

  • @JMhellendoorn
    @JMhellendoorn 2 ปีที่แล้ว +85

    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 2 ปีที่แล้ว +16

      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 2 ปีที่แล้ว +1

      An interesting video from Dave's garage. Python versus various flavours of "C": th-cam.com/video/D3h62rgewZM/w-d-xo.html

    • @advancewarstournamentseries
      @advancewarstournamentseries 2 ปีที่แล้ว +5

      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 ปีที่แล้ว +1

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

  • @briton1509
    @briton1509 2 ปีที่แล้ว +7

    I have been wondering, grappling, and bodging this problem for a almost a year, and now my favorite Maths Channel has covered it in comprehensible detail, and It's a wonderful.

    • @statisticsmatt
      @statisticsmatt 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. th-cam.com/video/2chTtcmRAsU/w-d-xo.html

  • @TimHaloun
    @TimHaloun 2 ปีที่แล้ว +9

    The actual interesting extension of this problem is 'what does having advantage do to my chance to achieve a target roll?'. Not just what happens to the expected average. If all you need is a 2 having advantage multiplies your odds of success by N in relative terms, but you were almost always going to make it, so it's a small change in absolute terms. If you need a 20 it increases your chances the most in absolute terms, but you are still unlikely. Check out the path of exile wikipedia page on the 'lucky' mechanic from that game for a nice graph and breakdown.

    • @BadIdeasBureau
      @BadIdeasBureau 2 ปีที่แล้ว +1

      In general, by building up shells its easy to show that the chance of rolling at least x on one of two n sided dice is 1- ((x-1)/n)^2 (which is the nice way of formatting it to look less confusing in text) or (n^2 - (x-1)^2)/(n^2) (which is the presentation which makes the logic behind it a little easier to see - it's the size of the thick shell between a roll of n and a roll of x, inclusive)

    • @golemmoja
      @golemmoja 2 ปีที่แล้ว +1

      Correction: Path of Exile ~Wiki~ page. I was searching the wikipedia article of the game for a mathematical breakdown. :D

    • @ronandevlin1479
      @ronandevlin1479 2 ปีที่แล้ว

      I can put together a nice spreadsheet for you if you'd like.

    • @TimHaloun
      @TimHaloun 2 ปีที่แล้ว

      @@golemmoja haha yes whoops!

  • @wilfdarr
    @wilfdarr 2 ปีที่แล้ว +10

    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!

    • @bendystrawz2832
      @bendystrawz2832 2 ปีที่แล้ว

      10/10 face!

    • @kantpredict
      @kantpredict 2 ปีที่แล้ว +1

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

  • @sundaykessig-kinkaid7313
    @sundaykessig-kinkaid7313 9 หลายเดือนก่อน

    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.

  • @tysonwilkins2537
    @tysonwilkins2537 2 ปีที่แล้ว +6

    Another way of intuiting the 2/3rds rule while also validating that the probability increases exactly linearly comes from solid mechanics. If you have a triangular distributed load on a beam (i.e load starts at zero and increases linearly until the end of the distribution), the center of mass for that distribution is always 2/3rds of the way along the distributed load.

    • @mrdraw2087
      @mrdraw2087 2 ปีที่แล้ว +1

      P = 2x, 0 < x < 1. E[X] = sum of 2x² from 0 to 1, which is 2/3 indeed.

    • @thegreatsalad
      @thegreatsalad 2 ปีที่แล้ว

      Yessssssssss, my thoughts exactly!!!!!!!! I'm sure it's based on the geometric centroid of a triangle.

  • @benjaminanderson1014
    @benjaminanderson1014 2 ปีที่แล้ว +20

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

    • @andrewmunro8830
      @andrewmunro8830 2 ปีที่แล้ว +3

      Came looking for this ...

    • @tomwilkinson9235
      @tomwilkinson9235 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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  2 ปีที่แล้ว +17

      My motto is: never say die!

    • @benjaminanderson1014
      @benjaminanderson1014 2 ปีที่แล้ว +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?

  • @kainotachi
    @kainotachi 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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?

  • @dinamosflams
    @dinamosflams 2 ปีที่แล้ว

    12:58 - THANK YOUUUUUUU. OH MY GOD ive never been this happy for someone extending their theory and making a general rule

  • @parkerprice6787
    @parkerprice6787 2 ปีที่แล้ว +6

    when i worked on this problem i took it a different direction; i focused on how much advantage improved your chances of exceeding a given number. i did some of what you did until I got to 13.8 or so as the avg for d20, then noticed that this increase of 3.3 or so was much lower than i had been expecting. When you analyze from the perspective of the chance of getting above Z (where Z is the minimum roll to succeed), the value of advantage changes significantly as a function of Z. namely, as Z goes to 10.5, P (the probability of exceeding Z) approaches 5. I never ran the analysis for non-d20s; idk how it generalizes.

    • @solsystem1342
      @solsystem1342 2 ปีที่แล้ว

      You just square the chance of failure. Since that's the probability we care about and the events are independent.

  • @doctordave4731
    @doctordave4731 2 ปีที่แล้ว +8

    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 2 ปีที่แล้ว

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

  • @bennokrickl8135
    @bennokrickl8135 2 ปีที่แล้ว +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 :)

  • @aname4731
    @aname4731 2 ปีที่แล้ว

    You can get to this relationship by considering continuous random variables - namely uniform(0,1) random variables. Suppose you have k uniform(0,1) random variables u1, u2, ..., uk and consider the random variable Z = max{u1, u2, ..., uk} which is simply the max of the k uniform random variables. We can easily calculate Pr(Z < z) for any z if we know Pr(u_i < z) or in other words we can easily get the cdf of Z if we know the cdf of all the u_i's. Pr(u_i < z) = z, so Pr(Z < z) = z^k. One can then calculate the pdf, f(z), of Z as kz^k-1, which can be used to calculate the expectation of Z. This expectation E(Z) is equal to the integral from 0 to 1 of zf(z) dz which can be solved to be k / k+1.

  • @addymant
    @addymant 2 ปีที่แล้ว +5

    I don't know if this is a concept in mathematics, but when trying to figure out the mean of a composite (?) distribution (e.g. taking the max, summing, etc.), I find it helpful to find the expected value of the smallest value, the second smallest, etc. For composites of uniform distributions like dice, those values will be evenly distributed, so for two uniform distributions, the expected value of the smaller one is 1/3, and the larger one is 2/3.

  • @IshanPandit
    @IshanPandit 2 ปีที่แล้ว +6

    For 1 million subscribers, are you going to get a Golden Play Button or a Golden Parker Button?
    Jokes apart, congratulations man!! You're one of my fav TH-cam channels and one of my fav people on TH-cam! You made me fall in love with math even more than i already did! You deserve wayyy more than 1 million and I'm sure it's coming! Love you Matt! ❤️🔥

  • @52392daner
    @52392daner ปีที่แล้ว +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 ปีที่แล้ว +2

      And the 4th is elven accuracy and lucky

    • @TNH91
      @TNH91 ปีที่แล้ว +1

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

    • @dancinindadark
      @dancinindadark ปีที่แล้ว +1

      @@TNH91 I prefer the term deeces

    • @Echs_D33
      @Echs_D33 10 หลายเดือนก่อน

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

  • @NUGGet-3562
    @NUGGet-3562 ปีที่แล้ว +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.

  • @EllisThings
    @EllisThings 2 ปีที่แล้ว +5

    I literally cheered when you brought out the glued together shells for 5 and 6

    • @terranovarubacha5473
      @terranovarubacha5473 2 ปีที่แล้ว +1

      I did not cheer but felt a quiet sense of deep satisfaction

  • @BV-mg1ek
    @BV-mg1ek 2 ปีที่แล้ว +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.

  • @fragglet
    @fragglet 2 ปีที่แล้ว +7

    A moment of appreciation for the fact that Matt's computer is named "MattBook-Pro"

    • @jaysicks
      @jaysicks 2 ปีที่แล้ว +1

      Did I really have to scroll down for 2 minutes to find a single comment mentioning this? Too bad

  • @alexm892
    @alexm892 ปีที่แล้ว

    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

  • @calinacho7704
    @calinacho7704 2 ปีที่แล้ว +4

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

  • @benjaminsilver122
    @benjaminsilver122 2 ปีที่แล้ว +4

    Great work by the original questioner on the original deep dive! Though the y-axis having some wild annotations threw me way off, unless I’m missing how a graph goes from 2% to 4% back to 2%

  • @Bigshot0910
    @Bigshot0910 ปีที่แล้ว +5

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

  • @colewilkinson74
    @colewilkinson74 2 ปีที่แล้ว

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

  • @jaydenyamada2916
    @jaydenyamada2916 2 ปีที่แล้ว +6

    There's a very interesting application of this in magic the gathering. Delina Wild Mage is a creature card that lets you roll a d20, then copies another creature if you roll 15-20. There is a card called pixie guide that has the advantage text (If you roll one or more dice, roll that many plus one). So theoretically one can make an infinite number of creatures to attack your opponent with.

    • @maighstir3003
      @maighstir3003 2 ปีที่แล้ว +1

      That reminds me of a function in a Swedish roleplaying game, Eon, rather hilarious, but removed in the newest edition. The game really only uses D6, but in various situations you get to use "unlimited" throws where if you get a 6, you throw again and add the throws together, and again, and again, and...

    • @catprog
      @catprog 2 ปีที่แล้ว

      @@maighstir3003 Exploding dice I think is the "Official" term.:

  • @Dalenthas
    @Dalenthas 2 ปีที่แล้ว +6

    The extra ½ comes from the fact that N sided dice are numbered 1-N instead of 0-(N-1). If we properly zero indexed our dice that ½ would disappear.

    • @showjack1109
      @showjack1109 2 ปีที่แล้ว +6

      The average for a 6 sided die with the numbers [0,1,2,3,4,5] is 2.5, it doesn't disappear, it turns into -1/2. As long as there is an even number of side, the average will fall in between the two middle values. Shifting by a whole integer would not change that, you'd still get a half, just shifted as well.

    • @Dalenthas
      @Dalenthas 2 ปีที่แล้ว +1

      @@showjack1109 ah, fair. My bad, wasn't thinking things through.

    • @statisticsmatt
      @statisticsmatt 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. th-cam.com/video/2chTtcmRAsU/w-d-xo.html

  • @ungrave5231
    @ungrave5231 2 ปีที่แล้ว +10

    Reminds me of the time I was trying to find a fast method to roll n dice back in my first year of comp sci. Basically a question of how to distribute the probabilities of rolling certain sums if you rolled, say, 10000000d6 or something. I feel like I can probably work this out by now, but back then I was stumped and no one else seemed to have an answer online.

    • @ldskjfhslkjdhflkjdhf
      @ldskjfhslkjdhflkjdhf 2 ปีที่แล้ว

      Wouldn't you just take your random numbers and mod them by 10000000 or whatever the number of sides the die has?

    • @ungrave5231
      @ungrave5231 2 ปีที่แล้ว

      @@ldskjfhslkjdhflkjdhf since in my case you're summing the dice regardless of how many there are or how many faces, you basically have a bell curve or something for what the chances of getting various sums will be. Only one way to roll the highest and lowest value while the middle sums can be produced in many ways.

    • @MiguelPereira-yw8rg
      @MiguelPereira-yw8rg 2 ปีที่แล้ว +3

      You can look at the central limit theorem. It's a statistics theorem that says that any distribution tends towards a bell curve as n increases, and in fact once n>30 we just use the bell curve at that point

    • @ldskjfhslkjdhflkjdhf
      @ldskjfhslkjdhflkjdhf 2 ปีที่แล้ว +1

      @@ungrave5231 I misunderstood what you were trying to do. In that case generate a gaussian, multiply by your standard deviation and add the mean.

    • @verypotato6699
      @verypotato6699 2 ปีที่แล้ว

      for m n sided dice i guess:
      randomly generate n numbers, add up all of them and divide each by the total, then divide m by each of those.
      multiply n1 by 1, n2 by 2, n3 by 3 etc. and then take the average
      would that work?

  • @edmorris4103
    @edmorris4103 11 หลายเดือนก่อน +1

    Great stuff!! Another D&D related maths question: How about character creation? You roll 4d6 and drop the lowest number. The remaining 3 dice are totaled and you get your Ability Scores.