# What is expected number of cards drawn when a card is chosen from a 52 deck and game ends on picking a heart?

I need help going about solving this problem:

Suppose a card game is played using a standard 52 card deck. Drawing a heart ends the game. Drawing anything other than a heart continues the game. There is no replacement of the drawn card back into the deck.

What is the expected number of cards drawn before the game ends (i.e when a heart is chosen)?

For the 39 non-hearts, define $A_i,\, 1\leq i\leq 39$ to be the event that card $i$ appears before all the hearts. The number of draws until we get the first heart is $X=1+\sum_{i=1}^{39} 1_{A_i}$, and since $\mathbb{P}(A_i)=1/14$ we get $$\mbox{average number of draws} =\mathbb{E}(X)=1+\sum_i \mathbb{P}(A_i)=53/14\approx 3.79.$$

Here is a hint/half-solution: Let $X$ be the random number of cards drawn including the first occurrence of a heart. Then we want $${\rm E}[X] = \sum_{k=1}^{40} k \Pr[X = k].$$ What is $\Pr[X = k]$? This is the probability that the first $k-1$ cards drawn are not hearts, and the $k^{\rm th}$ card is a heart. We see that in order to get $k-1$ non-hearts, the probability is $1$ if $k = 1$, and $$\frac{39}{52} \cdot \frac{38}{51} \cdot \ldots \cdot \frac{39-k+2}{52-k+2}$$ if $k > 1$. Then, to get the final heart given that the previous $k-1$ cards were not hearts, the probability is $\frac{13}{52-k+1}$. Since you did not show your own efforts to solve this question, I will not provide a complete solution.

For $1 \leq i \leq 52$, let $X_i$ denote the random variable which is $1$ if card $i$ is drawn and $0$ otherwise. The total number of cards drawn is $\sum_{i=1}^{52}X_i$. Then $E[\sum_{i = 1}^{52}X_i] = \sum_{i =1}^{52}E[X_i] = \sum_{i = 1}^{52}P[X_i = 1]$. $X_i = 1$ if and only if all the cards previous to $i$ were not hearts. The probability of this is given by:

$$P[X_i = 1] = \frac{\binom{52 - (i - 1)}{13}}{\binom{52}{13}}$$

The numerator is the number of ways of arranging the 13 hearts among the cards not previous to card $i$, and the denominator is the total number of ways of arranging the hearts. So the answer is:

$$E = \sum_{i = 1}^{52} \frac{\binom{52 - (i - 1)}{13}}{\binom{52}{13}}$$

This can be simplified considerably. First of all, notice that the maximum value of $i$ for the term to be nonzero is $40$ (since we need $52 - (i - 1) \geq 13$). Re-index the sum so it goes in the opposite direction, ie let $j = 40 - i$:

$$E = \frac{1}{\binom{52}{13}}\sum_{j = 0}^{39} \binom{13 + j}{13}$$

Now we can use the so-called 'hockey stick identity' (which comes from how it looks in Pascal's triangle):

$$\sum_{j = 0}^k \binom{n + j}{n} = \binom{n + k + 1}{n + 1}$$

And we get:

$$E = \frac{1}{\binom{52}{13}}\cdot \binom{53}{14} = \frac{53! \cdot 13! \cdot 39!}{12! \cdot 14! \cdot 39!} = \frac{53}{14}$$

So the answer is simply $\frac{53}{14}$.

In fact, if you have $N$ cards, $r$ of which are hearts, then the expected number of cards you draw before you draw a heart is given by the formula: $E(N,r) = \frac{N + 1}{r + 1}$. This formula is easy to prove by induction, but I do not see a slick way of deriving this formula from scratch.