Secure your privacy with Surfshark! Enter coupon code standupmaths for an extra 4 months free at surfshark.com/standupmaths And let me know if this video contains your favourite ever Skylab the Dog cameo. I think it should.
Hi, You made a video about how thick a 3 sided coin would need to be in order to be equally likely to land on any of the three surfaces. Any follow-up on this? Love the videos xx
That was fun! For all you math whizzes, here's the challenge mode puzzle. Sample three random values uniformly in [0, 1], call them x, y, and z. What distribution describes (xy)^z. Answer: It's a uniform! This is wild to me, and even though I can prove it formally (and somewhat tediously), it still feels mysterious. If any of you can think of a good way to "see" it, feel free to send it my way and I'll strongly consider making a video on it. Also, for what it's worth, I think the ChatGPT explanation here is perfectly valid, and not really distinct from what Matt and I were describing at a fundamental level. All I wanted to offer was an easier way to "see" the cdf for the max(rand(), rand()) case.
My first thought was to try logarithms. The CDF then apparently involves an exponential and convolving that gives you another exponential. But that it gives you the same result as the CDF of a single random variable is surprising indeed. I'm curious if there is a nice way of showing this...
As I expected, Wikipedia does have an article on this (under the unimaginative title "Distribution of the product of two random variables") but I can't say that I gleaned any intuition from reading through the dense formulas on that page. But it *did* mention the word "convolution," so I suspect that you can go down that path and possibly get something useful out of it? (In other words: Try to explain what the distribution of xy is, using convolutions I guess, and maybe the exponent "magically pops out" of the CDF from there? That still doesn't feel super-intuitive, though...)
@@ancientswordrage Indeed: search for "Distribution of (XY)^Z if (X, Y, Z) is i.i.d. uniform on [0, 1]" on Math StackExchange and look at the most voted solution (I'm not posting the link because RUclips would most likely delete the comment).
I now totally believe that, if you tell Grant a complicated symbolic proof on a train, he'll think a little and then say, "there's a nice visual proof that goes like this..." and an animation will beam directly into your mind as he's talking.
Love that Matt and Grant took a break from work to talk about maths problem... only to then make that maths problem into videos, retroactively making it a work project!
This is why STEM hobbyists are just more productive than the rest of us. Even when they're only having fun, they make their jobs just a bit easier there in that specific way.
I love finding out about the communications between different scientists or mathematicians and all the interesting things that they come up with. E.g. Any time Ramanujan talks about 1 + 2 + 3 .... = -1/12 in his letters.
Great video! I wanted to add more information on the D36 shown at the end. Impact! Miniatures is the creator of that D36. I was a statistican for my previous job and really wanted to make a die that acted as both a D36 and 2D6. The D36 die also has dots above and below the numbers rolled. These dots show you the results for the first D6 (top) and the 2nd D6 (bottom) so that you can see all the possible results with the actual dice rolls. We have tested the die to make sure that it rolls fairly for distribution of the rolls. The die was designed with the help of a huge server array that solves problems for very difficult engineering math issues ... we had that system design the most fair 36 sided shape. Just wanted to add some more information as from the video I did not think you realized the purpose of the dots on the D36. So with that die, you would not need to take the square root (that works!) but you could just look at what you rolled and pick the highest number of dots shown on the roll. The Dice Labs buys them from Impact! In the UK, TheDiceShopOnline sells them. Thanks for showing our die on the video!
Reminds me a bit of a Neuro line I saw the other day. *Vedal:* How much should I lie on my tax return? *Neuro:* You just need to make your income look like less than it really is. Generally speaking, you should be safe as long as you earn less than $70k for the year. *Vedal:* What if you don't? *Neuro:* Then just lie more until you do.
So if you're playing dnd, instead of rolling for advantage, roll a 400 sided dice and take the square root! Edit: There's some confusion in the comments about whether this will work with a d20 and d400 so I made a spreadsheet. For me the most intuitive way to think about this is that when you roll a d400 and you take the square root and then take the ceiling of the result to get your effective d20-with-advantage result... there are 39 numbers you can roll on the d400 that will lead to getting a natural 20. If you roll from 362 to 400 inclusive, you've rolled a 20 However on the other extreme, only rolling exactly 1 on the d400 will give you a natural 1. That distribution of probability is the same as if you were to roll two d20s and take the highest as the result. There is no scaling needed, you simply take d400 result and take the square root and then ceiling that. Matt mentions why there's no need to scale at 15:21
In many games you roll against each other. So I wonder, if you would multiply your result by 20, while your oponent takes the square of his dice, would the outcome be the same as you rolling with advantage?
@@simonschonfeld1752 no, you don't have to divide by 20. taking the square root already makes sure that the result is between 1 and 20. rewatch the end of this video if you're confused
Once I saw the table of 2D6 it seemed too simple. Of course 6 has the most possibilities because it can't be 'beat' by the other dice. So it gets 11/36, 5 gets 9/36. Taking the square root of D36 rounded up, 26-36 all give 6, and that's 11 possibilities.
16:13 Since the rounded-up square root is obviously fixed for each value of the d36, you could just print your d36 with the numbers 1-6 distributed as in your table so you don't have to root it to get the value. You could actually make a single roll-with-advantage dice (with perhaps questionable fairness)
Definitely questionable fairness. The only way to make a fair d36 is as a(n ugly) bi-18-pyramid. And running the numbers, I think that’s the only way to do any “dSquared” except the degenerate case of d2 (which would be a d4 labeled 1, 2, 2, 2) since 2 is the only factor that appears more than once is the factorization of 120 (the disdyaxistriacontahedron, from which all the interesting fair dice descend.)
@@dalesheldon-hess552 The interesting question is not that it's not fair unless totally symmetric. The truly hard question is to measure the probabilities of unfair models (36 or 100 or anything). Which is my question to @gdclemo : how do you build your non-equiprobable die?
By the description, I think the dice is fair but contains significant regions between the flattened sides. As long as these are tapered a bit there should not be much chance of the die landing between numbers, and if it does you can just reroll.
@@gdclemoas was infamously demonstrated during the d3 coin series of videos, your can't really make a "fair" asymmetric die, because the probabilities will vary depending on the physical properties of the materials your die and table are made out of.
A bit misleading from the thumbnail (which was why I ended up watching - clickbait?) is that we're talking between 0 and 1 vs 1 and n. 14:00 explaining that 0 and 1 square root gets larger. And now I'm off to look more closely at square roots between 0 and 1 and 1 and n... Great video btw! Thanks.
If you were clickbaited by a man with the question of which function had the highest average value, I think it's safe to say it reached the target audience. It's not like slapping a pair of big honking [redacted] on a minecraft video and making gooners watch your mildly provocative block game let's play. There isn't a switch, you get the answer to the question the thumbnail presents.
@@josh___somethingI suppose the click bait is that based on the thumbnail and title it sounds like if you roll a d6 and take the square root of the results you would get the same result as rolling with advantage which is impossible. In reality the square root of a d36 is equal to rolling a d6 with advantage which sounds much more reasonable.
Here, allow me to kick you while you're down. One goose, two geese, three gice. One moose, two meese, three mice. One mouse, two mouses. Hey, what's that red stuff coming out of your ears?
I would say f---all would be more like an infinitesimal. it is quite literally next to nothing (aka zero). I'd imagine taking the square root would also do next to nothing to change that. 😄
Always nice to see how often you are able to use these concepts in your every day. As a programmer I often get faced with similar situations, sometimes even involving randomness to this scale, but it never fails to amaze me how incredibly beautiful the math behind it really is as natural as it may seem at first
DM: "You're in a dark cave, and right before you, you see a bunch of goblins! Roll 2D(0,1) with advantage!" Player: "Why the hell should I roll sqrt(D(0,1))?"
I don't think that works, as making the faces of the dice start at 0 changes the distribution. For example, if your d6 were numbered 0-5 then you couldn't emulate advantage by rolling a 0-25 die and taking the square root. For that, I think you'd need to first convert to a die that starts at 1, then scale up to a n^2 sided die, take the sqrt of the result, and then once again shift the value back down to a 0-started die. So simulating a d(0,1) with advantage, you'd use a d4, take the square root, and then subtract 1. This intuitively as the d2 with advantage is basically just flipping 2 coins where you get a 1 75% of the time and a 0 when both coins are tails. And the possible results for the sqrt of a d4 when rounded up (as he mentions in the video) are 1,2,2,2, subtracting 1 from everything is then 0,1,1,1 which matches the results of flipping 2 coins.
@@rmsgrey I think there are various different notations for that. In my country, inclusive interval from 0 to 1 would be , which looks weird in typed text.
@@rmsgrey If that's what he meant, but the notation of D-something usually refers to a die with discrete results rather than a continuous range, so I assumed it was listing the discrete results.
I can just imagine. Matt running to contact three blue one brown being like 'OMG OMG OMG can you believe this' 😮😮 And three blue one brown being 'OMG OMG I can't believe It' 😮😮 This must be a rare, exciting experience😂
In case you don't have a d36 around you can get the same result with 2 d6. designate one of the dice as the special die and then roll both, with the special die subtract 1 from it's value and multiply that by 6, then add the value of the other die and you get an even distribution between 1 and 36
Oh, that's fascinating when you look at it in combination with this, because you now have two different ways to roll 2d6 and compute an answer, and although they are different they produce the same distribution.
It would have been more fun to do this with a d100 because there's the obvious way to do it (look at both digits) and the weird way of doing it (computing the squareroot)
@@meneldal It's the exact same with a d6 if you work in base 6. Or for any dN in base N. You can always emulate the dN^2 with two dN as well because of that.
By the way, another nice consequence of that max([rand₁, rand₂, rand₃ ... randₙ]) = ⁿ√rand formula means that max([rand₁, rand₂, rand₃ ... randₙ]) can be done in *O(1)* time instead of *O(n).*
@@GeppettoFedora Well say if you do it a million times, in one case you have to define 1 million variables, run the random function 1 million times and then find the max of them. In the other case you have 1 calculation to do on 2 variables (rand^(1/n))
Technically the two are NOT the same in most programming situations. This is because most rng algorithms are pseudo rng. However, with a good pseudo rng, the difference between the two would be hard to notice.
@@kettle7425 No, it wouldn’t give the same number. (As in, it will not equal the max of the two dice) However, it will give the same distribution. (Imagine the 2 dice as being some kind of “code” that simulates a 36-sided die, or even a different pair of D6 that rolled differently) Example: Normally, there are three ways to get a maximum of 2, with (1, 2), (2, 1), and (2, 2) However, with our new encoding, we would need to use (1, 2), (1, 3), and (1, 4), which would map to 2, 3, and 4 on the D36 (see OP’s formula), yielding square roots of 1.4, 1.7, and 2 (all of which round up to 2, and are the only three ways to get 2)
You THINK they're not entirely fair? What do you mean you didn't roll it 100000 times and recorded it on 36 mm film to test the accuracy and calculate the most likely roll.
Such an irregular shape can't be fair, but it would be interesting to see how they did choose those faces and how inbalanced the end result is. By the way, you can make a fair die with 36 or any other even number of faces with bipyramids or trapezohedra (like a d10) but in this case that would be very unwieldy. If you avoid almost round trapezohedra or bipyramids the only possible additions to the standard dnd die set are a d24, a d30 or a d60 (each with multiple options though).
Loved the video. Watched first on another account connected to my chromecast, and loved every bit of it after watching it again on this account because youtube kept recommending it to me!
Great video as always! I'll just add a bit more background. Anytime you take any number of independent uniform [0, 1] random variables, and put them in sorted order, the result is a *beta* distribution. The parameters of the beta are: the number of uniforms at most your uniform, and the number of uniforms at least your uniform. So if I pick the 3rd smallest of 7 uniforms, that gives a beta with parameters 3 and 5. So the maximum of 2 uniforms is a beta with parameters 2 and 1. The density of a beta is proportional to x raised to the first parameter minus one times (1 - x) raised to the second parameter minus 1 over the interval [0, 1]. So for a beta(2, 1), the density is proportional to x(1 - x). If you use the Inverse Transform Method to then draw from this density, you exactly get the procedure to take the square root of a uniform!
I feel I am the only person in the world who somehow mentally locked in the singular "die" and now my brain twitches every time a singular "dice" is used. Surely I'm not the only one
Just as Matt puts a wholly unnecessary S on the end of the word “math”, he puts a wholly unnecessary plural on a singular die. Give it time and you may get used to it… (at least, that’s what I keep telling myself, though that has yet to happen for me). At least you are here watching, unlike some people who refuse to even watch Matt because of the way he speaks.
You ain't the only one, buddy. I HATE when people say "a dice" and when they say it in conversation I immediately say "Whoa buddy, I'mma stop you there. It's 'a die,' not 'a dice.' Anyway, do go on."
I thought this video was trying to prove that root(R1) = max(R1, R2), which is essentially saying root(R1) = R2. It's only when I saw Grant's visual that I saw the P() come into play and figured out what we were doing here. 😃 Side-note - 17:20 - one for the descriptions corrections - "ChatGTP". 😜
I checked this for D6s as you had in your thumbnail... was very confused as to how taking the square root of the outcome of a d6 could possibly give you 3, 4, 5, or 6
Ruined the whole experience for me. The whole time i was like - how the hell could you possibly prove something factually untrue? Then i realized he just lied. Oh, well, thing happens. Where can i get my time back?
This is actually incredibly useful. It doesn't change the range of the output like square root does, and it automatically scales the result. It *purely* shifts the weighting which is exactly what a distribution should do. I haven't tested the performance but I suspect in many cases it is also faster than taking a square root. Certainly it will be faster (and much more parallelizable) using dice, but even on a computer it should be faster, especially when you account for scale and precision issues.
I'm at a loss to guess what shape the D36 is too. But you can make a D32 from the classic 1970's football shape. It's a icosahedron (20) with its vertices (12) filed off into pentagons. Now, there's probably an ideal "filing depth" that makes such a dice fair, but I'd be surprised if it's the one that makes regular hexagons of the triangles. The physics is probably too gnarly. A question for you to dive into. In other news, Firefox's spell checker knows the tetrahedron and the cube, but not the dodecahedron, the octahedron, or the icosahedron.
Back in my day, we rolled two D20s and recognized only the ones digit. That was pretty easy -- actually, only the ones digit was shown; there was a dot on half the faces to indicate, if necessary, that the result should be read as 10 + (face value). That is, the faces read (1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1., 2., 3., 4., 5., 6., 7., 8., 9., 0.). And you had to know that 0 meant 10, and 0. meant 20. That was before someone realized that dice didn't have to be Platonic solids to be fair, and you could extend two opposite faces of a D12 in order to make a fair D10. Good times.
4:51 cool reasoning for the fun thing :) the centroid of a right triangle is at 1/3 of its width and 1/3 of its height starting from the right angle, since the graph of that situation is a triangle, the centroid of a triangle is its median, and the triangle's right angle is on the right, so the median is 1/3 from the right of the triangle or aka the maximum value, and that is 2/3 of the max, cool :)
I love that he went through the effort to put together the hand off from him to him and back to him and immediately has a jump cut. Smooth as can be when he shares the space with himself, harsh jump cut right after. Because priorities, that's why.
Puppeh alert at 14:57 🐶❣ did I miss another one? *ETA* : I notice that you carefully _didn't_ suggest acquiring a D400 to simulate rolling a D20 with advantage 🤣
You can get a pretty good approximate simulation by rounding (not ceiling) 20 times the square root of one 200th of the result of a D200 instead... except that the chance of a "20" is about half what it should be :(
Given 100 sided dice are tough to get balanced because they're so close to a sphere the slightest imbalance makes them weighted disproportionately you may have issues with a 1,296 sided dice. Might actually be easier to make a 16 sided(3-18 inclusive) weighted such that it meets the needs.
@@scragar No, just roll 4x 6 sided dice and keep track of the order you roll them in. That should make a uniform distribution from 1 to 1296.. So if you roll 4 dice, with results a, b, c, d, then your number/result is 216*(a-1)+36*(b-1)+6*(c-1)+d ...
If you don't have a D36, just use a standard roulette - it has numbers from 1 to 36! Although it also has a 0, but if you get it - either reroll, or count it as the critical fail it's meant to be at a casino.
@@alexandertownsend5079 I mean you can convert to base six and use two dice for each digit, but that kind of defeats the purpose of the problem. That’s actually what we do with “D100” aka two D10, it just turns out that when using a die with the same value as your base, picking and digits and adding look the same, because they are. So in base six that 0, 6, 12 looks like the 0, 10, 20 on D100.
A fun corollary: There are two distinct ways of rolling 2d10 to get 1d10 with advantage. You could roll 2d10, pick the highest. Or, you could roll 2 distinguishable d10 as 1d100 and take the (ceiling of the) square root. A further fun fact: On 2d10_distinguishable, the sqrt method yields a better result 59% of the time, and a result at least as good 70% of the time. So for the DMs who wish their players to practice square roots (I imagine I am not the only math teacher running a D&D club for students)... If your typical player has exactly one typical Chessex set (or equivalent) and you're inclined to mod the rules to allow for advantage on damage or something, you could make them **want** to make the switch. Just look at their rolls. More often than not, you'll be able to say "too bad you don't want to use the other method. You'd have done more damage."
Oh, that's interesting -- so even though the overall distributions are the same, the results from the two calculations are of course correlated so you don't have to have one be better than the other 50% of the time. And even though the sqrt method produces a worse number only 30% of the time, it can often produce a much worse number (for example, a 1 and 10 produce a result of 4 by sqrt but 10 by max), whereas it doesn't really produce results that are better by that sort of difference, so a lot of small "highers" and a few large "lowers" average to being the same.
Now we have the follow-up question: Supposing we're considering it for hits (or saves, or similar attempts to meet a threshold, which is where advantage usually happens), how many cases are there where the sqrt method will hit a given threshold when the maximum of the same dice won't, and vice-versa? I think those would have to balance out, but I'm not sure.
@@BrooksMoses They would indeed have to balance out (since the two methods do in fact have identical distributions of results). For any target T, Pr(MAX>=T>SQRT)=Pr(SQRT>=T>MAX). This probability varies with the target. Let N be the number of possible rolls for which MAX>=T>SQRT. For 2D10_distinguishable, 1
@@derkylos : It does sound like that! And it sort of is saying that, because it depends on how you compare them. So, the two methods taken independently are the same. If you roll one pair of dice to get a number one way, and roll a second pair of dice to get a number the other way, you can't tell which is which. However, if you roll a pair of dice and use the same dice rolls to compute numbers both ways, you are no longer talking about the two methods independently -- the numbers you get are connected in a non-random way. And that connection can cause interesting skews in how the two compare. For a simpler example that shows the same thing: Consider two ways of rolling a single six-sided die. You could either use the number that comes up directly, or you could add 1 to the number unless it's a 6, and for a 6 use a result of 1. Either way, every number between 1 and 6 is equally likely for a roll, so if you roll two dice and use one method for each, they amount to the same thing. But if you roll only one die and look at the numbers for both methods, those two numbers are connected non-randomly, and that connection means that five times out of six, the second method's number is higher. Does that clarify a bit?
nubDotDev did a video on this several years ago to show how to select a random point within a circle. Interesting vid for any computer science people out there.
@@howno7551 from the corner of the shaded area. But it's not important and non rigourously speaking it's just zero. But I do think Matt should have mentioned it.
Yes what I thought too. He forgot -dy². I had to stop for a while as it confused me. If it's not important it sould be mentioned and explained as I don't see the equality between the two situations.
the thumbnail clearly shows sqrt(d6) vs max(d6,d6) - the video shows sqrt(d36) vs max (d6,d6) - roundup method chosen feels like cheating to make a point (you would definitely have to explain the roundup method in detail to anyone you challenged before they answered, which gives the solution away)
Because a d6 is already 'rounded up'. If you rounded normally, then you'd be able to rand a die value of 0, which a d6 does not have. If you had a d6 that was 0-5, then you would floor it.
@@borisgrozev2289No, the thumbnail is just a lie. sqrt(1d6) is not equivalent to max(1d6,1d6), as proven in this very video. But putting an obviously wrong statement in the thumbnail is a good way to get people's attention so they click on it.
ok but if you have a D36 die, you can just divide the result by 6 and treat the quotient and remainder as your two D6 dice rolls. much simpler than taking the square root
This video definitely challenged my pedantic side (haha). Every time Matt referred to one die but said dice I cringed and it was the mental equivalent of someone digging a spoon in my brain. Like an itch I could not scratch it began to drive me nuts. If it only happened once I think I would have been OK, but the repetition was what really got to me.
I like the idea of an "Advantage Die", where all faces are labeled with pre-squared-rooted transformations of underlying distinct values. So a 36-sided die with values 1-6 all over it, in right proportion to match d6 with advantage. Then you just need a 400 sided one for d20 rolls, and you're set.
"-(dy)^2" because the (dy)^2 rectangle is counted 2 times, but since it has a greater order than the other contributions (ydy+ydy) its contribution is negligible.
@@Angzt you're tight, but you're wrong; since it's negligible it isn't significant if it's inner or outer, in fact in both the scenario you have the same result: "2ydy". But visually you are right, it should be "+(dy)^2".
@@antog9770 I don't know what you're arguing for then. I already wrote in my initial comment that "I know that goes to 0". I thought that made it clear that I was aware that it ultimately doesn't change anything.
ChatGPT explanation seemed pretty good, I've done pretty much the same problem before in a probability exam, it's a good problem solving question for applying the CDF method of transforming random variables, difficult step is understanding that the CDF of the maximum is equal to the product of the CDFs of each individual variable (assuming independence), and then you just need to differentiate.
The irony is that d&d is progressively using less math in its roll total calculations (thankfully) vs. something like Pathfinder, which loves all sorts of math in figuring out what's going on
@@Jinni_SD Nothing to do with the video, but damn 5E felt like a breath of fresh air after all the crunchiness of Pathfinder. The idea that combat in 5E is tedious rings kind of hollow when you compare it to Path "I have to roll four attack rolls which all have different bonuses from five different sources which don't necessarily always apply that I have to calculate every time" finder.
@@Javalar crunch is a sliding scale. 5e did a lot to uncrunch some of the worst crunch of earlier editions but the crunch requirements of being a wargaming inspired combat focused game with highly customisable characters has never gone away. Path is absolutely maths wars taken to an extreme, but d&d in attempting to have its cake and eat it won't ever escape that either.
I'm surprised Matt and 3blue1brown are not familar with "The BEST Way to Find a Random Point in a Circle" from the first summer of maths exposition, this fact was covered there (very good video btw).
I’m a bit shocked that Grant was skeptical about this as it’s extremely straightforward to prove with basic knowledge of probability theory. The CDF for the uniform distribution on RV X is F(t) = P(X
16:31 if the makers of your dice know what they are doing, yes it it balanced. It'll be a catalan solid (specifically, the dual of the Icosidodecahedron), which is face transitive and therefore balanced as a dice.
Regarding Chat GPT's proof at 17:05, as far as I can tell it's actually correct, just not quite as rigorous as I would like to see if this was on a test asking for a proof. Namely, it failed to properly define a couple of the terms it was using (Z, z, v, and strange wording when defining V). Which isn't inconsequential, especially when it comes to lower case z and v, which must be between 0 and 1 to perform the operations done in the proof without breaking anything.
ehh it's fine, no? if I was writing a paper I might wanna define things slightly more carefully, but if a student wrote this in an exam I would give them full points
its crazy that on a whim, i looked up the dice video just 2 days ago. now im being recommened this video only 6 hours after its been posted. my white board still has my doodles on it from looking up the old video. lol
I feel clickbaited now - the thumbnail made me go 'no way it works for numbers bigger than one' and I watched the whole video to be proven wrong by some weird maths trick and it never came... 😃
Asking chat GPT to generate random numbers for you when there are a dozen very simple programming languages like R or Matlab that can do the same thing is like taking a private jet to the grocery store.
I am a computer scientist and thought that this made total sense. When we make a random number the last random number is fed into a function to get the next one. With this the function you made is just a root function it's not good for doing a random number because you can't get anything lower however this would make it equivalent to getting to random numbers and picking the highest.
Very interesting video (as always). But you still could not help but using click bait. Your thumbnail picture is not reflecting your conclusions. As you did explain, you cannot take the immediate square root of a dice. I understand of course that it was a joke, but in the world of click bait we need to navigate, it's just not funny.
Might be forgoing it to get around RUclips censorship. If there was a video that kept saying die, might get demoted. Idk if it's true but I could see it
Secure your privacy with Surfshark! Enter coupon code standupmaths for an extra 4 months free at surfshark.com/standupmaths
And let me know if this video contains your favourite ever Skylab the Dog cameo. I think it should.
Hi, You made a video about how thick a 3 sided coin would need to be in order to be equally likely to land on any of the three surfaces. Any follow-up on this?
Love the videos xx
It was the Tail of the Dice.
Skylab saw a ball being thrown and immediately perked up 😂 So cute!
Skylab is a very cute dog.
I hope Skylab got the big red D20 from 14:57 as a toy
That was fun! For all you math whizzes, here's the challenge mode puzzle. Sample three random values uniformly in [0, 1], call them x, y, and z. What distribution describes (xy)^z. Answer: It's a uniform! This is wild to me, and even though I can prove it formally (and somewhat tediously), it still feels mysterious. If any of you can think of a good way to "see" it, feel free to send it my way and I'll strongly consider making a video on it.
Also, for what it's worth, I think the ChatGPT explanation here is perfectly valid, and not really distinct from what Matt and I were describing at a fundamental level. All I wanted to offer was an easier way to "see" the cdf for the max(rand(), rand()) case.
My first thought was to try logarithms. The CDF then apparently involves an exponential and convolving that gives you another exponential. But that it gives you the same result as the CDF of a single random variable is surprising indeed. I'm curious if there is a nice way of showing this...
Good candidate for the most cursed but simple probability fact ever.
As I expected, Wikipedia does have an article on this (under the unimaginative title "Distribution of the product of two random variables") but I can't say that I gleaned any intuition from reading through the dense formulas on that page. But it *did* mention the word "convolution," so I suspect that you can go down that path and possibly get something useful out of it?
(In other words: Try to explain what the distribution of xy is, using convolutions I guess, and maybe the exponent "magically pops out" of the CDF from there? That still doesn't feel super-intuitive, though...)
1/z = ln(xy) feels important somehow?
@@ancientswordrage Indeed: search for "Distribution of (XY)^Z if (X, Y, Z) is i.i.d. uniform on [0, 1]" on Math StackExchange and look at the most voted solution (I'm not posting the link because RUclips would most likely delete the comment).
I now totally believe that, if you tell Grant a complicated symbolic proof on a train, he'll think a little and then say, "there's a nice visual proof that goes like this..." and an animation will beam directly into your mind as he's talking.
nonono, a tiny light blue pi will appear out of nowhere and create the visual animations as he's talking
@@aguyontheinternet8436and also be in deep thought
"manim" is short for "man, I'm amazed I can effortlessly understand this"
i watch a lot of 3blue1brown and already thought of the visual solution
you ask him about fermats theorem and he thinks for a second and makes a youtube short with the full proof
Love that Matt and Grant took a break from work to talk about maths problem... only to then make that maths problem into videos, retroactively making it a work project!
I mean both of their jobs are Maths. So doing a Maths problem is work. I wonder if it makes that train journey tax deductible 😂
This is why STEM hobbyists are just more productive than the rest of us. Even when they're only having fun, they make their jobs just a bit easier there in that specific way.
A Parker Holiday
It's math/work all the way down!
I love finding out about the communications between different scientists or mathematicians and all the interesting things that they come up with. E.g. Any time Ramanujan talks about 1 + 2 + 3 .... = -1/12 in his letters.
Great video! I wanted to add more information on the D36 shown at the end. Impact! Miniatures is the creator of that D36.
I was a statistican for my previous job and really wanted to make a die that acted as both a D36 and 2D6. The D36 die also has dots above and below the numbers rolled. These dots show you the results for the first D6 (top) and the 2nd D6 (bottom) so that you can see all the possible results with the actual dice rolls. We have tested the die to make sure that it rolls fairly for distribution of the rolls. The die was designed with the help of a huge server array that solves problems for very difficult engineering math issues ... we had that system design the most fair 36 sided shape. Just wanted to add some more information as from the video I did not think you realized the purpose of the dots on the D36.
So with that die, you would not need to take the square root (that works!) but you could just look at what you rolled and pick the highest number of dots shown on the roll.
The Dice Labs buys them from Impact! In the UK, TheDiceShopOnline sells them.
Thanks for showing our die on the video!
This sounds amazing!
Hi Tom. It's Fen, and I still have my Impact! Dice and I love them!
@@styfenawesome
Would a thick pencil with 36 sides be an alternative? Sharpened on both ends I mean?
14:57 - Best Moment of the Video Award goes to the dog carefully watching the dice toss from the background of the set.
"It's not rigorous, but it's fine." Should put that quote on the Parker Square mugs.
Proof by, "looks about right to me" 😆
This already have a name. It is called a "Parker Proof".
Reminds me a bit of a Neuro line I saw the other day.
*Vedal:* How much should I lie on my tax return?
*Neuro:* You just need to make your income look like less than it really is. Generally speaking, you should be safe as long as you earn less than $70k for the year.
*Vedal:* What if you don't?
*Neuro:* Then just lie more until you do.
@@genericgamer2003 My favorite kind of proof! Unfortunately my university professor didn't share my enthusiasm 😆
"It's fine...." Has Matt been hanging out with Angela Collier?
So if you're playing dnd, instead of rolling for advantage, roll a 400 sided dice and take the square root!
Edit:
There's some confusion in the comments about whether this will work with a d20 and d400 so I made a spreadsheet.
For me the most intuitive way to think about this is that when you roll a d400 and you take the square root and then take the ceiling of the result to get your effective d20-with-advantage result...
there are 39 numbers you can roll on the d400 that will lead to getting a natural 20. If you roll from 362 to 400 inclusive, you've rolled a 20
However on the other extreme, only rolling exactly 1 on the d400 will give you a natural 1.
That distribution of probability is the same as if you were to roll two d20s and take the highest as the result.
There is no scaling needed, you simply take d400 result and take the square root and then ceiling that. Matt mentions why there's no need to scale at 15:21
Finally, with a d400 my dice collection will SURELY feel complete
In many games you roll against each other. So I wonder, if you would multiply your result by 20, while your oponent takes the square of his dice, would the outcome be the same as you rolling with advantage?
@@simonschonfeld1752 no, you don't have to divide by 20. taking the square root already makes sure that the result is between 1 and 20. rewatch the end of this video if you're confused
The die could even have the rounded roots printed on it for the "casuals"
but wouldn't you need the MINIMUM too? So you'd need a √20 sided dice and then square the result to get the number, but there's no 4.47 sided dice 😆
I love how at first glance the equivalence is shocking, but looking back it’s pretty obvious. Best kind of maths problem!
Once I saw the table of 2D6 it seemed too simple. Of course 6 has the most possibilities because it can't be 'beat' by the other dice. So it gets 11/36, 5 gets 9/36. Taking the square root of D36 rounded up, 26-36 all give 6, and that's 11 possibilities.
Feels like the only shock was changing the problem from the thumbnail.
11:38 was such a genuine and honest “oh no!” 😂 followed by the smash cut makes me feel like one of those die clocked Matt in the eye
LOVE IT xD
Surprise dog at 15 minutes watching you toss the dice was the highlight.
Dog is actually telegraphed at 12:20
Already walked across the set at 12:21😁
16:13 Since the rounded-up square root is obviously fixed for each value of the d36, you could just print your d36 with the numbers 1-6 distributed as in your table so you don't have to root it to get the value. You could actually make a single roll-with-advantage dice (with perhaps questionable fairness)
Definitely questionable fairness. The only way to make a fair d36 is as a(n ugly) bi-18-pyramid.
And running the numbers, I think that’s the only way to do any “dSquared” except the degenerate case of d2 (which would be a d4 labeled 1, 2, 2, 2) since 2 is the only factor that appears more than once is the factorization of 120 (the disdyaxistriacontahedron, from which all the interesting fair dice descend.)
have a non-square D6 where the probability of it landing on any particular side is proportional to the value of the side.
@@dalesheldon-hess552 The interesting question is not that it's not fair unless totally symmetric.
The truly hard question is to measure the probabilities of unfair models (36 or 100 or anything).
Which is my question to @gdclemo : how do you build your non-equiprobable die?
By the description, I think the dice is fair but contains significant regions between the flattened sides. As long as these are tapered a bit there should not be much chance of the die landing between numbers, and if it does you can just reroll.
@@gdclemoas was infamously demonstrated during the d3 coin series of videos, your can't really make a "fair" asymmetric die, because the probabilities will vary depending on the physical properties of the materials your die and table are made out of.
"It's not rigorous, but it's fine" has been the motto of all physicists and engineers for centuries. ;)
Parkerian mathematics, where close enough is close enough.
All hail the Parker square
12:23 doggo spotted
Skylab is so cute ❤
again at 14:57
I started scrolling down the comments at ~12:15, seen this comment and scrolled back up in time to see!
@@slawless9665 I enjoyed the dog going "oooh throwing things??"
Saw dog, scrolled comments to look for this comment
A bit misleading from the thumbnail (which was why I ended up watching - clickbait?) is that we're talking between 0 and 1 vs 1 and n. 14:00 explaining that 0 and 1 square root gets larger. And now I'm off to look more closely at square roots between 0 and 1 and 1 and n... Great video btw! Thanks.
If you were clickbaited by a man with the question of which function had the highest average value, I think it's safe to say it reached the target audience.
It's not like slapping a pair of big honking [redacted] on a minecraft video and making gooners watch your mildly provocative block game let's play. There isn't a switch, you get the answer to the question the thumbnail presents.
@@josh___somethingI suppose the click bait is that based on the thumbnail and title it sounds like if you roll a d6 and take the square root of the results you would get the same result as rolling with advantage which is impossible. In reality the square root of a d36 is equal to rolling a d6 with advantage which sounds much more reasonable.
From now on I will put ' "it's not rigorous, but it's fine" - Matt Parker ' in all of my math papers.
I'm an engineer - that's the motto of my entire field.
I should add this to my homeworks (math grad PhD)
It's "Parker rigorous" one could say.
@@wmkm7144 Im a physicist, we are brothers in rigor you and I
pi = 4. It's not rigorous, but it's fine by me.
X is a random variable uniformly distirbuted from 0 to 1
P(X < a) = a for a in [0,1]
P(sqrt(X)
did this in my head exactly what i was gonna comment
nice, this is pretty much the same proof that was given in the video at the very end
Me too. However, you need to point out that X₁ and X₂ are independent.
Yeah, pretty clickbait AF video. This ~proof is patently obvious to anyone who has taken a stats class when you don't lie about the problem.
@12:23 a visit from a sneaky friend?
14:58 I think you are right 😂
cute pupper
A second dog has hit the video
Someone heard the dice and came running!
That's actually Matt's tail..
Taking the result from a previous video and being halfway there already, you must feel like a real mathematician!
"We'll start with _one dice_ and build up shells of dice around that to represent a 3D plot where _each axes_ is"
Parker Grammar
What is the singular of axes?
@@barakeel axis.
Here, allow me to kick you while you're down. One goose, two geese, three gice. One moose, two meese, three mice. One mouse, two mouses.
Hey, what's that red stuff coming out of your ears?
@@johnladuke6475i don't get it :(
I've now seen Matt Parker (11:39) and Tom Scott both get pelted by a shower of dice. What are the odds of that?
A hundo percent
If I had a nickel for every time I've seen a RUclipsr get showered in dice, I'd have two nickels.
@@hendawg7947 Which isn't a lot, but it's still weird that it's happened twice.
Very odd
hope those were grimes dice
I hear stuff like "He knows the square root of f--- all about probability." But you've just *increased* his level of knowledge there!
Well, f-all should be zero shouldn't it
@@StefanReich then taking a square instead of a square root would make even more sense since it makes numbers
I would say f---all would be more like an infinitesimal. it is quite literally next to nothing (aka zero). I'd imagine taking the square root would also do next to nothing to change that. 😄
I feel like that should be equivalent to taking the square root of 0, which is still 0.
2:36 Parker’s Razor
matt wouldn't want a repeat of the parker square when someone makes a mistake with this
_"Rigorous is the enemy of it's fine."_ - Matt Parker
Perfect
I appreciate the act of putting on a dark jacket during an advert.....this lets me ( *whispers* fast-forward) thru it easier!
Thanks!
Always nice to see how often you are able to use these concepts in your every day. As a programmer I often get faced with similar situations, sometimes even involving randomness to this scale, but it never fails to amaze me how incredibly beautiful the math behind it really is as natural as it may seem at first
DM: "You're in a dark cave, and right before you, you see a bunch of goblins! Roll 2D(0,1) with advantage!"
Player: "Why the hell should I roll sqrt(D(0,1))?"
I don't think that works, as making the faces of the dice start at 0 changes the distribution. For example, if your d6 were numbered 0-5 then you couldn't emulate advantage by rolling a 0-25 die and taking the square root. For that, I think you'd need to first convert to a die that starts at 1, then scale up to a n^2 sided die, take the sqrt of the result, and then once again shift the value back down to a 0-started die.
So simulating a d(0,1) with advantage, you'd use a d4, take the square root, and then subtract 1. This intuitively as the d2 with advantage is basically just flipping 2 coins where you get a 1 75% of the time and a 0 when both coins are tails. And the possible results for the sqrt of a d4 when rounded up (as he mentions in the video) are 1,2,2,2, subtracting 1 from everything is then 0,1,1,1 which matches the results of flipping 2 coins.
no, it's a real number die
@@phiefer3 In this case, the (0,1) is the (open?) interval from 0 to 1, not {0,1}, the set of 0 and 1.
@@rmsgrey I think there are various different notations for that. In my country, inclusive interval from 0 to 1 would be , which looks weird in typed text.
@@rmsgrey If that's what he meant, but the notation of D-something usually refers to a die with discrete results rather than a continuous range, so I assumed it was listing the discrete results.
I can just imagine. Matt running to contact three blue one brown being like
'OMG OMG OMG can you believe this' 😮😮
And three blue one brown being
'OMG OMG I can't believe It' 😮😮
This must be a rare, exciting experience😂
and then grant promptly getting the itch to animate
This is a prime example of how International Mathematical Olympiad unites people
Why did i read that in both of their voices?
"Well you imagine the 4D version of this and that's equivalent"
got it
yes, the very basic human skill of imagining in 4D. anything above 6D i have to stop multitasking and focus
What? You can't do 8-dimensional visualizations on the fly??? Looks like someone skipped dimension class...
@@alexandermcclure6185 "you got an F in your dimension exchange class?!"
Flashback to my engineering apprenticeship when I was calculating the stiffness of different rail profiles and dealing with m^4 as a unit of measure 🤯
Turns out the 4 dimensional math is super important to physicists for understanding gravity.... probably
"It's not rigorous, but it's fine." Perfectly describes the vast majority of Engineering.
great stuff - educational and entertaining as always! also, so nice to see shop manager Skylab helping out - adorable watching the dice in the air
In case you don't have a d36 around you can get the same result with 2 d6. designate one of the dice as the special die and then roll both, with the special die subtract 1 from it's value and multiply that by 6, then add the value of the other die and you get an even distribution between 1 and 36
That’s just a two hit number, or. 10_6 x 10_6 = 100_6
Oh, that's fascinating when you look at it in combination with this, because you now have two different ways to roll 2d6 and compute an answer, and although they are different they produce the same distribution.
It would have been more fun to do this with a d100 because there's the obvious way to do it (look at both digits) and the weird way of doing it (computing the squareroot)
@@meneldal It's the exact same with a d6 if you work in base 6. Or for any dN in base N. You can always emulate the dN^2 with two dN as well because of that.
@@Llortnerof hehehe.... What's dN?
By the way, another nice consequence of that max([rand₁, rand₂, rand₃ ... randₙ]) = ⁿ√rand formula means that max([rand₁, rand₂, rand₃ ... randₙ]) can be done in *O(1)* time instead of *O(n).*
That's a really clever use!
Not sure I'd bet on ⁿ√ being faster than max([rand₁, ... randₙ])
@@GeppettoFedora Well say if you do it a million times, in one case you have to define 1 million variables, run the random function 1 million times and then find the max of them. In the other case you have 1 calculation to do on 2 variables (rand^(1/n))
Technically the two are NOT the same in most programming situations. This is because most rng algorithms are pseudo rng. However, with a good pseudo rng, the difference between the two would be hard to notice.
What?! That’s amazing!
Btw instead of rolling a d36 you can roll 2 d6 and count the roll as (roll1-1)*6+roll2 (this is the same logic behind rolling 2d10 making a d100)
So you could use two d6 to calculate the output of rolling of two d6!
Wait so would it give the same number?
If so that would be a great party trick
I tried it, it doesn't seem to give the same number
@@kettle7425 No, it wouldn’t give the same number. (As in, it will not equal the max of the two dice)
However, it will give the same distribution. (Imagine the 2 dice as being some kind of “code” that simulates a 36-sided die, or even a different pair of D6 that rolled differently)
Example: Normally, there are three ways to get a maximum of 2, with (1, 2), (2, 1), and (2, 2)
However, with our new encoding, we would need to use (1, 2), (1, 3), and (1, 4), which would map to 2, 3, and 4 on the D36 (see OP’s formula), yielding square roots of 1.4, 1.7, and 2 (all of which round up to 2, and are the only three ways to get 2)
You THINK they're not entirely fair? What do you mean you didn't roll it 100000 times and recorded it on 36 mm film to test the accuracy and calculate the most likely roll.
Such an irregular shape can't be fair, but it would be interesting to see how they did choose those faces and how inbalanced the end result is. By the way, you can make a fair die with 36 or any other even number of faces with bipyramids or trapezohedra (like a d10) but in this case that would be very unwieldy. If you avoid almost round trapezohedra or bipyramids the only possible additions to the standard dnd die set are a d24, a d30 or a d60 (each with multiple options though).
Not 100% no. I designed it to be as close to fair as a 36 sided die can be.
Loved the video. Watched first on another account connected to my chromecast, and loved every bit of it after watching it again on this account because youtube kept recommending it to me!
Great video as always! I'll just add a bit more background. Anytime you take any number of independent uniform [0, 1] random variables, and put them in sorted order, the result is a *beta* distribution. The parameters of the beta are: the number of uniforms at most your uniform, and the number of uniforms at least your uniform. So if I pick the 3rd smallest of 7 uniforms, that gives a beta with parameters 3 and 5. So the maximum of 2 uniforms is a beta with parameters 2 and 1.
The density of a beta is proportional to x raised to the first parameter minus one times (1 - x) raised to the second parameter minus 1 over the interval [0, 1]. So for a beta(2, 1), the density is proportional to x(1 - x). If you use the Inverse Transform Method to then draw from this density, you exactly get the procedure to take the square root of a uniform!
I feel I am the only person in the world who somehow mentally locked in the singular "die" and now my brain twitches every time a singular "dice" is used. Surely I'm not the only one
just look in this comment section and you'll see plenty of other people complaining about this same meaningless "mistake"
Just as Matt puts a wholly unnecessary S on the end of the word “math”, he puts a wholly unnecessary plural on a singular die. Give it time and you may get used to it… (at least, that’s what I keep telling myself, though that has yet to happen for me). At least you are here watching, unlike some people who refuse to even watch Matt because of the way he speaks.
Irregular singulars go hard 🔥
@@jpe1 putting an s at the end of math is just British English mate, it's 100% correct.
You ain't the only one, buddy. I HATE when people say "a dice" and when they say it in conversation I immediately say "Whoa buddy, I'mma stop you there. It's 'a die,' not 'a dice.' Anyway, do go on."
I thought this video was trying to prove that root(R1) = max(R1, R2), which is essentially saying root(R1) = R2. It's only when I saw Grant's visual that I saw the P() come into play and figured out what we were doing here. 😃
Side-note - 17:20 - one for the descriptions corrections - "ChatGTP". 😜
Damn, I'm not the first to notice "ChatGTP"
I checked this for D6s as you had in your thumbnail... was very confused as to how taking the square root of the outcome of a d6 could possibly give you 3, 4, 5, or 6
Yes, the thumbnail is very wrong, it's
sqrt(roll(square(DieSize)))
equals
max(roll(DieSize), roll(DieSize))
or sqrt(1d36) versus max(1d6,1d6)
Ruined the whole experience for me.
The whole time i was like - how the hell could you possibly prove something factually untrue?
Then i realized he just lied. Oh, well, thing happens. Where can i get my time back?
@@nikolaipasko yeah, me too, burying the lede fifteen minutes in hurts. you can unsub
This is actually incredibly useful. It doesn't change the range of the output like square root does, and it automatically scales the result. It *purely* shifts the weighting which is exactly what a distribution should do.
I haven't tested the performance but I suspect in many cases it is also faster than taking a square root. Certainly it will be faster (and much more parallelizable) using dice, but even on a computer it should be faster, especially when you account for scale and precision issues.
I'm at a loss to guess what shape the D36 is too. But you can make a D32 from the classic 1970's football shape. It's a icosahedron (20) with its vertices (12) filed off into pentagons. Now, there's probably an ideal "filing depth" that makes such a dice fair, but I'd be surprised if it's the one that makes regular hexagons of the triangles. The physics is probably too gnarly. A question for you to dive into.
In other news, Firefox's spell checker knows the tetrahedron and the cube, but not the dodecahedron, the octahedron, or the icosahedron.
Henceforth, I'll be rolling with advantage using d4 for hundrends, d% for tens and d10 for units. The DM will hate me.
Problem is you round down by default in D&D...
"It's not rigorous, but it's fine." I'm going to use that the next time I explain Calculus without using limits.
I'm going to be using that line at work from now on.
I would but my teacher might not see the funny side
Instead of a D100 dice, in D&D two D10s are used for each digit to make a "virtual" D100.
People can still buy D100s, golf-ball sized plastic chunks conveniently shaped for rolling off the table and losing under the furniture. :-)
@@WyvernYT they are not fair dice
Back in my day, we rolled two D20s and recognized only the ones digit. That was pretty easy -- actually, only the ones digit was shown; there was a dot on half the faces to indicate, if necessary, that the result should be read as 10 + (face value). That is, the faces read (1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1., 2., 3., 4., 5., 6., 7., 8., 9., 0.). And you had to know that 0 meant 10, and 0. meant 20.
That was before someone realized that dice didn't have to be Platonic solids to be fair, and you could extend two opposite faces of a D12 in order to make a fair D10. Good times.
@@SkyOverEvrythng yes, barrel dice makes any sided dice possible, even odd ones. For D&D every dice can be replaced with a D60 die, except the D8.
4:51 cool reasoning for the fun thing :)
the centroid of a right triangle is at 1/3 of its width and 1/3 of its height starting from the right angle, since the graph of that situation is a triangle, the centroid of a triangle is its median, and the triangle's right angle is on the right, so the median is 1/3 from the right of the triangle or aka the maximum value, and that is 2/3 of the max, cool :)
This is really dascinating! One small thing, I hope i don't sound too pedantic, but the singular of "dice" is "die."
11:10 - Bec Hill's task of guess the dice in the jar becomes MUCH simpler.
Matt had to wait until she'd guessed correctly before he could make this video.
0:22 Do British people really say "prem-ize" or are you just trying to see what you can get Americans to say?
even after watching the video, brain is like: nah, its not the same
And you're right.
Thank you for getting to the ROOT of the problem!!! 😂😂😂
I love that he went through the effort to put together the hand off from him to him and back to him and immediately has a jump cut. Smooth as can be when he shares the space with himself, harsh jump cut right after. Because priorities, that's why.
Puppeh alert at 14:57 🐶❣ did I miss another one?
*ETA* : I notice that you carefully _didn't_ suggest acquiring a D400 to simulate rolling a D20 with advantage 🤣
12:23
Fetch mode activated! 🤾🏼♂️🐕🦺
You can get a pretty good approximate simulation by rounding (not ceiling) 20 times the square root of one 200th of the result of a D200 instead... except that the chance of a "20" is about half what it should be :(
@@BeefinOut oh well spotted, that was just a tail-smidge❣
Maybe a d4-1 for the hundreds place and then percentile for the tens and ones?
Now I want to make a single dice to roll for 4d6 drop lowest, for character creation
Given 100 sided dice are tough to get balanced because they're so close to a sphere the slightest imbalance makes them weighted disproportionately you may have issues with a 1,296 sided dice.
Might actually be easier to make a 16 sided(3-18 inclusive) weighted such that it meets the needs.
Whoa buddy, I'mma stop you there. It's 'a die,' not 'a dice.' Anyway, do go on.
Update: d334^(1/6)+2, gives 38.26% diff per value, 1.692% for the total (12.0381 vs the correct value this time of 12.2453)
@@scragar1296 doesn't work (perfectly or best), drop lowest changes the cdf shape ;)
@@scragar No, just roll 4x 6 sided dice and keep track of the order you roll them in. That should make a uniform distribution from 1 to 1296.. So if you roll 4 dice, with results a, b, c, d, then your number/result is 216*(a-1)+36*(b-1)+6*(c-1)+d ...
Yes, I can 100% imagine the 4D version of your block of dice. 🤣
3 blue 1 brown:
Stand-up maths: "That's a square."
I came in expecting to see you doing this with actual dice. This video was much more interesting!
If you don't have a D36, just use a standard roulette - it has numbers from 1 to 36!
Although it also has a 0, but if you get it - either reroll, or count it as the critical fail it's meant to be at a casino.
Or get 2 d6s and relabel one of them with the numbers 0, 6, 12, 18, 24, and 30 on it.
@@alexandertownsend5079 I mean you can convert to base six and use two dice for each digit, but that kind of defeats the purpose of the problem. That’s actually what we do with “D100” aka two D10, it just turns out that when using a die with the same value as your base, picking and digits and adding look the same, because they are. So in base six that 0, 6, 12 looks like the 0, 10, 20 on D100.
36! is pretty big for a roulette, shouldn't it be 36 ?
/j
11:09 I'm not sure anything makes Matt Parker happier than a good generalization, but hopefully his wife is a close second
A fun corollary: There are two distinct ways of rolling 2d10 to get 1d10 with advantage. You could roll 2d10, pick the highest. Or, you could roll 2 distinguishable d10 as 1d100 and take the (ceiling of the) square root.
A further fun fact: On 2d10_distinguishable, the sqrt method yields a better result 59% of the time, and a result at least as good 70% of the time. So for the DMs who wish their players to practice square roots (I imagine I am not the only math teacher running a D&D club for students)... If your typical player has exactly one typical Chessex set (or equivalent) and you're inclined to mod the rules to allow for advantage on damage or something, you could make them **want** to make the switch. Just look at their rolls. More often than not, you'll be able to say "too bad you don't want to use the other method. You'd have done more damage."
Oh, that's interesting -- so even though the overall distributions are the same, the results from the two calculations are of course correlated so you don't have to have one be better than the other 50% of the time. And even though the sqrt method produces a worse number only 30% of the time, it can often produce a much worse number (for example, a 1 and 10 produce a result of 4 by sqrt but 10 by max), whereas it doesn't really produce results that are better by that sort of difference, so a lot of small "highers" and a few large "lowers" average to being the same.
Now we have the follow-up question: Supposing we're considering it for hits (or saves, or similar attempts to meet a threshold, which is where advantage usually happens), how many cases are there where the sqrt method will hit a given threshold when the maximum of the same dice won't, and vice-versa? I think those would have to balance out, but I'm not sure.
@@BrooksMoses They would indeed have to balance out (since the two methods do in fact have identical distributions of results). For any target T, Pr(MAX>=T>SQRT)=Pr(SQRT>=T>MAX). This probability varies with the target. Let N be the number of possible rolls for which MAX>=T>SQRT. For 2D10_distinguishable, 1
That sounds like you're saying the two methods are the same but not the same at the same time.
@@derkylos : It does sound like that! And it sort of is saying that, because it depends on how you compare them.
So, the two methods taken independently are the same. If you roll one pair of dice to get a number one way, and roll a second pair of dice to get a number the other way, you can't tell which is which.
However, if you roll a pair of dice and use the same dice rolls to compute numbers both ways, you are no longer talking about the two methods independently -- the numbers you get are connected in a non-random way. And that connection can cause interesting skews in how the two compare.
For a simpler example that shows the same thing: Consider two ways of rolling a single six-sided die. You could either use the number that comes up directly, or you could add 1 to the number unless it's a 6, and for a 6 use a result of 1. Either way, every number between 1 and 6 is equally likely for a roll, so if you roll two dice and use one method for each, they amount to the same thing. But if you roll only one die and look at the numbers for both methods, those two numbers are connected non-randomly, and that connection means that five times out of six, the second method's number is higher.
Does that clarify a bit?
Having read Knuth's The Art Of Computer Programming several decades ago, there was absolutely no surprise in this
nubDotDev did a video on this several years ago to show how to select a random point within a circle. Interesting vid for any computer science people out there.
8:48 but you're missing a (dy)² segment there
?? Where
@@howno7551 it's the corner piece, the 2ydy area describes only the side pieces
@@howno7551 from the corner of the shaded area. But it's not important and non rigourously speaking it's just zero. But I do think Matt should have mentioned it.
Yes what I thought too. He forgot -dy². I had to stop for a while as it confused me.
If it's not important it sould be mentioned and explained as I don't see the equality between the two situations.
@@esuelle it's like Minecraft house you don't put the corner block 🤷
the thumbnail clearly shows sqrt(d6) vs max(d6,d6) - the video shows sqrt(d36) vs max (d6,d6) - roundup method chosen feels like cheating to make a point (you would definitely have to explain the roundup method in detail to anyone you challenged before they answered, which gives the solution away)
The thumbnail is not rigorous, but it's fine
yep. disliked for that bullshit clickbait
@@keagenmccartha7412same
Because a d6 is already 'rounded up'. If you rounded normally, then you'd be able to rand a die value of 0, which a d6 does not have. If you had a d6 that was 0-5, then you would floor it.
@@borisgrozev2289No, the thumbnail is just a lie. sqrt(1d6) is not equivalent to max(1d6,1d6), as proven in this very video. But putting an obviously wrong statement in the thumbnail is a good way to get people's attention so they click on it.
ok but if you have a D36 die, you can just divide the result by 6 and treat the quotient and remainder as your two D6 dice rolls. much simpler than taking the square root
*edit: you actually need to subtract your result by 1, divide by 6, then the quotient + 1 and remainder + 1 are your dice rolls
@@_wetmath_ wait--doesn't that just draw a new equivalence?
P[max[((x-1)/6)+1, ((x-1)%6)+1] == P[ceiling(sqrt(x))]
@@JooJingleTHISISLEGIT Well that's pretty much what the video is about, but taking the ceilling is another way to account for the "resolution"
This video definitely challenged my pedantic side (haha). Every time Matt referred to one die but said dice I cringed and it was the mental equivalent of someone digging a spoon in my brain. Like an itch I could not scratch it began to drive me nuts. If it only happened once I think I would have been OK, but the repetition was what really got to me.
That dnd video was my entry point to your channel. I’ve watched every video since.
5:30 "Business man", who's definitely not a cop.
Business Matt*
Why'd you say he's not a cop?
“The generation of random numbers is too important to leave to chance”
I- uhhh- what???
If I roll a four, I like the way you think
Otherwise, I hate it
Gosh I love this channel.
Same. Same.
I am ashamed to say that I audibly chuckled at the raining dice bit. Congratulations Matt, my humor continues depreciating
I like the idea of an "Advantage Die", where all faces are labeled with pre-squared-rooted transformations of underlying distinct values. So a 36-sided die with values 1-6 all over it, in right proportion to match d6 with advantage.
Then you just need a 400 sided one for d20 rolls, and you're set.
I like that today is International Collab Day. First we had Steve Mould + Vsauce, then we had Matt Parker + 3B1B
you're a liar (i'm only at 1:00)
8:20 - isn't there a "+(dy)^2" missing? I know that goes to 0, but I thought it at least deserves a mention.
"-(dy)^2" because the (dy)^2 rectangle is counted 2 times, but since it has a greater order than the other contributions (ydy+ydy) its contribution is negligible.
@@antog9770 No, y is only the inner distance. So the dy square isn't counted at all. Hence plus.
@@Angzt you're tight, but you're wrong; since it's negligible it isn't significant if it's inner or outer, in fact in both the scenario you have the same result: "2ydy". But visually you are right, it should be "+(dy)^2".
@@antog9770 I don't know what you're arguing for then. I already wrote in my initial comment that "I know that goes to 0". I thought that made it clear that I was aware that it ultimately doesn't change anything.
@@Angzt also 2ydy goes to 0 but (dy)^2 goes faster so it's contribution in the definition of dx is negligible, what isn't clear about that?
17:19 "Chat GTP" Its actually Chat GPT.
Still, overall fun and interesting video. As always, great work Matt!
ChatGPT explanation seemed pretty good, I've done pretty much the same problem before in a probability exam, it's a good problem solving question for applying the CDF method of transforming random variables, difficult step is understanding that the CDF of the maximum is equal to the product of the CDFs of each individual variable (assuming independence), and then you just need to differentiate.
D&D players be like “Nat square root of 400!”
The irony is that d&d is progressively using less math in its roll total calculations (thankfully) vs. something like Pathfinder, which loves all sorts of math in figuring out what's going on
@@Jinni_SD Nothing to do with the video, but damn 5E felt like a breath of fresh air after all the crunchiness of Pathfinder. The idea that combat in 5E is tedious rings kind of hollow when you compare it to Path "I have to roll four attack rolls which all have different bonuses from five different sources which don't necessarily always apply that I have to calculate every time" finder.
I love that on this channel I can't be sure if the roller is happy they got a 400, or if they got 400! 😆
@@Javalar crunch is a sliding scale. 5e did a lot to uncrunch some of the worst crunch of earlier editions but the crunch requirements of being a wargaming inspired combat focused game with highly customisable characters has never gone away.
Path is absolutely maths wars taken to an extreme, but d&d in attempting to have its cake and eat it won't ever escape that either.
Every time you said "Dylan asked ChatGPT" I died a little inside
Me too 😢😢😢😢
joke's on you, the proof shown at the end by ChatGPT seems pretty good
@@panda4247 I don't care. ChatGPT can suck it
why?
@@Mmmm1ch43l because I have no respect for the proprietary, hungry plagiarism machine
11:39 switched the game from AD&D to Shadowrun
Won't drop a phone. A barrage of dice is acceptable.
this is a masterclass in modern mathematics teaching, bravo
I'm surprised Matt and 3blue1brown are not familar with "The BEST Way to Find a Random Point in a Circle" from the first summer of maths exposition, this fact was covered there (very good video btw).
1:55 that’s me!
It's you!
I’m a bit shocked that Grant was skeptical about this as it’s extremely straightforward to prove with basic knowledge of probability theory. The CDF for the uniform distribution on RV X is F(t) = P(X
It's the same distribution, 'almost surely' does not apply to the whole distribution.
i mean he did prove it. you can be like "huh, that doesnt seem right" and then be like "oh shoot. it do be that way"
0:59 Using the Batman music for a Spiderman meme? Not happy. They're not even from the same comic book universe!
Now I want the "It's not rigorous, but it's fine" with the Stand-Up Maths logo on a T-shirt.
Its interesting to see my D36 design being posted on your video
16:31 if the makers of your dice know what they are doing, yes it it balanced. It'll be a catalan solid (specifically, the dual of the Icosidodecahedron), which is face transitive and therefore balanced as a dice.
The icosidodecahedron has 30 vertices, not 36 though.
@@WJS774 Ah! You are right! My bad.
They do know what they're doing, and I don't
@@insceldaron The rhombic triacontahedron is what's used for a d30, so you got that part right.
Regarding Chat GPT's proof at 17:05, as far as I can tell it's actually correct, just not quite as rigorous as I would like to see if this was on a test asking for a proof.
Namely, it failed to properly define a couple of the terms it was using (Z, z, v, and strange wording when defining V). Which isn't inconsequential, especially when it comes to lower case z and v, which must be between 0 and 1 to perform the operations done in the proof without breaking anything.
ehh it's fine, no?
if I was writing a paper I might wanna define things slightly more carefully, but if a student wrote this in an exam I would give them full points
"a dice"
The age-old battle between mathematics nerds and English nerds rages on.
never say die!
@@davidlevy706 i'm both
@@David-jl7cz Has this enabled your full acceptance in two cliques simultaneously, or are you seen as “that guy” in both?
@@davidlevy706 i identify as a mathphile but when i teach stats i always say die
I was certainly shocked to bump into Matt and Grant on King's Parade in Cambridge in mid July, while visiting the UK myself.
its crazy that on a whim, i looked up the dice video just 2 days ago. now im being recommened this video only 6 hours after its been posted. my white board still has my doodles on it from looking up the old video. lol
I feel clickbaited now - the thumbnail made me go 'no way it works for numbers bigger than one' and I watched the whole video to be proven wrong by some weird maths trick and it never came... 😃
Same here, very disappointed in this channel...
Asking chat GPT to generate random numbers for you when there are a dozen very simple programming languages like R or Matlab that can do the same thing is like taking a private jet to the grocery store.
Are these programs in the room with us now?
@@martl8615 a
I am a computer scientist and thought that this made total sense. When we make a random number the last random number is fed into a function to get the next one. With this the function you made is just a root function it's not good for doing a random number because you can't get anything lower however this would make it equivalent to getting to random numbers and picking the highest.
that no-look d20 catch at 0:04 was smoooooth
"It's not rigorous, but it's fine" - Matt Parker is now going on my quote wall in my office, well done, you've made it! s
The thumbnail is clickbait. Obviously the squareroot of a d6 has a smaller mean than the maximum of two d6s. You're welcome.
Very interesting video (as always). But you still could not help but using click bait. Your thumbnail picture is not reflecting your conclusions. As you did explain, you cannot take the immediate square root of a dice. I understand of course that it was a joke, but in the world of click bait we need to navigate, it's just not funny.
The singular of “dice” is “die”, damnit. It’s “a die”, or “two dice”, never “a dice”.
The plural of dice is "OH NO!"
Might be forgoing it to get around RUclips censorship. If there was a video that kept saying die, might get demoted. Idk if it's true but I could see it
Literally who cares even the smallest amount
As soon as you said it, I realized this comes up all the time in microeconomics auction theory!