# Expected number of cards you should turn before finding an ace

NOTE: I want to check my solution only

Same question here

The question is this:

Shuffle an ordinary deck of 52 playing cards containing four aces. Then turn up the cards from the top until the first ace appears. On the average how many cards are required to be turned before producing the first ace ?

I want to check my solution.It definitely matches with the answers in that other question but I don't understand their solutions(haven't done much study on probability yet). I want to check mine:

We consider all the cards except the aces indistinguishable,and we will consider the aces to be indistinguishable.Now a deck is just a binary string with $$48$$ $$C$$ and $$4$$ $$A$$ ($$A$$ stands for aces and $$C$$ stands for the other cards.Obviously,the number of such strings is $$\dbinom{52}{4}$$. Now we divide into cases:

1)Number of strings with the first A in the $$1$$st position:$$\dbinom{51}{3}$$

2)Number of strings with the first A in the $$2$$nd position:$$\dbinom{50}{3}$$

  .

.

.

1. Number of strings with the first A in the $$49$$th position:$$\dbinom{3}{3}$$

Since there are $$4$$ A's,the first $$A$$ cannot be in the $$50$$th position.

Note that for case $$1$$ above,we need to turn $$0$$ cards before getting an ace.For case $$2$$,we need to turn $$1$$ card before getting an ace,...,in the $$49$$th case,we need to turn $$48$$ cards before getting an ace.Therefore,the average of it all is:

$$\dfrac{48\dbinom{3}{3}+47\dbinom{4}{3}+....+0\dbinom{51}{3}}{\dbinom{52}{4}} =\dfrac{\dbinom{52}{5}}{\dbinom{52}{4}} =\dfrac{48}{5}$$

which is indeed the answer given there.Note that the numerator was computed by repeated application of the hockey stick identity.My questions are :

1. Is my solution correct?

2. Why does assuming indistinguishability still preserve the answer?I have seen this several times,but never really thought about it.

3. If we assumed distinguishability of the cards,we will get a huge expression. How can we compute that?

The probability that the seven of clubs turns up before the first ace is $$\frac15.$$ This is because each of the five relevant cards (the four aces and the seven of clubs) has the same one-in-five chance of being first.

Likewise, the probability that the jack of diamonds turns up before the first ace is $$\frac15,$$ and the same goes for the queen of hearts, the four of spades, and every other non-ace card in the deck. Since there are $$48$$ non-ace cards, the average number of (non-ace) cards preceding the first ace is $$48\cdot\frac15.$$

P.S. This answer assumes that "before producing the first ace" means that the turn on which the ace itself comes up is not counted; otherwise add $$1$$.

• This is a really nice solution. Oct 27, 2018 at 16:34
• @saulspatz its wrong though Dec 21, 2022 at 9:02
• @FarazGerrardJamal No, it's correct. The people who are saying 10.6 are including the Ace itself. It's hard to see how the first Ace is turned before the first Ace. Dec 21, 2022 at 17:13
• @saulspatz That's how I read it but I see how it could be read either way.
– bof
Dec 21, 2022 at 18:18
• @Titti No, I am making direct use of the fact that "the expectation of the sum is the sum of the expectations" (linearity), which can also be used to shop that $np$ is the expectation of a binomial. We do not have a binomial distribution here because the events "the seven of clubes precedes the first ace", "the jack of diamonds precedes the first ace", etc. are not independent.
– bof
Aug 12, 2023 at 0:33

Imagine you have the following setup:

_A1_A2_A3_A4_

Each ace separated out evenly and we are interested in the pile that's before A1. For a standard deck of cards you have 52 cards - 4 aces = 48 cards left, and $$\frac {48} 5 = 9.6$$ cards for each pile. So basically you would have to turn all 9.6 cards + the A1 card in order to see the first ace. So the answer is $$1 + \frac{48} {5} = 10.6$$

• This seems like a really clever approach, but doesn't this rely on an equal number of cards in each _ partition (in this case, 9.6 cards)? I'm having trouble making the connection with why this works. I guess my question is this approach seems to assume that the layout of the card is deterministic with respect to the positions of $A_1,A_2,A_3,A_4$.
– 24n8
May 3, 2020 at 21:03
• @24n8 This is really a symmetry argument with linearity of expectation. If $X_0, \ldots, X_4$ are random variables such that $X_i$ is the number of cards between $i$-th and $i+1$st Ace, then $E(X_0+\cdots+X_4) = 48,$ since $X_0+\cdots+X_4 = 48$ is constant, equal to total non-Aces. Now argue that all the $E(X_i)$ are equal by a symmetry/swapping argument. For example, to show $E(X_0) = E(X_1),$ if we have a permutation $\sigma = B_0 A_1 B_1 A_2 B_2 A_3 B_3 A_4 B_4$ where $B_i$ are sequences of non-Aces, then consider $\sigma' = B_1 A_1 B_0 A_2 B_2 A_3 B_3 A_4 B_4$ which is equally likely.
– Roy
Aug 6, 2023 at 5:39

Another way to do this with sums:

Suppose we draw all the cards in the deck. Let $$k$$ denote the place at which the first Ace appears. Note that $$k$$ can take integer values from $$1 - 49$$, because there must be at least $$3$$ other open spots for the other three Aces that will be drawn. We count the number of deals where the first Ace is in the $$k^{th}$$ spot as follows:

1. If we fix the first Ace is at the $$k^{th}$$ spot in the deal, then the other $$3$$ Aces must occur after the $$k^{th}$$ spot in the deal. This means there are $$52 - k$$ spots these Aces can occur, and thus $$\binom{52 - k}{3}$$ places orderings for this aces in the deal IGNORING suit.
2. To take in account suit, we multiply by $$4!$$ to account for all the permutations of the four suits of the aces.
3. Now that we accounted for the aces, we just need to consider all the other 48 cards left. For each ordering of the aces, there are $$48!$$ different ordering of the other cards in the remaining $$48$$ slots of the deal. We multiply again by $$48!$$ to account for this.
4. With that information, we know that since there are $$52!$$ total deals of the cards, meaning that the probability of getting the configuration with the first ace in the $$k^{th}$$ slot of the deal is: $$\frac{\binom{52 - k}{3} \times 4! \times 48!}{52!}$$
5. Since expectation is just the sum $$\sum{n * Prob(n)}$$ where $$n$$ is just the number of cards until we draw the first Ace (including the Ace), we can just take the sum $$\sum_{n = 1}^{49}{n \times \frac{\binom{52 - k}{3} \times 4! \times 48!}{52!}} = \frac{1}{52*51*50*49}\sum_{n = 1}^{49}{\frac{n \times 4! \times (52 - n)!}{3! \times (49-n)!}} = \frac{1}{52*51*50*49}\sum_{n = 1}^{49}{4 \times n \times (52 - n)(51 - n)(50 - n)} = 10.6$$

I propose really basic approach which turns out to give really complicated algebra.

Let $X_i = \{Ace,\ Other\}$ be the card drawn at round $i$. We are interested in the quantity $Pr[X_i = Ace \wedge X_j = Other,\ 1 \leq j < i]$ which is the probability that we get the first ace at round $i$.

First we define for $i \in \mathbb{N}$: $$f(i) = \begin{cases} Pr[X_i = Other | X_j = Other,\ 1 \leq j < i] = \frac{48-i+1}{52-i+1} & \text{if } i > 1 \\ Pr[X_1 = Other] = \frac{48}{52} & \text{if } i = 1 \end{cases}$$ Note that $Pr[X_i = Ace | X_j = Other,\ 1 \leq j < i] = 1-f(i)$

Then using the fact $Pr[A \wedge B] = Pr[A|B]\cdot Pr[B]$ we can compute : \begin{align} &Pr[X_i = Ace \wedge X_j = Other,\ 1 \leq j < i] = \\ &Pr[X_i = Ace | X_j = Other,\ 1 \leq j < i] \cdot Pr[ X_j = Other,\ 1 \leq j < i] =& \\ &Pr[X_i = Ace | X_j = Other,\ 1 \leq j < i] \cdot Pr[ X_{i-1} = Other | X_j = Other, \ 1 \leq j < i-1] \cdot Pr[X_j = Other, \ 1 \leq j < i-1]... \end{align}

Continuing to apply the fact in chain we get that : $$Pr[X_i = Ace \wedge X_j = Other,\ 1 \leq j < i] = (1-f(i)) \cdot \prod_{j=1}^{i-1} f(j) = \\(1-\frac{49-i}{53-i}) \cdot \frac{(i-53)(i-52)(i-51)(i-50)}{52\cdot51\cdot50\cdot49} = -\frac{4(i-52)(i-51)(i-50)}{52\cdot51\cdot50\cdot49}$$ Now taking the expectation and using some Mathematica because of laziness we can get : $$\sum_{i=1}^{52}-i \cdot\frac{4(i-52)(i-51)(i-50)}{52\cdot51\cdot50\cdot49} = 53/5$$ So on average you will get the first ace at card number $10.6$ !