# Expected number of matches when two shuffled rows of $52$ playing cards are lined up

Completely shuffle and then lay out a full deck of 52 cards in a single row (i.e. single row 52 columns). Do the same thing with a second deck of playing cards and place this deck in the second row(also has 52 columns). What is the expected total number of matches in all the columns?

A match means that the top card and the bottom card in the column are the same (same rank and suit).

I was trying to solve it by brute force but seems like it’s not that easy to me.

#### Solutions Collecting From Web of "Expected number of matches when two shuffled rows of $52$ playing cards are lined up"

For $i=1$ to $52$, let $X_i=1$ if the cards in column $i$ match, and let $X_i=0$ otherwise.

Then the number $Y$ of matches is given by $Y=X_1+X_2+\cdots+X_{52}$. It follows by the linearity of expectation that
$$E(Y)=E(X_1)+E(X_2)+\cdots +E(X_{52}).$$
I expect you can find $E(X_i)$.

Remark: One could find the distribution of the number of matches. However, that is a much more complicated path to the expectation. The method of indicator random variables can be very useful.