Are You Shuffling Cards Incorrectly? In A Random Shuffle, How Many Cards Stay In Place?

preview_player
Показать описание
You open a brand new deck of cards, which has cards in increasing order by suit. You give the deck a random shuffle. How many cards, on average, do you expect to be in the exact same position as before you shuffled the deck? The video presents a solution that many find to be counter-intuitive.

Thanks to Patrons!
Kyle
Alberto Nishikawa
Brian M. Mooney

Connect on social media. I update each site when I have a new video or blog post, so you can follow me on whichever method is most convenient for you.

My Books

Рекомендации по теме
Комментарии
Автор

I was wondering if you have heard of ARML. It stands for the American Regions Mathematics League, and the competition took place yesterday. It's an annual 15 person team-based high school contest, and to excel, you have to be aware of advanced mathematical concepts and shortcuts. It took place yesterday, and the top scoring team only scored 210 points out of a possible 300, since many problems were incredibly difficult this year. I would really appreciate if you could go over some of the problems, since I am sure your audience would find them as engaging as these types of problems. Although many of the later questions are probably too tough to engage most people, some of the earlier ones are easy enough to go over in one of your videos. I encourage you to check out their website and maybe use a few problems in your videos!

edisonhauptman
Автор

I'm not completely convinced of the statement "each card has 1/52 chance to be in the correct spot". This assumes that the events are independent, but I think that that is not the case. For instance, consider the extreme situation when you found 51 out of the 52 cards already in correct position (albeit unlikely, this is not impossible). Then the probability of the final 52nd card to be in the right order is 1. Another argument is that if card #N is at place #M ( N and M being different), then the card #M has 0 probability of being in the right place.

I guess that for the reasoning of the video to apply, something in the procedure should be changed. For instance, after checking each card you shuffle the deck again.

xnick_uy
Автор

Here is a fun extension: what is the answer if the deck has n cards? The result is surprising - it does not matter if the deck has only 1 card or if it even has 1 million cards! This is one of the fun results about random permutations.

MindYourDecisions
Автор

I've heard of this in a slightly different context. It was based on a bet that at least 1 card will be in the correct position. So, once you got one match for a single shuffle, the other matches don't matter. I seem to recall being told that the chance was 66%. Doing a practical experiment with some code confirms that probability. So, I guess that would be "what is the chance that at least 1 card will be in the proper position after a shuffle."

aliasmask
Автор

I got the right answer by brute forcing my way through the case of a deck with only 2 cards, 3 cards, and 4 cards.

but seeing the pattern is nothing like showing it in the abstract. I wish I had thought a bit longer about why I was seeing that pattern...

nice video!

thoperSought
Автор

Im by no means an expert, but this is not correct, is it? Only the first card has a 1/52 chance of being in the same spot as before. And if the first card is in its correct position, then all subsequent cards have a higher chance, with the probability getting bigger the more of the previous cards are in the correct spot.

Think of a deck with only 2 cards. What is the chance of the first card being in the same position after a re-shuffle? 1/2, I think we can agree. What is the chance of the second card being in the same position? Well, if the first card is in its correct position, then we know the second card also has to be, so 1. These are not independent events. Maybe the difference in the end result when dealing with a 52 card deck is minuscule, but it's not zero. The chance is 1/52 for each card until we reach a card actually in its correct position, then it is 1/51 for each card until we hit the next one that is in its correct position. And so on. So how one would calculate an expectation from that, I dont know, but this is a more accurate representation of reality, is it not? If I am wrong, please explain why.

GroovingPict
Автор

I just guessed 1. Somehow it felt right in my head. I was sure it would be incorrect. One random card could sometimes be in its "right" position but the rest is almost undoubtedly in the wrong place.

TheRealFOSFOR
Автор

I will add this discovery in my next demonstrations.

Felinomania
Автор

An astronomical world inside a small deck of cards. Mind-blowing.

lucaslayton
Автор

I think the most interesting part about this is that the size of the deck has no effect on the answer. Starting from just one card deck you obviously have the expectation of getting one card on the right spot same with two as you have two configurations, from which one has both correct and other has none. And so on.

One was my initial quess and this reasoning was how I "confirmed" it to myself.

PS. really like your content, keep up the good work!

anssi
Автор

I figured this out as soon as I read the thumbnail, then I watched the video expecting to be wrong because it seemed too simple.

Pining_for_the_fjords
Автор

I remember the answer from my discrete structures class, but it was about students and ID cards: The answer is 1.

cryptexify
Автор

Would've been a nice riddle if not for the fact that I had to solve the general case literally today. Please, make more of these videos!

franzluggin
Автор

I'd love to see a follow-up video on what the distribution of E is. I went running to the comments knowing that each X_k is not independent, and many have pointed that out (I love the example of a deck of two cards!). But is it a long tail? How often will you actually have exactly one card in the proper place? How often will you have zero?

ideago
Автор

Correct, but still I was surprised by this result.
(Probably because I had been confusing the problem with another which asks, _what is the probability that randomising a deck moves every card to a new position?_ I believe that the correct answer to that is close to 1/e, where e is the base of the natural logarithm.)
I should add that I think this has been one of your best videos, thank you.

jacksainthill
Автор

It's worth noting, however, that this is only the average result, and not necessarily the most likely one.

The portion of permutations that have 0 cards in their original positions is approximately 1/e, and likewise for the number of permutations with 1 card in their original positions. EXCEPT, because 52 is even, there will actually be 1 more permutation with 0 correct cards than permutations with 1 correct card. This is due to an observable pattern in this sort of problem that I won't go into here.

As such, if you were to make a prediction as to how many cards would be in their original positions in a randomly shuffled deck, you would have a better chance to guess 0 than to guess 1. The difference is negligibly small on this scale, but still very real.

skrdman
Автор

You know these comments are making me think that Mindyourdecisions might want to consider doing a video about how the Linearity of Expectation is true even when the variables aren't independent. In other words the Expected Value of a sum is always the sum of the expected values of the individual variables, it doesn't matter how or if they're related. The proof is actually pretty simple, just a couple of lines that follow directly from the definition of Expected Value.

Bodyknock
Автор

I find it funny that even with two cards, expected number is one even though it can never be one, its either 2 or 0!

zlac
Автор

there are 52Cr x (52-r)! ways for exactly r cards to be in their initial places. Divide each term by 52! for the probability. Multiple each probability by its respective value of r from 1 to 52 and sum them all for the expected number of Cards to still be in the same place.

saxbend
Автор

This problem brings me back to when I took combinatorics and we learned about derangements. Derangements are permutations of sets where none of the elements are in their original position. So using this video's new deck of cards as an example, a derangement would be shuffling the cards and having none of the cards in their correct position. Counting the number of possible shufflings that are derangements is an interesting calculation that involves some recursive formulas. I'm not sure if it's beyond the scope of the intended audience for the channel, but maybe a problem involving derangements would be a good follow-up to this video. :)

Bodyknock