# Probability (2 Standard Deck of Cards)

Please if anyone of you could figure out where am I going wrong with this question. I have figured out part (a). Please correct me if wrong.

Q. You have two standard 52 card decks of cards that have been shuffled randomly. You turn over the top card from the first deck and the top card from the second deck. (a) What is the probability that the 2 cards match? (b) You keep turning over the top card on each deck until you have gone through the deck. How many matches do you expect to find?

My understanding is as follows.

(a) The draw from the first card does not matter as we need to find that card from second deck. So let's suppose in the first draw from deck 1 we got 10D, then the probability of it appearing in the deck is 1/52. So I think the answer to part is (a) 1/52.

Moving on to part (b), now there are 51 cards left in deck 1 and the probability of choosing from deck 1 is again not important. So the probability that the cards will match will be 1/51 and then it keeps going on until the end.

Please if anyone of you could correct whether I am right or not.

Many thanks.

• Yes, the answer to part one is $\frac 1{52}$. For the expectation, Indicator variables work well (you have already done the key calculation).
– lulu
Nov 30 '17 at 18:15
• Note: your initial approach to part $b$ does not look right. The probability that round $2$ is a match depends on whether or not round $1$ was. Happily, this dependence has no bearing on the expectation.
– lulu
Nov 30 '17 at 18:16
• For part (b), consider the linearity of expectation. Then further notice that the probability that the $k$'th cards match not conditioned on previous matches is also $\frac{1}{52}$. Nov 30 '17 at 18:33

For the second part you can use derangements. Assume that the first deck is our "ordered" deck. Now we there are $!n = \left[ \frac{n!}{e} \right]$ shuffles in which you will get no match. Now fix $1$ card in the right order and there are $!(n-1) =\left[ \frac{(n-1)!}{e} \right]$ ways to shuffle the others so there's no other match. So there are $n \cdot !(n-1)$ shuffles with exactly one match. Similarly we obtain that there are $\binom{n}{k} \cdot !(n-k)$ shuffles with exactly $k$ matches.

So the probability of getting $k$ matches is $\frac{ \binom{n}{k}\cdot !(n-k)}{n!}$. Summing over all $52$ possibilites to get the expected value is really time consuming, but we can get a nice approximation. We know that $\lim_{n \to \infty} \frac{!n}{n!} = e^{-1}$, so $\frac{!n}{n!} \approx e^{-1}$. Now:

$$\frac{ \binom{n}{k} \cdot !(n-k)}{n!} \approx \frac{1}{k!\cdot e}$$

Summing all over value we get:

$$E = \sum_{k=1}^{52} k \cdot \frac{ \binom{n}{k}\cdot !(n-k)}{n!} \approx \frac 1e \sum_{k=0}^{51} \frac{1}{k!} \approx \frac ee = 1$$

• You have $\approx$ symbols appearing many places. Rather than saying that it is approximately equal to $1$ and rather than approaching with derangements, linearity of expectation gives a very short one-line proof for why the expectation is exactly equal to one. Nov 30 '17 at 18:56
• @JMoravitz I've noticed your comment, but unfortunately I didn't noticed that on my own. Nov 30 '17 at 18:58
As mentioned in comments, one can recognize that the probability that the $k$'th cards match is $\frac{1}{52}$.
(To do this, one may recognize that you could simply remove the top $k-1$ cards of each deck without looking at them before checking each card. If that is unsatisfying, then you may be more formal about it by defining a sample space and forming a bijection between the set of outcomes where the first cards of each deck match and the set of outcomes where the $k$'th cards of each deck match)
Letting $X_k$ be the indicator random variable taking value $1$ if the $k$'th cards match and taking the value $0$ otherwise, we recognize that $X=X_1+X_2+\dots+X_{52}$ is the random variable counting the number of total matches across each deck.
$$E[X]=E[X_1+X_2+\dots+X_{52}]=E[X_1]+E[X_2]+\dots+E[X_{52}]=\frac{1}{52}+\frac{1}{52}+\dots+\frac{1}{52}=1$$