The reason you should shuffle 7 times

Поделиться
HTML-код
  • Опубликовано: 15 май 2024
  • Keep exploring at ► brilliant.org/TreforBazett to get started for free for 30 days, and to get 20% off an annual premium subscription!
    References:
    Key paper, Bayer & Diaconis: www.stat.berkeley.edu/~aldous...
    Diaconis on @numberphile: • The Best (and Worst) W...
    I also enjoyed a write up of the Bayer & Diaconis paper in Francis Su's Mathematics for Human Flourishing
    0:00 The Shuffling Problem
    2:18 The minimum number of shuffles
    8:00 Gilbert Shannon Reeds Model
    10:30 Computing Probabilities
    15:52 Total Variation Distance
    18:09 Brilliant.org/TreforBazett
    Check out my MATH MERCH line in collaboration with Beautiful Equations
    ►beautifulequations.net/pages/...
    COURSE PLAYLISTS:
    ►DISCRETE MATH: • Discrete Math (Full Co...
    ►LINEAR ALGEBRA: • Linear Algebra (Full C...
    ►CALCULUS I: • Calculus I (Limits, De...
    ► CALCULUS II: • Calculus II (Integrati...
    ►MULTIVARIABLE CALCULUS (Calc III): • Calculus III: Multivar...
    ►VECTOR CALCULUS (Calc IV) • Calculus IV: Vector Ca...
    ►DIFFERENTIAL EQUATIONS: • Ordinary Differential ...
    ►LAPLACE TRANSFORM: • Laplace Transforms and...
    ►GAME THEORY: • Game Theory
    OTHER PLAYLISTS:
    ► Learning Math Series
    • 5 Tips To Make Math Pr...
    ►Cool Math Series:
    • Cool Math Series
    BECOME A MEMBER:
    ►Join: / @drtrefor
    MATH BOOKS I LOVE (affilliate link):
    ► www.amazon.com/shop/treforbazett
    SOCIALS:
    ►X/Twitter: X.com/treforbazett
    ►TikTok: / drtrefor
    ►Instagram (photography based): / treforphotography

Комментарии • 152

  • @hithere-cz4oc
    @hithere-cz4oc 12 дней назад +73

    Just so you know, the true crux of the statement “no two randomly shuffled decks of cards have never been seen before” comes down to the SQUARE ROOT of 52!. You can look up the birthday paradox, but essentially, 52! Is something like 10^54, so the square root is something like 10^27, meaning you have to shuffle around 10^27 times before you can say that there’s a good chance that two random decks have shuffled to be the same.
    It’s the same reason why a group of only 22 people are 50% likely to contain a birthday in common, even though it seems counterintuitive

  • @tomo9126
    @tomo9126 10 дней назад +15

    If there's drinking involved and a real chatterbox is shuffling it will be shuffled 15-30 times every time they deal.

  • @andrewharrison8436
    @andrewharrison8436 14 дней назад +35

    That's a nice flip, modelling a riffle shuffle is hard so model the process of unriffle shuffling. That's so elegant that I shall be mulling it over for quite a while.
    It's also inclusive, no longer are we concerned just with those card sharps who can do a perfectly interleaved riffle shuffle - this is cards for the rest of us, not the elite.

    • @DrTrefor
      @DrTrefor  14 дней назад +8

      Ya sometimes doing things in reverse is way easier to understand

  • @smob0
    @smob0 14 дней назад +31

    When I shuffle sleeved cards, I tend to be worse at mixing the cards near the top and bottom of the deck. So after 3 riffles, I will put the cards from the bottom on the top, and a few cards from the middle on top of those and continue riffling. It's like scraping the side of bowl when you're mixing things together. I find 9 total, breaking every 3, is enough to get a deck from newly built to being random enough to play.

    • @Pystro
      @Pystro 13 дней назад +2

      You mean you do a cut and put the two stacks on top of each other in the opposite order? ...before you then cut them apart again (possibly in the exact same place).
      At first I was thinking that that doesn't seem to be doing ANYTHING., but I guess it actually will help a bit. But maybe not as much as you think it does.* Doing those extra (8th and 9th) shuffles is probably doing much more to fix your predictability than that "flip" operation.
      *Here's why:
      You are doing it to ensure that the bottom and top eventually get shuffled. But I will have to assume that it's about equally likely that the bottom few cards come from the left or right hand.** Then there's the same 50:50 chance that your bottom cards remain bottom cards, versus that they come from somewhere in the middle.
      **If instead you knew that for example your left hand often runs out faster than the right, then you'd want to put the sub-deck that has cards from near the cut (the middle of the deck) in your right hand. And if there is a predictability, but you don't know which hand is faster on a particular day, then you probably want to always cut the deck with the same motion, but for every second shuffle swap the sub-stacks between the hands.

    • @smob0
      @smob0 13 дней назад +1

      @@Pystro My goal is to get the top and bottom into the middle where they will get mixed better. The problem is both hands tend to be inefficient near the top and bottom since you can't have quite the same technique as the shuffling in the video due to the cards being more bulky and slippery. A sleeved magic card is about 3 times as thick as a playing card. If you're not careful, you can also stick the corner of a card into a sleeve while shuffling and split the sleeve open. You also tend to be a little gentler when handling sleeved cards since they are often pretty expensive. Since there's a bunch of factors that make the shuffling less random, I add a few extra if my deck is somehow sorted before hand just to be safe.

    • @Pystro
      @Pystro 13 дней назад +1

      @@smob0 " My goal is to get the top and bottom into the middle where they will get mixed better." I get that, but the middle is where you make the next cut, which puts the top and bottom back to the ends of the two half-stacks.
      I guess you could take the top quarter and bottom quarter and stick them with the previous ends against each other, and then riffle together with the half that came from the middle.

    • @smob0
      @smob0 13 дней назад +2

      @@Pystro That makes sense, the bottom is likely to end up near the bottom again after the cut, so maybe I need to fix something. It's hard to explain exactly how I shuffle in text form, but I do usually find the top and bottom 5 cards or so tend to come mostly from one pile when I riffle, so there's roughly a 1 in 4 chance the top or bottom hasn't even really moved. It's also not really a true riffle, and more of taking two half decks, holding them slightly loose and forcing them to interweave. I'm pretty sure it follows the same logic as a riffle, outside the top and bottom problem, but could have issues I'm not considering. I probably need to aim the old top and bottom about 1/4 of the way into the deck so it's halfway through one of the piles. Maybe I should just riffle in the top and bottom into middle individually. 🤔

    • @Pystro
      @Pystro 13 дней назад

      @@smob0 Ah, the "toddler-shuffle", as I call it. (Usually damages the edges more than a "bend-and-drop" shuffle.)
      "I probably need to aim the old top and bottom about 1/4 of the way into the deck" oh, that's also a good solution.

  • @DerpPickles
    @DerpPickles День назад +1

    This is cool, I like how you explained and visualized it. I've played plenty of cards, so I knew about shuffling 7 times, but I never thought about why.

  • @VocalMabiMaple
    @VocalMabiMaple 9 дней назад +2

    Cool video, but I have an easier method for random shuffle. Throw the cards around and play 52 card pickup. By the time you are done, you can give it a quick shuffle and have it be random, and also not want to play anymore.

  • @MathDM329
    @MathDM329 10 дней назад +2

    I remember coming across a paper about this a few years ago but I couldn’t understand the paper then. Thank you for explaining the math so well!

  • @greybeardmc
    @greybeardmc 19 часов назад +1

    My grandfather theorized ages ago that if you did a perfect shuffle some number of times, you'd get back to the original order.
    Then I, back in the early 80s, wrote a program to confirm that, depending on which card you started with, it could take as few as 8 perfect shuffles to get back to the original.

  • @danielpopp1076
    @danielpopp1076 14 дней назад +2

    I had the privilege of attending a guest lecture from Diaconis last month, he was an absolute delight.

  • @shanehebert396
    @shanehebert396 14 дней назад +3

    I remember going over the perfect shuffle back in Parallel Computer Architecture class in college way back in the day... fun times.

  • @scottdobson1276
    @scottdobson1276 8 дней назад +1

    I like to think of tracing the top card and where it might go.
    If you ripple perfectly, it's in one of the top 2 positions after 1 shuffle. After another it could be as low as 4. After n merges, the deepest it could be is 2*n. So it takes 5 for it to possibly be in the bottom half of the deck, one more for it to be at any position in the deck but there are likely significant differences in probability at different parts of the deck.
    A 7th merge would greatly equal out that probability

  • @oelboy
    @oelboy 9 дней назад +4

    0:51 wouldn't that basically be a giant-sized Birthday Paradox? I feel like the odds of a truly shuffled deck to have been shuffled in the same order before is greater than you'd think. Still very small.

  • @HienNguyenHMN
    @HienNguyenHMN 14 дней назад +1

    Thank you for explaining it! I've only heard of the rule of thumb, but never an explanation.

  • @sdspivey
    @sdspivey 14 дней назад +133

    Shuffling is not enough. Cards on the top, tend to stay near the top and cards on the bottom tend to stay on the bottom. For a better mix, occasionally cut the cards distinctly not near the half, followed by more shuffles.

    • @DrTrefor
      @DrTrefor  14 дней назад +49

      It's ok if most of the cuts are somewhere around the middle, if you think about where say the top card goes, you can get it all the way to the bottom card in a small number of shuffles.

    • @tolkienfan1972
      @tolkienfan1972 14 дней назад +11

      ​@@DrTrefor I think you can say with confidence that the probability distribution of the location of the original top card won't be uniform after 7 rifles.

    • @ckq
      @ckq 14 дней назад +15

      ​@@tolkienfan1972heres the math
      After 0 shuffles:
      guaranteed to be at the top (Average ~1)
      After 1:
      50% chance of #1, 25% of #2, etc. (Average ~2)
      After 2:
      ~25% chance of #1, Average (~4)
      .
      .
      .
      After 7:
      ~2% chance of #1 (Average ~26)
      In general note that the xth card goes to roughly the 2x + v (mod 52)th position where v is a random variable with mean zero and variance at least 1.
      Then by applying this 7 times, it gets spread roughly evenly across all 52 positions
      2(2x+v1)+v2.... done 7 times
      gives 128x + 64v1 + 32v2 + .... + v7
      That's essentially uniform

    • @ckq
      @ckq 14 дней назад +3

      Might be easier to think of it as taking the transition matrix to the 7th power.
      I think you can write a program that determines the value of the transition probabilities under that model and takes it to the 7th power.

    • @jweipjklawe4766
      @jweipjklawe4766 14 дней назад +6

      This was my intuition as well, but I ran a few simulations and the distribution is not skewed as I thought. All cards have a 1.8% - 2% of landing in each position as expected. This is remarkably consistent even with low unevenness (all splits are perfectly even), or low "stickiness" (5% chance that the next card is from the same side instead of interleave)
      Though it's true that the bottom and top cards exhibit outlier behaviors: top cards can get as high as 2.5% chance of staying at the top after shuffle, and bottom card tends to be at second bottom-most position around 3% of the time.

  • @muskyoxes
    @muskyoxes 13 дней назад +3

    This seems to answer the question "what if people split the cards unevenly" but doesn't answer the main question of "what if the cards fall in clumps". Was the total variation distance calculated from real shuffles by real people? None of the math leading up to it seems to acknowledge that a human riffle will drop five or six cards in a row from the same half much more often than random chance

  • @samanthamagi6849
    @samanthamagi6849 9 дней назад +3

    We always cut the deck in half, and 2 different people shuffle each half twice. Then they each cut their half in half and trade a half with the other. Shuffle again twice, combine it all, and mega shuffle once or twice. This way each card gets shuffled 5 or 6 times, but each person only has to shuffle 2 or 3 times.
    As i write this, i realize it sounds more complex than it is!

    • @Franimus
      @Franimus 8 дней назад

      Very useful for large decks!

  • @DaneBrooke
    @DaneBrooke 10 дней назад +3

    You aren't the first to RUclips in favor of 7 shuffles, tho I prefer your argument for it. The only hanging question is "why stop there"? Yes, the distance metric has gotten "pretty small" after 7 shuffles, but 8 (and subsequent) shuffles roughly halve the distance metric. Surely "more shuffles are better". I am asking "You haven't clarified the meaning of 'pretty small' enough for me to understand why you would be happy stopping at 7 shuffles instead of 8 or 9..."?

  • @BloobleBonker
    @BloobleBonker 14 дней назад +3

    Great graphics as always!

  • @alextsitovich9800
    @alextsitovich9800 День назад +1

    Shufflin'! Shufflin'! Every day I'm shufflin'!

  • @Jonas-ue6eh
    @Jonas-ue6eh 14 дней назад +8

    I am having a seminar soon on mixing time of Markov chains and reading the Wikipedia this morning, I came across this exact fact and I got very curious. The probability that you made a video about it today also feels like 1/52! :)

    • @DrTrefor
      @DrTrefor  14 дней назад +2

      Woah that’s cool!

  • @cigmorfil4101
    @cigmorfil4101 5 дней назад +1

    With perfect riffle shuffling it's impossible: 8 out shuffles will restore the order whilst 52 in suffles will restore the order. By varying between in and out perfect riffle shuffles you can put the top card at any position in the pack (and the bottom card at the same position from the other end of the pack).
    The best "real" shuffle is to put the deck face down spread out on the table and slide the cards around randomly.

    • @DrTrefor
      @DrTrefor  5 дней назад +1

      Ya for sure, this works dependent on the model of a binomial distribution, perfect shuffles definitely aren’t that!

  • @zoonvanmichiel9045
    @zoonvanmichiel9045 13 дней назад +4

    On the slide at 15:27 there is an off-by-one error.
    r rising sequences means r-1 cuts are predetermined.

    • @DrTrefor
      @DrTrefor  13 дней назад +3

      Quite right - thank you!

  • @randyriegel8553
    @randyriegel8553 10 дней назад

    We I play Texas holdem tournaments if our table needs a new deck from some reason (torn card, etc) the dealer will have all other dealers to freeze the table and stop the blind clock. They normally will "flip shuffle" like you did for 5-6 times... then do a "side shuffle" where you have 1/2 in your left hand and half in your right... where they just fall into place a few times. Then a couple more flip shuffles. Then the final shuffle is spreading cards out on table and the swirling them around into each other. Then he cuts. And back to cards.

  • @BryndanMeyerholtTheRealDeal
    @BryndanMeyerholtTheRealDeal 8 дней назад

    Her: I only date bad boys.
    Him: shuffles deck of cards eight times

  • @franks4973
    @franks4973 8 дней назад +1

    You actually need to cut in thirds and restock prior to cutting in half for shuffling. That will reduce top and. Bottom portions that have less movement,ent.

  • @robertalvir7173
    @robertalvir7173 День назад +1

    Nice job of bending my brain … now I can go and play Pickleball 🏓🤣

  • @jmi967
    @jmi967 11 дней назад

    Something like five years ago I made up a shuffling sequence that made the cards visually random fairly quickly most of the time. I’d have to look up the details of it if I still have my notes in storage. It only had two shuffles but had something do do with the cutting of the deck if I remember correctly.

  • @iceboundglaceon
    @iceboundglaceon 22 часа назад

    if you only riffle shuffle from a perfect ascending order deck, the cards will still be in batches of ascending order. it will not be truly random. (the first ace will always be in the top 6 cards when only riffle shuffled 7 times)
    you have to shuffle overhand a few times first to break up the ascending order, then riffle shuffle an odd number more times. this properly breaks up the ascending order, making a more random deck.

  • @iwersonsch5131
    @iwersonsch5131 13 дней назад +1

    Suppose we started from a sorted deck, shuffled it 7 times, and dealt 2 cards each to 2 different hands.
    Then, suppose we dealt 5 more cards into the middle of the table, and determined the stronger hand according to Poker rules.
    How would the matchup probabilities between two specific hands shift compared to a truly random shuffle? Which matchups would shift the most?

  • @danwylie-sears1134
    @danwylie-sears1134 7 дней назад

    The way I've always thought of it is that when you have two cards adjacent to each other in the initial order (a card and the card that's one away from it), you put approximately one card in between them (so it's approximately two away). With the next shuffle, you put approximately one card in between each of the ones that are there from the first shuffle, so it's approximately four away, doubling with each shuffle. That got me to the same criterion of needing to have two to the number of shuffles exceed 52.

  • @mongaelias7061
    @mongaelias7061 14 дней назад +1

    Great skill there doctor!🎉

    • @DrTrefor
      @DrTrefor  14 дней назад +2

      Thank you!

    • @mongaelias7061
      @mongaelias7061 14 дней назад

      Much love from Makerere university ❤
      Tomorrow is my calculus 2 exam and am so motivated by you!!

  • @JobBouwman
    @JobBouwman 14 дней назад +2

    Why didn't you explain this with convolutions? With each shuffling the cards have an expected position, combined with an stdev in its position. Then after 7 shuffles, the total stdev is sqrt(7) times the initial stdev.
    There is than still a lot of structure in the deck, however, we as humans don't recognize this structure anymore.

  • @michaelturner2806
    @michaelturner2806 11 дней назад +1

    I come from a trading card game background, where my deck contains 99 cards, with about 80 being unique and the rest being copies of the same 2 or 3 cards. (Magic the Gathering Commander format with basic lands.) Since it's 99 cards instead of 52, based on the math at the beginning, 8 shuffles should be plenty? (2^7 = 128 > 99)
    I also mash shuffle instead of riffle shuffle, but I don't think that makes a difference if done right.
    I know players often like to start off with a pile "shuffle", placing the cards in sequence into different piles, in my 99-card deck example usually 10 piles. This can feel like it kickstarts the randomizing process, but it's mainly a way to count the cards to make sure none have gone missing between games, like being dropped on the floor or an opponent accidentally taking one that was played on their board.
    Plus there's something I find satisfying about shuffling nearly 100 sleeved cards on a soft neoprene mat. If it were more portable I'd keep it as a fidget distraction.

  • @omgopet
    @omgopet 13 дней назад

    14:40 - Either this is a mistake, or I misunderstood something. I'm pretty sure that for r sequences you need r-1 pre-determined cuts. If there is only one sequence, there are no pre-determined cuts, for r=2 (your example), you need 1 pre-determined cut etc.

  • @oliviermiakinen197
    @oliviermiakinen197 14 дней назад +1

    12:00 your colors are most of the time in the order blue

  • @Essman614
    @Essman614 7 дней назад

    Really makes you think about lands in MTG

  • @bartsanders1553
    @bartsanders1553 13 дней назад +1

    Not only is it likely to be in an order that has never occurred before, but in an order it will never be again.

  • @ratamacue0320
    @ratamacue0320 13 дней назад +2

    What if you mix in some overhand shuffles?

    • @DrTrefor
      @DrTrefor  13 дней назад +2

      These are very inefficient, I saw diaconis say 20,000 of these are needed to get to random

    • @ratamacue0320
      @ratamacue0320 13 дней назад

      @@DrTrefor personally, I use mostly riffle bridges. I just sprinkle in a few overhands.
      For instance, what if I do 1 or 2 riffles, then once through the deck with an overhand shuffle (e.g. in 6 chunks), then 2 to 4 more riffles? How does this compare in terms of randomness and efficiency? Or vary the number and order of various types of shuffles; can we achieve the same randomness with fewer than 7 total shuffles?
      My intuition is that a well-placed overhand shuffle(s) could breaking up the sequences...

  • @Krydax8
    @Krydax8 13 дней назад +1

    I've always been curious, and, this has never been answered by any videos I've seen, what about crappy shufflers. People who flop sometimes blobs of 3, 4, even 5 cards at once as they're interleaving the cards? Most of these shuffle-math analyses look at 1 or 2 card groups being interleaved, but what if those are far higher? What number of shuffles do you need then?

    • @DrTrefor
      @DrTrefor  13 дней назад +1

      This model assumes every way you can cut and shuffle is equally likely. If you want to tweak the distribution a bit so “good” shuffles are rare, I don’t think this will do that much. Groups of 5 are common in the distribution of this video.

  • @andrewharrison8436
    @andrewharrison8436 13 дней назад

    So 52 coin flips determines a riffle shuffle. So take the 52 results, working forwards looking for heads put out cards 1, 2 etc. Then working backwards looking for tails put out cards 52, 51 etc. Physically tedious but easy to program.
    Of course once programmed you have to look at cumulative results!
    Doing this (I used Excel VBA macros) it's nice to see intuition confirmed in that 1 maps to 1 half the time, 2 a quarter the time etc. Very skew. Further down the numbers on average jump from n to 2n with a more symetrical distribution about that mean.
    The middle numbers split between the 2 ends, however the 2 parts are each part of a symetrical distribution so move the low part 52 places to the right and there is still that symetrical shape with a mean of 2n.
    All very elegant but I need a much wider screen (17% zoom to see it all at once is unreadable).
    Looking at mean and standard deviation, the mean is quite close to 2n for each start n, the standard deviation is 4 times as high for the middle numbers as for the end ones.
    This method can tell you probabilities of a card being somewhere but says very little about how correlated that is with the position of its neighbour.

  • @MasterHigure
    @MasterHigure 13 дней назад +2

    It's always cool to see video adaptations of Proofs From The Book. There is a reason the proofs that are included in there are included in there.

  • @jacquespictet5363
    @jacquespictet5363 8 дней назад

    Or use the most common method: lay cards on the table (face up) and mix them, then alternate cuts and shuffles. Much ado about little.

  • @Ojasvi-dr7yb
    @Ojasvi-dr7yb 14 дней назад +3

    Make a video on circle inversion

    • @DrTrefor
      @DrTrefor  14 дней назад +2

      Oooh that would be a good one!

    • @Ojasvi-dr7yb
      @Ojasvi-dr7yb 14 дней назад +1

      I would also recommend a video generating functions(especially exponential generating functions) and recurrence relations ​@@DrTrefor

    • @Ojasvi-dr7yb
      @Ojasvi-dr7yb 14 дней назад +1

      Maybe this is too much but quaternions would also make a great video topic. I would be glad if you make a video on a topic in my recommendations​@@DrTrefor

  • @kucken64
    @kucken64 13 дней назад +1

    That was really interesting Trefor. Okay, but what about pile shuffling? That's where a deck of cards in dealt into a set of separate piles (usually eight) and then those piles are combined and shuffled once or twice? I ask because this is a really common shuffling procedure in Magic the Gathering.

    • @Icapica
      @Icapica 13 дней назад +1

      Pile shuffling isn't random at all. It's done in Magic: The Gathering to count your cards so you know your deck is legal before the game starts. A couple of times by pile shuffling I've noticed I was missing one card that had fallen somewhere to the side.
      After pile shuffling you should still shuffle properly (meaning quite many times) since pile shuffling isn't actually shuffling.
      Another reason why you might pile shuffle MTG cards is that if your sleeves aren't completely clean, they might stick together. Pile shuffling fixes that. Though if you notice that becoming a real problem, you should just buy new sleeves at least if you play in tournaments.

    • @DrTrefor
      @DrTrefor  13 дней назад +2

      The cutting part of this procedure is going to do very little to making the deck random. It takes huge amounts of cuts (or overhand shuffles) to get to random.

    • @kucken64
      @kucken64 13 дней назад +1

      @@DrTrefor Ah sorry to be clear the deck isn't cut into eight piles, it is dealt into eight piles, so card one goes into pile one card two into pile two card three to pile three and so forth. Then the deck is shuffled. The idea behind it is rapidly break up stacks of cards of a similar type.

    • @kucken64
      @kucken64 13 дней назад +1

      @@Icapica I never said it was random. Its not just done in MtG to count cards, it's done to rapidly disperse groups of similar cards, i.e. mana, through the deck - effectively to break up structures in card order that have arisen from the previous game. What I am interested in is how that kind of procedure could have an impact on the processes described in Dr Trefor's video. If you do a pile shuffle does it take fewer shuffles to reach the point where all possible deck combinations are similarly probable?

    • @Icapica
      @Icapica 13 дней назад +2

      @@kucken64 Yeah I know, but counting your cards is the only use for it that is actually accepted in the tournament rules. Because pile shuffling isn't random, it doesn't make it any faster to shuffle the deck properly. Basically, when you start shuffling (riffle or mash shuffle), it doesn't matter at all if you pile shuffled the deck before. Clumps do not matter at all. If the starting order of your deck matters after shuffling, it means you did not shuffle it enough.
      You can find Magic Tournament Rules online. Under MTR 3.10 "Card Shuffling", it says specifically:
      "Pile shuffling alone is not sufficiently random and may not be performed other than once each at the beginning of a game to count the cards in the deck."
      After saying that, it explains that pile shuffling isn't random and thus isn't shuffling at all. If you see someone pile shuffle and then not shuffle their deck enough, they're a cheater though possibly unintentionally. If you see someone pile shuffle more than once at the beginning of a game, call a judge. Also, be careful of players who seem to pile shuffle a lot and not shuffle much otherwise. Pile shuffling is a favorite tool of many cheaters since a skilled pile shuffler can stack their intentionally in an order that benefits them.
      A lot of MTG players just pile shuffle because they've seen other people do it but haven't learned why it's actually done. And in general, if you go online to talk about shuffling, you're going to get a lot of bad info from players with little knowledge of either randomness or the rules.

  • @maxscott3349
    @maxscott3349 13 дней назад

    I have to do 20 to 30 for the games I play with my cards, but my area has really high humidity and they can stick together real bad sometimes.

  • @hippoAutwell
    @hippoAutwell 11 дней назад +1

    What if I use 2 fifty-two decks. How many times must a person shuffle like the 7 times in the video?

  • @keiraferrari7764
    @keiraferrari7764 12 дней назад +9

    A perfect shuffle is NEVER random. So, you must be talking about imperfect shuffles.

    • @RepChris
      @RepChris 8 дней назад +1

      depends on your definition of perfect. nothing in math is more important than semantics. you could also have perfect in the sense that it actually is good at shuffling the deck, which a completely deterministic shuffle isnt (fisher-yates is a classic example, but plenty of others exist; an imperfect faro shuffle shuffle isnt all that bad either). Of course this isnt the "perfect" definition thats most commonly used, although that one (for one of the two ways you could do it) leads to the card order being a cyclical group of order 8, which is neat (unless you want a shuffled deck). For the other option you get even more interesting group properties.

    • @readjordan2257
      @readjordan2257 8 дней назад

      I could be wrong, but thats kind of like saying the perfect chef never washes his hands after he uses the bathroom. I mean, if we're talking waffle house then true facts...but if were talking literally anywhere else, im sorry but thats straight gross. This statement seems statistically sus.

  • @Nachiebree
    @Nachiebree 10 дней назад

    Now I'm curious about shuffling MtG commander decks, 99 cards and shuffling being "take the stack and drop a few cards into the other hand at a time"

  • @mikeonthecomputer
    @mikeonthecomputer 9 дней назад +1

    What's sort of funny is that I always do 8 shuffles, just because it suits my OCD tenancies better. In poker, it's good practice to cut before each shuffle (presumably to reduce the chance of stacking a deck), and after the 4th, the whole deck is cut into four pieces and stacked on each other, then more shuffles are done. Instead of doing just three after that point, I just go for a full four extra. It doesn't take much time.
    At any rate, I can be confident a deck is shuffled at that point. :)

    • @jeremyschulthess63
      @jeremyschulthess63 8 дней назад +2

      I've played Caribbean Stud in cruise ship casinos before. I've know the minimum 7 shuffle thing for years and always watch how many times the dealer shuffles the deck (they don't have auto shufflers so it is all by hand). Inevitability every dealer has only shuffled 3 or 4 times and you can actually watch the hands move around the table. I know they have probably been instructed to do this so people lose more money (the casino on a cruise ship brings in more money than anything else).

    • @mikeonthecomputer
      @mikeonthecomputer 8 дней назад +1

      @@jeremyschulthess63 If they set up the games properly, they wouldn't need to effectively cheat. Especially in poker, set the rakes to make as much profit as they want (without driving players away), and they needn't care about what's won at all. The rake guarantees a fixed amount going into the casino.
      Now, in house games like Blackjack, there does exist a risk of a big win, but the odds are still fairly well known, and casinos even have insurance companies willing to cover the lucky players.

    • @jeremyschulthess63
      @jeremyschulthess63 8 дней назад +1

      @@mikeonthecomputer Caribbean Stud is a house game with a minimum qualification for the house to be in the hand. If the house doesn't qualify then you win like $5 instead of lets say $50 on a flush. The main thing is I'd say 90% of people don't know that you have to shuffle at least 7 times to randomize the deck. They see the dealer shuffling 3 or 4 times and think OK that works. Not to mention a lot of the players are probably quite drunk.

    • @mikeonthecomputer
      @mikeonthecomputer 8 дней назад

      @@jeremyschulthess63 Thanks, I didn't know it was a house game. Even still, poker hand odds are well known to the point that they should be able to safely work from a real randomized deck.

    • @jeremyschulthess63
      @jeremyschulthess63 8 дней назад +1

      @@mikeonthecomputer remember if people are getting some good hands they are more likely to bet bigger the next time. At the same time the people playing that I saw really didn't know what poker hand odds are.

  • @papalyosha
    @papalyosha 13 дней назад +13

    Calculated total variation distance shows that 7 shuffle is not good at all! Quite the opposite: 0.334 means that there is a bet on deck of card, such that the difference of probability of winning when cards are shuffle perfectly, and when cards is shuffled 7 times is 33.4%. It is 1/3 for heaven's sake! It is not small at all, considering that probabilities usually lies between 0 and 1.
    For example, let's play the following game. We take the deck where the cards are sorted by values. Then we do riffle shuffle 7 times. Then we look for pairs of cards that were consecutive in the original order (like Queen and King of Clubs). For each such pair we see if these cards was switched after the shuffle. If the order was switched, then it's +1 point for you, if it is not, then it is -1 point. We count points for each of 53 pairs of consecutive cards. I win if you get negative points. In perfectly shuffled deck, you should win with probability exactly 50%. But in reality (i.e. with 7 shuffles according to Gilbert-Shannon-Reeds model), you lose with probability 80.7%. The difference if huge! I can even let you win if the final score is -1 or more. Then in theory (perfect shuffle), you should win with probability 68.4%. But in reality (7 shuffles) you win rate would be only 35.0%. The difference is 33.4% is exactly total variation distance. So how people can say that seven shuffles are good based on this data, is mysterious to me.
    P.S. I followed the link and read Bayer & Diaconis's paper. And no, they don't claim that 7 shuffles are enough. They are saying the opposite: "In studying these numbers, we were most struck by the results for many shuffles. Even at eight shuffles, it can still make a great bet: Betting even money on being able to pick the moved card with 26 guesses, one enjoys nearly a 10% advantage. This is startling, considering that people rarely shuffle eight times in practice."

    • @Fabelaz
      @Fabelaz 9 дней назад +1

      Don't understand a word, will like regardless👍

    • @Franimus
      @Franimus 8 дней назад

      That's not actually what total variation distance means. That .334 is the delta between a uniform distribution (2% chance for each position) and the curve from shuffling 7 times. In other words the curve is much flatter and closer to a uniform distribution.

    • @Franimus
      @Franimus 8 дней назад

      The quote is also from the segment about a magic trick where a card is removed from the deck and replaced elsewhere, and identifying that card by **inspecting the entire deck face up**. With an infinitely shuffled deck, the process enables the magician to guess correctly 1.9% of the time on the first guess. That's the uniform distribution, 1/52 chance. Shuffling 7 times allows the magician to guess correctly 2.8% of the time. Not perfectly random, but good enough for gaming. 6 times is 4.2% and 8 times is 2.3%, so you can see how further shuffles get you only a little bit closer to that 1.9% uniform distribution after the 7th.

    • @papalyosha
      @papalyosha 8 дней назад

      ​@@Franimus Well, 2.8% is 1.5 times more than 1.9%. I would not call this close. You can bet $1 against $51 that you guess the card correctly from the first attempt. It should be a fair game with uniform distribution. But after 7 shuffle, you would get average advantage of about 50 cents per 1 dollar of you bet. I would not say it's even close to a fair game.

    • @Franimus
      @Franimus 8 дней назад

      @@papalyosha that makes no sense... A 2.8% chance of winning is 28 out of 1000 times. Not half.

  • @anthonywarfield7348
    @anthonywarfield7348 9 дней назад

    I like to shuffle 3 times followed by a rifle shuffle and then repeat. Don't know if that is good enough but if we are playing spades I always sneak a peak at the last 4 cards and make sure me and my p get the best ones.

  • @Wborogoal478
    @Wborogoal478 8 дней назад

    Shuffle, cut 1/3, shuffle, cut 2/3, repeat.

  • @Chiberia
    @Chiberia 10 дней назад +1

    or just hand the deck to my toddler daughter, who will chuck them across the room - perfect shuffle.

  • @nicktyler9339
    @nicktyler9339 9 дней назад

    Ok, now can you work out this problem with a Skip-bo pack please?

  • @cogwheel42
    @cogwheel42 13 дней назад

    It seems a 52-shuffle would create a uniform distribution. But is this equivalent to shuffling 52 times? Can the bias from the initial order ever be fully stamped out?

    • @DrTrefor
      @DrTrefor  13 дней назад

      Right that would be truly random, because it presupposes you shuffle the 52 piles “randomly”. 52 2-shuffles is not quite the same, that still has a (tiny) asymmetry

  • @andyhughes8315
    @andyhughes8315 11 дней назад

    If you do a perfect bridge/rifle shuffle 4 times you'll be one swap away from reversing the original order.

    • @DrTrefor
      @DrTrefor  7 дней назад

      I want to learn how to do a perfect shuffle, would be a great party trick:D

  • @jimwinchester339
    @jimwinchester339 12 дней назад +2

    It's really rather simple. The deck is "shuffled" by alternating a draw from two half-decks. Each time a card from a half-deck is merged, it has the opportunity to rise or fall by [at least] one spot in the deck. If shuffled twice, that card could advance two positions; once shuffled 3 times, +/- 4 spots, and so one. So it's really a powers/log problem: when do we get past 52? When does 2^x >= 52? 2^5=32, 2^6=64. And you have to start with x=0 (not x=1), because you begin with HALF-decks - - totally unshuffled. So, 0..6 is 7 times.

  • @MoonLiteNite
    @MoonLiteNite 4 дня назад

    I just do a wash.... so much quicker than 7 shuffles :D

  • @RossMarsden
    @RossMarsden 10 дней назад

    That is not the only way to shuffle.

  • @troyfrei2962
    @troyfrei2962 День назад

    If you shuff 6 or 7 time it is back to the Original order

  • @DH_Arts9368
    @DH_Arts9368 14 дней назад +2

    You perspective towards maths is amazing sir. We need teachers like you
    Love from India sir 🇮🇳❤❤
    I was already watching ur lecture on Taylor's theorum 😁

    • @DrTrefor
      @DrTrefor  14 дней назад +2

      Thanks so much!!

  • @anthonywarfield7348
    @anthonywarfield7348 9 дней назад

    Just had another thought. I question the usefulness of this video because i can't imagine someone who doesn't already understand these concepts being able to follow along. I showed this to my wife and she quit in frustration the moment he started showing probability graphics. Just found it interesting. Im weird like that.

  • @R.B.
    @R.B. 13 дней назад +1

    The other way to get to 7, is that with 8 perfect rifles, you can get the cards back to order. 7 imperfect shuffles is just short of this, and it ensures the closest randomness, then have someone else cut the deck. Even if you always start the bridge shuffle with the same hand and manage to keep some cards together at the top or bottom of the deck, the cut folds those cards in and prevents someone from stacking the deck. This is a good strategy for beginning any game. At a minimum, 3 shuffles with a cut, it won't be completely random, but assuming that it wasn't already ordered, such as between hands, that should be sufficient for a shuffle between hands to make it a fair shuffle. The reasoning for this is in part why 7 shuffles is better than 8, in that cards naturally pick up a small order again at 4, and stopping just short makes the deck more fair, but takes half the time to prepare. It isn't ideal and completely random, but for most card games it will give you a good deck for between hands.

    • @Icapica
      @Icapica 12 дней назад

      All of that assumes that those riffles are perfect though, and they're not supposed to be. If riffles aren't perfect, there is no point at which the deck becomes less random by shuffling it more.

    • @sevret313
      @sevret313 10 дней назад +1

      If you're doing perfect shuffles, 7 would also be completely predictable if you've learnt the order of a 7 perfect shuffle sequence.

  • @Domo3000
    @Domo3000 13 дней назад +1

    If you do 8 perfect riffle shuffles you are back at the exact order you started at. You shouldn't do that kind of shuffling to begin with, and especially not 7 times. You would have a more "random" arrangement by doing it 3 times.

    • @DrTrefor
      @DrTrefor  13 дней назад +3

      That’s true. The results of this video depend on the distribution of shuffles that experimentally models normal shuffles, but fails miserably for people doing perfect shuffles

    • @Domo3000
      @Domo3000 13 дней назад

      @@DrTrefor I'm just always suspicious of these kind of shuffles as I used to play poker with a friend that was a hobby magician and he learned to do them perfectly (or nearly perfectly almost all of the time) and once showed how easy it would be to just pretend to be shuffling.

    • @Pystro
      @Pystro 13 дней назад +1

      I guess the only way to get rid of the possibility of perfect riffles is to have 2 different people control the different sides.
      Then again, in a game theory sense, that's also only true if at least one of them has an incentive to have the cards randomly shuffled. That shuffler can then vary the card dropping speed.
      Or if you don't want to do something quite as complicated, you could just have each of the 2 players riffle on their own but have each one do 4 of the riffles.

    • @UtterlyMuseless
      @UtterlyMuseless 12 дней назад

      In-shuffling only at my poker table.

  • @acf2802
    @acf2802 5 дней назад

    I think the riffle shuffle is worthless because if you are too good at it, there is absolutely nothing random about it.

    • @DrTrefor
      @DrTrefor  5 дней назад

      Ya ultimately this model is only as good as the assumption people shuffle like the binomial distribution. While that is experimentally good in general, there are definitely outliers who can do perfect shuffles

  • @mikeonthebox
    @mikeonthebox 10 дней назад

    Why just shuffle and not a casino wash and then shuffle?

    • @DrTrefor
      @DrTrefor  10 дней назад

      Casino wash is also great, much harder to model mathematically but I believe experimental evidence from dishonest has suggested after about a minute it is close to random

  • @mikelwrnc
    @mikelwrnc 14 дней назад +1

    As a statistician, I hate when statements regarding stochastic processes fail to talk about the results as a distribution, as would be proper. Or at least detail the decision framework being used to summarize said distribution.

  • @schwamforfreedom
    @schwamforfreedom 3 дня назад

    So, what percentage of possible card orders are possible with 7 shuffles? .334 may be a low number is that type of analysis but is meaningless to most viewers.

  • @The_Commandblock
    @The_Commandblock 14 дней назад +1

    Just say you shuffle the cards, the others choose their stack first and you get the remaining one. Noone gets an advantage

  • @christopherellis2663
    @christopherellis2663 14 дней назад

    Þ3ri

  • @mrosskne
    @mrosskne 13 дней назад

    anything a human can do is governed by deterministic physics. unknowable by humans isn't the same thing as random.

    • @Pystro
      @Pystro 13 дней назад +2

      Yes, but the factors going into the deterministic physics are different every time. Meaning you still get a different order every time you shuffle. (Until you start getting close to playing 52! games of course.)

    • @mrosskne
      @mrosskne 12 дней назад

      @@Pystro and it's still not a random process.

    • @UtterlyMuseless
      @UtterlyMuseless 12 дней назад

      Someone needs to study chaos theory and entropy.

    • @mrosskne
      @mrosskne 11 дней назад

      @@UtterlyMuseless chaotic doesn't mean random and entropy has nothing to do with shuffling. you're just repeating words that you think make you sound smart. you're the one that needs to study.

    • @UtterlyMuseless
      @UtterlyMuseless День назад

      @@mrosskne Sir, please. You're making a philosophical argument but are unwilling to grapple with the possible meanings of the words you're using. Chill.

  • @InkerinInkerin
    @InkerinInkerin 13 дней назад

    cards suck

  • @scottyvalentine9811
    @scottyvalentine9811 13 дней назад

    Yet another person making things harder then they need to be. Yeah 7 for a fresh open pack but card etiquette is 2 to 3 during the game. Plus 3 to 4 for two decks of cards. Don't forget letting someone other than the dealer cut the cards once. So ya made a video that has already been done, good work of originality. Thumbs down from me.