The unexpected probability result confusing everyone
👁 1 مشاهدة
النص الكامل للفيديو
when most people want some more Randomness in their life they will turn to something like dice for example D20 and that's fine if you want whole number between one and but like more nuanced random numbers so use the random function on the calculator on my phone which you're not going to drop you're going to lower it in we're not setting up some kind of thank you comedic premise here so if push that random button on my calculator you'll see I'm getting random numbers importantly between and one and that's like Randomness classic reels from 0 to one and once we've got one of these random numbers we can do something with it so for example you could take random number and you could calculate its square root or you could take two random numbers and calculate which one's bigger and it turns out those two operations are mathematically equivalent it's true they're the same thing the first time heard this fact was like no that's not true but it is and then told the fact to Grant Sanderson from three blue one brown he said no and then he realiz like no wait that is true so was like my goodness this is such an obscure but an incredible fact and it's true if you were in room doing one of these two operations and you didn't tell me which but you gave me the results could not distinguish one of them from the other so we're going to have closer look at this and we're going to prove that it's definitely true also there'll be more dice was sent this acted by someone named Dylan from Seattle viewer of my videos they emailed to say they were asking chat GPT to plot variety of random based functions so for completeness we're going to start with just plotting random number between and one it's completely uniform every real number between zero and one is equally likely we do have to deal with the infinite elephant in the room though which is that there are uncountably infinitely many real numbers between 0 and 1 so technically they each have probability of zero of being pecked so they're all not going to be pecked but that's only because real numbers have infinitely many digits decimal places so what we're actually going to do is split the number line up into tiny tiny bins which is why on the phone it's given me real numbers but only to 15 decimal places so it's 10 to the 15 little buckets that we're going into so each of them does have very small but nonzero probability so when now when say real number or whatever that's what mean we're using little buckets it's fine it's not rigorous but it's fine we can now take all those random numbers between zero and one and Dylan asked chat GPT to show for example the square if you squared them all that's what you end up with that's the distribution where the height show you the probability of getting that value what if we did two random numbers multiplied together subtly different that's what you get you can take don't know the minimum of two random numbers you can take and here it comes the maximum of two random numbers and then you can take the square root of one random number and Dylan realized those last two plots were identical they emailed this to me was like no so plotted them myself and yes and then realized that maximum plot was bit familiar made video year or two go about if you have two D6 Dice and you and you roll them both then choosing the highest which if you're playing Dungeons and Dragons is rolling dice with Advantage analyzed what the average value is if you do that for dice of different sizes including of course the D20 then had look at what the distributions appear like and you may find it very familiar I'll link to the whole video below but the summary version is if you do the sample space of all 36 combinations of two d6s being rolled and then you group them into the ones with the same highest value there's only one square which if you roll both dice the highest value is one so that's 1 and 36 chance there were three with the biggest value was are two five for three and all the way up and if you rearrange that into bar chart you get pretty much triangle shape and if you were to increase the number of sides your the dice has that would eventually approach the same triangle distribution that we saw in guess the extreme version where you have two numbers between zero and one pick the biggest and in that limit you get perfect triangular distribution and if you're bored you can spend while staring at that and see if you can work out why that means the average value is 2/3 of the maximum value so by just taking the limit of result from previous video we're halfway there now we just need to know what does it mean to take the square root of rolling dice or picking random number and this is where it got interesting because made the let's say mistake of mentioning this to Grant Sanderson when he was visiting me when he was over in the UK because explained roughly where was at journey together and we were both supposed to be working and made the mistake of mentioning maass problem and I'll talk you through the rough outline that showed Grant and we filled in some gaps together and we're going to call the ROM number none of this is rigorous by the way this is our = the square < TK of graph you could just put y^2 = I'm going to call that DX it's little section of this we can then map that to the amount over here we're going to get so we just differentiate both sides and so we end up with two lots of Dy equals DX and I'm going to leave that as it is for now the next one I'm going to draw in way that is unnecessarily complicated this is square if fill in the rest of it there's square that's our space we we kind of end up with the outer mean Shell's probably not quite the right word is is also just that distance how far out in the Square we've gone that's also and then that little bit there is that area is our so we can say that total area is equal to this rectangle which is * plus this area which is * Dy my goodness it equals 2 Dy DX = 2 Dy DX = 2 Dy this was our hand wavy convincing ourselves yeah these two situations while not in rigor terms have the same underlying logic we convinced ourselves yeah it feels like this is true fact and then Grant was silent for second and then said yeah but maybe there's nicer visual way of looking at it classic three blue one brown and I'm sure enough he came up with one so let's think about one of our random values which I'm going to call X1 and we're assuming this is randomly chosen in the interval from 0 to 1 Accord according to uniform distribution which in this case just means that the probability of falling within given range is equal to the size of that range for the second random value I'm going to have you think about it on kind of AIS and again this one is chosen uniformly at random between the values 0er and one and by putting it on second axis like this it means we can think of all the possible pairs of values X1 X2 as being point in two-dimensional space more specifically point inside this little 1 by 1 square now take moment to think about what it looks like for the maximum of these two values to be equal to some specific number like 0.7 well one way that could happen would be if X1 is equal to 0.7 and X2 is anything smaller than it which would put us on this vertical line here but it could also be the case that X2 is equal to 0.7 and X1 is smaller than that which puts you somewhere on this horizontal line here in general when you're dealing with probabilities over continuous values like this it's not very helpful to ask about equality like the probability that this Max is exactly equal to 0.7 since these lines are infantes thin so that exact probability is actually zero and you kind of can't deduce anything about the distribution from that but what's much more helpful is to switch to inequalities and ask what's the probability that this maximum is something less than or equal to this specific value which in our diagram would mean you fall anywhere inside this green square here in that case because everything is uniform the probability equals the area of that little green square so the probability that your max is below given value is always going to equal SAR there's fancy name here this is called the cumulative distribution function for our random variable on the other hand suppose you just took one of these values like X1 and you asked what's the probability that its square root is less than essentially asking for this cumulative distribution of the square root of random value that's the same is asking when is X1 less than 2 and because it's uniform at random in this range from 0 to 1 the answer there is 2 exactly what you get for the maximum case okay agree the visual way of looking at it is really good it also means we can generalize what we've seen so far we can take it up into more Dimensions so more random numbers and if you remember my previous video those of you who saw it about the dice you know went from trying to imagine that 2D Square elbow plot using dice up into the third dimension which we're going to do again but for that we need lot more Dice and no so now we can build 3D version of the plot we saw before in 2D we'll start with one dice and then we build up shells of dice around that to represent three-dimensional plot where each axis is one of rolling three d6s and then picking the biggest and this is the same model we had last time in case you're curious except we did drop it and we broke the outer one which is why it's now shanier than ever but it's fine it's good enough so what this represents is you 6X 6X 6 Cube so that's taking three distinguishable dice rolling them picking the biggest Bay which in this case is six and so there's only one way to get one that's rolling 111 combo there's all these ways there's seven ways to get two and then you count all the way up and last time got obsessed with working out closed nice neat formula using hexagonal numbers to calculate the average result of what you're going to get what Grant realized is if you generalize his visual proof the kind of the same way I've done this you can look at what happens if you pick three random numbers between zero and one and it turns out that's indistinguishable from taking their cube root and four random numbers well you imagine the 4D version of this and that's equivalent to taking the fourth power root of single random number absolutely phenomenal the question now is how do we apply this back to Rolling dice we can't just roll let's say 1 D6 and take its square root to be the equivalent of rolling 2 d6s and picking the highest for two issues the first is and this is something lot of people get hung up up on very early on we're now dealing with numbers bigger than one and lot of people when originally told them this fact if they weren't mathematical their first objection is no but square roots make things smaller and that's true if you're above one below one because if you multiply something by number below one it gets smaller squaring goes smaller if you take the square root that makes it bigger which is why from 0 to 1 the square root is equivalent to taking Max if we're above one however that no longer works so what you need to do is roll the dice D6 and then divide whatever you get by six and that scales it all down to be between zero and one so for D20 you'd roll it divide by 20 we can fix that issue the bigger issue is the resolution so if you did it with D6 and you divide that by six you're still only going to have six possible values because there only six faces it can land on and that it's not enough detail to recreate the nuances of that 6x6 that 36 value possible space of outcomes you need to be able to have enough results to proportionally get the different values so the lack of resolution we cannot fix or at least we can't fix it with normal dice like this found one dice for which it works so we no longer need rd20 instead we need 36 if you want to recreate rolling two dice and picking the biggest d6s you need single dice which has the square of the number of faces instead of six you got 36 and that's because it gives you the entire sample space but the math works out so nicely so if you were to roll this and then scale it between zero and one You' be dividing it by 36 or 6 squar you then take the square root of whatever you end up with which is equivalent of whatever you rolled take the square root now divided by just single six but then you got to scale it back up to represent rolling D6 so you multiply it by that six everything cancels out so it means if you have 36 sided dice and you roll it and you just take the square root of whatever number you see and then round that up to the nearest whole number that is indistinguishable from Rolling two d6s and picking the highest value it works fact that came across which seemed unbelievable and realized half of the fact applied to something I'd done previously because it's mass and because the fact was true knew somehow the other half must apply as well the square root must work and it does you just got to pick the right number of sides thank you so much for watching this video two last things to clear up one is where on Earth do you get d36 from and this is shouldn't be possible yeah the fine people at the dice lab made this don't think it's strictly completely fair think they just distributed 36 points on sphere and then put some planes on it but will link to the dice Lab website below where you can get these if you're in the UK think we'll have some not many handful on math gear so I'll link that below as well and thanks to Dylan from Seattle who have to say did at the time ask chat GPT why the square root of random number is the same as the max of two random numbers and two chat gpts credit they put together something that looks like lot like proof involving cumulative distribution functions have not gone through it carefully to see if it's actually correct would be quite surprised if it was but it went in the same direction as well granted so well played chat GTP not as random as thought it would be
10:01
Why probability of 0 does not mean impossible Probabilities of probabilities part 2
3Blue1Brown
3.3M مشاهدة · 6 years ago
17:16
What is a Probability Density And What Does It Have to Do with Avocados
Probably Optimal
1.9K مشاهدة · 2 months ago
32:32
The Strange Math That Predicts Almost Anything
Veritasium
12.3M مشاهدة · 11 months ago
9:20
Probability is just really weird
Zach Star
107.5K مشاهدة · 1 year ago
3:30
Probability Comparison How WEIRD are YOU
King Of Charts
1.6K مشاهدة · 1 year ago