[Math] Expected value of adjacent pairs in a deck of 52

discrete mathematicsprobabilityrandom variables

I am having trouble wrapping this around my head. I believe that using an indicator random variable would be the best approach. Let N be the number of adjacent pairs. The probability of an adjacent pair would be 3/51. Given that the first card is a set value, the probability of the card to its right being the same value would be 3/51. So then E[I]=3/51.

I would like to believe that E[N] would equal=(3/51)*26. My thinking is that the deck of cards is set in a format of ABABABAB. The value of A is the key card. The value of B is the card that must match A. So if A were to be the King of Spades, but B were the Queen of diamonds, that pair would not be counted along with the other lonesome King card that should've been with the King of Spades.

That is why if one King card indicates that it is not a pair, the other king is automatically discarded as a potential pair. This is done with all cards so that is why you multiply it by 26. This is just my thinking, but can someone give me some guidance?

Edit: Typo

Best Answer

Line the cards up. Number the $51$ gaps between the cards. Let the random variable $X_i$ be $0$ if the two cards on either side of the $i$th gap have different value, and $1$ if they are the same. Then we are after the expected value of $\sum_i X_i$, which by linearity of expectation is equal to $\sum_iE(X_i)$. Since each $X_i$ has expectation $\frac3{51}$, you have your answer there.

Note: this counts three-of-a-kind as two pairs (the two gaps between the three cards both have equal-value cards), and four-of-a-kind as three pairs. If you want it to count differently, you need to slightly adjust the definitions of the $X_i$ in order to take that into account. Note that (depending on how you do it) $X_1$ in that case might have a slightly different expectation from the rest. The idea of exploiting linearity of expectation to avoid having to take nasty interactions into account still stands, though.

Related Question