The Expected Value of Pyramid Dice (Casino Game)

  Рет қаралды 10,778

Concepts Illuminated

Concepts Illuminated

Күн бұрын

Пікірлер: 48
@britboy3456
@britboy3456 2 жыл бұрын
Enjoyed this video! At 11:25, shouldn't Reroll(d,n) be d+2n not d*2n?
@ConceptsIlluminated
@ConceptsIlluminated 2 жыл бұрын
Yes it should be. Thanks for pointing that out!
@Whaxio
@Whaxio Жыл бұрын
No one's commenting on how great the voice acting in the opening is. Really sounds like a real carnival guy, especially this line "You sure? If you win here, you wont have to teach no more". I wanted to comment on why this game won't be found in a casino, as someone who worked in the industry. Its not because of the EV of the wager, its because the game is too slow! Think about how long a person would take to complete 5+ rolls. Then compare that to a game like blackjack, where one hand could take only a few seconds. Blackjack also allows multiple people to wager at the same time, effectively speeding up all the wagers. To see this game in practice, there would have to be a way to ensure rolls are quick, and a way for multiple people to bet at the same time. You gave an example of the latter at 18:23 Great video!
@Pystro
@Pystro Жыл бұрын
Yup, that's also why the casino edge needs to be 6 times as large as for other games - precisely because each round takes 6 times as long as in other games.
@bluewales73
@bluewales73 2 жыл бұрын
That was good. Better than most spreadsheet videos for sure
@robharwood3538
@robharwood3538 2 жыл бұрын
I'm really liking your method of explanation, particularly how you've applied software development principles (I'm a programmer, too! 🤓) for not only organizing the solution but as a method of discovering the solution. One thing I thought I should mention: You said you're not a fan of falling factorials because you tend to confuse them with powers. In fact, that's an intention of the notation; and indeed another term for them is falling *powers* (or rising powers, with an overbar). They are particularly suited to be interpreted as specialized 'powers' when working with polynomial representations of integer sequences and series. Just thought you might want to know there's a method behind the madness. 😎
@TaleshicMatera
@TaleshicMatera Жыл бұрын
Two variations to make the math incredibly difficult: 1) Before the game, the player rolls a dice and keeps it in their "pocket"; upon getting their first collision, they can try swapping out one of the dice with their "pocket" to avoid losing in that round. 2) Same as 1, but instead of a one-time save, it's always allowed; the player must always swap out the optimal dice with their pocket to keep the game going.
@not-on-pizza
@not-on-pizza 2 жыл бұрын
There's an interesting approach you can take if you already understand the Birthday Paradox, and how to apply it to other sample space sizes: There are 21 different possibilities (yes, they're not all equally likely, but I'll get back to that). The "Birthday Paradox number", the point at which a collision becomes more likely than not, is slightly more than the square root of the number of different possibilities (I remember reading somewhere that it's about sqrt(n) * 1.177). Here, that means it's a bit over 4.58, probably around 5.39. However, as the possibilities are _not_ all equally likely, that _increases_ the chance of collision (verifying this is an exercise left to the reader), and so the 50/50 point is earlier than 5.39, and plausibly even lower than 5. With 7 rolls needed for the game to be a push, your chance of winning anything is quite a lot lower than 50%, and the payout table only gently increasing in the first few rolls after that means that you are heavily unfavoured. Good video. Is that Perl you're using at 16:34?
@ConceptsIlluminated
@ConceptsIlluminated 2 жыл бұрын
That's a neat insight. Sure enough, rolling a duplicate after 4 rolls happens 42.33% of the time, and it's 56.88% for 5 rolls. The programming language I wrote the simulation in is Golang. There's a gist in the description if you want to see the whole thing.
@michal_wieczorek
@michal_wieczorek Жыл бұрын
I was greatly surprised by the quality of your video. Amazing and super clean animations and explenations. Keep it up.
@DavidvanDeijk
@DavidvanDeijk Жыл бұрын
nice challenge, did it in python than finished the video to see you got the same results. happy to see i got it right.
@airatvaliullin8420
@airatvaliullin8420 2 жыл бұрын
Very cool and informative! Thank you. P.S. You take the second place among the "spreadsheet youtubers" (the first place is no doubt Matt Parker)
@rjthescholar177
@rjthescholar177 2 жыл бұрын
Awesome video!
@deepakmallubhotla6058
@deepakmallubhotla6058 Жыл бұрын
Nice explainer. I've taught non-math students with some success by using more programming type language like you did here. It's not a super common perspective in some education and this is a good showcase
@NovaWarrior77
@NovaWarrior77 2 жыл бұрын
Awesome!
@tammylubick2890
@tammylubick2890 2 жыл бұрын
The animations and explanations are great, nicely done!
@patata9502
@patata9502 Жыл бұрын
damn i really thought you were a youtuber with a million subs or something, you explain so well that i only got a bit lost when you introduced pascal's triangle
@iwantedtohaveabigytnamepsi2007
@iwantedtohaveabigytnamepsi2007 2 жыл бұрын
very good video, thanks
@RSLT
@RSLT 2 жыл бұрын
Well explained! Great animations!
@jursamaj
@jursamaj Жыл бұрын
My spreadsheet was a little different. 7 columns numbered 0 to 6 (# of doubles), and 16 rows numbered 0 to 15. I left an empty row and an empty column above and left of that array. (0,0) gets a value of 1, indicating 100% probability of starting there. Every other cell gets a formula adding together the chance of getting there from the cell above and the chance of getting there from the cell to the left. The chance of getting a re-roll just falls away. After getting that filled out, I inserted cells at the top to stagger the columns downward, 1 cell in the 2nd column, 2 in the 3rd, etc (this adds the double & non-double counts, so the cells left on a row all have the same number of rolls to get there). Summing across the rows give me the chance to reach that row. Subtracting that from 1 gives the chance to go bust by that row. Taking successive differences of that column gives the chance to go bust on that specific row. Adding a column of payouts lets me calculate the expected value. All my values match yours (so far as your visible digits). There is a lot less math done in my method, since each cell is calculated from 2 prior cells, instead of starting over. Also, the cases where the count of doubles or non-doubles goes over 6 or 15 respectively are handled automatically. Essentially, I do a markov process in a spreadsheet.
@rafiihsanalfathin9479
@rafiihsanalfathin9479 2 жыл бұрын
Awesome! Really entertaining
@ExaltedDuck
@ExaltedDuck Жыл бұрын
It would be fun to see the numbers for the state-run lottery games. Keeping in mind most casino games pay back something around 98-99% of true odds, I think the ratio for something like the superball is around 5%. or in your EV terms, -95%., roughly.
@Pystro
@Pystro Жыл бұрын
The difference though is that casino games are played many times in a row with previous winnings, whereas you're limited to playing the lottery once per week. If you play a game that pays out 98% often enough, you'll eventually end up at 5% as well. In fact, it takes 148 games (assuming you make the amount you bet a set fraction of your wallet ...and the casino lets your bets go low enough to do that; If you always bet the same as a lottery ticket then it takes 95/2=48 games). I don't expect casino customers to play 150 games in one session, and I don't expect many people to go to a casino weekly, so in practice the casino still offers "fairer" odds. Also, those 5% odds look like you are ignoring the fact that, of the 95% that they don't pay out _directly_, the lottery puts some significant fraction into the jackpot.
@balazsbonifert1427
@balazsbonifert1427 Жыл бұрын
Respect for doing it in Excel so that it's more visual and understandable in a video. I would have just done it in python to avoid all the pain and error possibilities with excel...
@philippenachtergal6077
@philippenachtergal6077 Жыл бұрын
4:30 Hum, well it's quite clear that in order to represent the current state of a game, we need to know how many doubles have been rolled and how many simples (and whether we are still alive or not but that can be implicit). It's very easy to solve through a matrix in a spreadsheet to get the chance to reach any possible state alive since each state can only be obtained in 1 or 2 manners (depending on whether your last throw was a simple or a double). From there, you sum the prob of the states that have a same total number of throws and you get the chances of having at least N throws. Simple subtractions gives you the chances to get exactly N throws before dying and you multiply those by the odds (+ 1) to get the EV. I got an ER of 87.63% which give an EV of -12.37% And in a way, the matrix is a convoluted closed form but I guess it should be possible to translate it into a more traditional one. And there are no factorials or newton binomials involved anywhere, just a count for each state of the probability (i/36) of getting a good double and the probability (j/36) of getting a good non-double throw.
@viniciusfriasaleite8016
@viniciusfriasaleite8016 2 жыл бұрын
Really good
@NovaWarrior77
@NovaWarrior77 2 жыл бұрын
What software are you using?
@ConceptsIlluminated
@ConceptsIlluminated 2 жыл бұрын
To do many of the animations, I used the community version of Manim (manim.community). It ended up being about 2500 lines of Python code to animate all the various scenes. To capture the spreadsheets parts, I used Open Broadcaster Software (OBS). Then for video editing and voice overs, I used Adobe Premiere Pro.
@NovaWarrior77
@NovaWarrior77 2 жыл бұрын
@@ConceptsIlluminated appreciate it thank you sir
@mekkler
@mekkler Жыл бұрын
Interesting! Still not as bad as Keno, though.
@catgirlQueer
@catgirlQueer Жыл бұрын
I wonder now, how would pyramid dice work with other types of dice, D4 pyramid dice, D8, D10, etc.
@ConceptsIlluminated
@ConceptsIlluminated Жыл бұрын
If you work it out, reply to this comment with a spreadsheet, code, or a doc. I am interested in what you find :)
@tw5718
@tw5718 Жыл бұрын
I would definitely need to see lose(4) to get the n choose k, instead of seeing it as 1, 2, 3.
@TazPessle
@TazPessle Жыл бұрын
The against wager should gain more when the player loses quicker. Full $1 return for loss in 2 rolls. And push at 6. Middle values would need tweaking.
@chri-k
@chri-k Жыл бұрын
My possibly correct solution: ( edit: “Push” treated as x0 because i don’t know what it means ) The 21 possible combinations should all have equal probability. One of them becomes losing each toss starting from 0, so probability of getting to toss N should be (21-0)/21 * (21-1)/21 * ••• (21-n)/21 1/21^(n+1) can be factored out, leaving only the (21-k) terms. They should equal 21! excluding all of the terms below 21-n, or, 21!/(20-n)! The total probability is then 21!/(20-n)!/21^(n+1) ( simplifies to 20!/(20-n)!/21^n ) To get a prize you have to lose on the next toss, so multiply that by (n+1)/21 I then just wrote a script which multiplies the payout (+ -1 for cost of playing) by the probability for each possible n and sums them, yielding -26% expected profit, the most likely outcome being loss on sixth toss
@chri-k
@chri-k Жыл бұрын
Correcting my interpretation of the payout table i get +5%. My probabilities are also close but not equal to yours, so i there’s still something wrong
@ConceptsIlluminated
@ConceptsIlluminated Жыл бұрын
The 21 possibilities do *not* all have equal probability. The 15 non-doubles are twice as likely as the 6 doubles.
@chri-k
@chri-k Жыл бұрын
@@ConceptsIlluminated why are obvious things always the easiest to miss
@ConceptsIlluminated
@ConceptsIlluminated Жыл бұрын
​@@chri-k I feel you. Today, when calculating the area of a circle, I squared pi instead of the radius.
@jursamaj
@jursamaj Жыл бұрын
Good rule of thumb for casino games: you *will* lose. Maybe not today, but eventually, you will.
@mrosskne
@mrosskne Жыл бұрын
if it has pyramid in the name and involves money it must be legit
@user-zu1ix3yq2w
@user-zu1ix3yq2w Жыл бұрын
Bust(e,d) Lose(r)
@nif4345
@nif4345 Жыл бұрын
What if you changed some of the outcomes to negative fractions? Maybe -1, -1, -1, -⅔, -⅓, 0, ½, 1, 2, 3, 5, 7, 10, 20, 35, 50, 100, 500, 2500, 15000, 100000?
@nif4345
@nif4345 Жыл бұрын
This is heavily skewed in the players favour, oops
@ConceptsIlluminated
@ConceptsIlluminated Жыл бұрын
You might be on the right track, although from a practical standpoint, you wouldn't want fractions that are *too* complex, since real, live dealers will have to pay them out. For comparison, craps pays out 2:1, 3:2, and 6:5, but that last one can be a bit awkward to explain to players "You should bet 10 or 15 there, but not 12 because I can't make change for that".
@danielyuan9862
@danielyuan9862 Жыл бұрын
You underestimate how likely it is to hit the lower 6 numbers. That's how casinos can trick you by making you lose in the 6 most likely outcomes.
@danielyuan9862
@danielyuan9862 Жыл бұрын
Although technically losing after 1 or 2 rolls is less likely than losing after 7 rolls, so knowing casinos, they'd probably make that a side bet.
The Verhoeff-Gumm Check Digit Algorithm #SoME3
17:00
Concepts Illuminated
Рет қаралды 193 М.
Training a Neural Network in a Spreadsheet
21:44
Concepts Illuminated
Рет қаралды 39 М.
Lazy days…
00:24
Anwar Jibawi
Рет қаралды 8 МЛН
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 115 МЛН
From Small To Giant 0%🍫 VS 100%🍫 #katebrush #shorts #gummy
00:19
Probability isn’t always about randomness (#SoME2)
22:13
Syst3ms
Рет қаралды 22 М.
What Is Radix Economy (and What Is It For?) #SoME2
15:01
Science Meets Fiction
Рет қаралды 9 М.
Introduction to Projective Geometry via Tic-Tac-Toe Grids
21:26
Sum and Product
Рет қаралды 53 М.
Gaslighting ChatGPT With Ethical Dilemmas
23:07
Alex O'Connor
Рет қаралды 451 М.
Unsolved Math: The No-Three-In-Line Problem #SOME3
12:52
Signore Galilei
Рет қаралды 162 М.
Vectors are more awesome than you think (#SoME2)
33:07
The Armchair Intellectual
Рет қаралды 33 М.
Bayes theorem, the geometry of changing beliefs
15:11
3Blue1Brown
Рет қаралды 4,5 МЛН
You're Probably Wrong About Rainbows
27:11
Veritasium
Рет қаралды 3,3 МЛН
Lazy days…
00:24
Anwar Jibawi
Рет қаралды 8 МЛН