3
$\begingroup$

For practice, I decided to invent a variation on the problem of the expected number of cards to be drawn until the first ace is found. I would appreciate some feedback and clarification on certain details of my solution, which I describe at the end.

Problem: Given a deck of $52$ standard playing cards, what is the expected value of the highest card seen before drawing the first ace? (Where we set $J = 11, Q = 12, K = 13$, and we say that the value is $0$ if the first card is an ace.)

Solution: Let $H$ be the random variable corresponding to the value of the highest card. We note that the four aces divide the deck into five "boxes". Then, we may observe that:

$$\mathbb{P}(H \le n) = \mathbb{P}( \text{no card of value >} n \text{ is before the first } A )$$

For brevity, I will write this as $\mathbb{P}(S_n)$. We can imagine any permutation of the deck (ignoring permutation of the aces) as inserting cards into the gaps in between previously placed cards (including the aces).

Then, by considering this framing:

$$\mathbb{P}(S_n) = \prod_{k=0}^{4(13-n)-1} \mathbb{P}(\text{highest } (k+1) \text{ cards placed after } A \; | \text{ highest } k \text{ cards placed after } A)$$

$$ = \prod_{k=0}^{4(13-n)-1} \frac{4+k}{5+k} = \frac{4}{4(14-n)} = \frac{1}{14-n}$$

Then, noting that $\mathbb{P}(H = n) = \mathbb{P}(S_n) - \mathbb{P}(S_{n-1})$,

$$\mathbb{E}[H] = \sum_{n=2}^{13} n \bigg(\frac{1}{14-n} - \frac{1}{15-n}\bigg) \approx 10.74$$


Questions

  1. Why is the probability space above is equivalent to the uniform distribution on all shuffled decks? It seems obvious, but is there a way to justify it more rigorously?
  2. Why can we ignore the order of the cards when we insert them in the way described above?

The second question in particular may seem inane, but it's still quite difficult for me to determine if and when it's necessary to account for permutations, and I would appreciate an intuitive explanation if there is one.

$\endgroup$
9
  • $\begingroup$ "We can imagine any permutation of the deck": $52!$ ways. "We can imagine any permutation of the deck (ignoring permutation of the aces)": $52!/4!$ ways, though the earlier number may be easier to handle $\endgroup$
    – Henry
    Commented Sep 18, 2023 at 9:26
  • 3
    $\begingroup$ The probability that an ace is the first card is $\frac4{52}$, which is not really negligible. But you can ask for the conditional expected value of the highest card before first ace given that the first card is not an ace. $\endgroup$
    – Henry
    Commented Sep 18, 2023 at 9:28
  • $\begingroup$ @Henry I thought the impact of the event would further be deprecated by the weighting of the expected value, but in hindsight it does have an effect of order $1 \times 10^{-1}$. If we say that the highest card before $A$ has value $0$ if it doesn't exist factor it in, we get $\mathbb{P}(H \le 2) = \mathbb{P}(H = 2) - \mathbb{P}(H = 0)$ so we would need to subtract $\frac{2}{13}$ from the final expected value. Bizzarely enough, it seems the original solution already accounted for this unintentionally. $\endgroup$ Commented Sep 18, 2023 at 12:56
  • 1
    $\begingroup$ I have some doubts with your result. If we consider a smaller game, only 12 cards, only aces and 2 and 3, I adapt your formula, and I obtain 1.8333 which is obviously wrong. $\endgroup$
    – Lourrran
    Commented Sep 18, 2023 at 13:08
  • 1
    $\begingroup$ The solution does allow for the first card to be an ace. Indeed, you calculate $\Bbb{P}(S_n)$ correctly, but you seem to have forgotten that $\sum_{j\leq 1}\Bbb{P}(S_j)$ is $\frac{1}{13}$, and should be interpreted as the probability that the first card is an ace. As these have weight $0$ in the sum implicitly, you adjust the average correctly. This also explains your answer @Lourrran, you get the correct result when allowing the ace to be the first card. $\endgroup$ Commented Sep 18, 2023 at 14:48

1 Answer 1

2
$\begingroup$

I am not sure how to answer your second question, but my answer to your first question might be sufficient.

For Question 1, it seems to me that you are asking how to derive the equation $$ \mathbb P(\text{highest $k+1$ cards after $1^\text{st}$ A}\mid \text{highest $k$ cards after $1^\text{st}$ A})=\frac{4+k}{5+k}, $$ directly from the fact that all $52!$ orderings of the deck are equally likely.

Let $E_k$ be the event that the highest $k$ cards come after the first ace. Let $S_k$ be the set of $4+k$ cards consisting of the first $k$ high cards and the four aces. Using the Theorem below, all of the $(4+k)!$ orderings of the cards in $S_k$ that result when you delete the cards not in $S_k$ are equally likely, so each must occur with probability $1/(4+k)!$. Of these orderings, there are exactly $4\cdot (4+k-1)!$ orderings where the first cards is an ace (four choices for the first ace, $(4+k-1)!$ ways to arrange the remaining cards). Therefore, the probability of $E_k$ is $$ 4\cdot (4+k-1)!\times \frac{1}{(4+k)!}=\frac{4}{4+k} $$ You then immediately conclude that $$ P(E_{k+1}\mid E_k)=\frac{4/(5+k)}{4/(4+k)}=\frac{4+k}{5+k}. $$

Theorem: Let $S$ be a nonempty subset of $\{1,\dots,n\}$. When you shuffle a deck of $n$ cards, and delete every card in the ordering which is not a member of $S$, then every permutation of the cards in $S$ is equally likely.

Proof: Repeatedly apply the Lemma.

Lemma: Let $\mathbb U_n$ be the uniform distribution on all $n!$ ways to shuffle a deck of $n$ cards, numbered $1$ to $n$.
Let $\mathbb U_n'$ be the distribution obtained by shuffling a deck of $n+1$ cards numbered $1$ to $n+1$, and then deleting card number $n+1$.
Then $\mathbb U_n=\mathbb U_n'$.

Proof: Let $\pi$ be a particular ordering of the $n$ cards. The probability of $\pi$ with respect to $\mathbb U_n$ is $1/n!$, so we just need to show the the probability of $\pi$ with respect to $\mathbb U_n'$ is also $1/n!$. If $\pi=(\pi_1,\pi_2,\dots,\pi_n)$, there are exactly $n+1$ permutations of the deck of $n+1$ cards which will become $\pi$ when $n+1$ is deleted. Namely, they are $$ (n+1,\pi_1,\dots,\pi_n)\\ (\pi_1,n+1,\dots,\pi_n)\\ \vdots\\ (\pi_1,\dots,\pi_n,n+1)\\ $$ When you uniformly shuffle an $(n+1)$ card deck, the probability of each of these is $1/(n+1)!$. Therefore, the probability $\pi$ occurring in the $\mathbb U_n'$ distribution is $(n+1)/(n+1)!=1/n!$. $\square$

$\endgroup$
3
  • $\begingroup$ Thanks for the answer, Mike. I think you've given a different and simpler approach to finding $\mathbb{P}(S_n)$ (for my def. of $S_n$) for which it's clearer that the reasoning valid, which has definitely helped. Intuitively, it feels like conditional probability is a sort of quotient (well, I guess, mathematically it is that also) by "irrelevant considerations" and the second question is roughly "How can I be sure about what exactly has been quotiented out?" -- a more general confusion which is probably best solved by myself getting more practice. Thanks again. $\endgroup$ Commented Sep 18, 2023 at 19:48
  • 1
    $\begingroup$ @legionwhale I think the topic in your comment is one of the hardest parts of probability. With the way you are practicing, I am sure you will improve. You are doing great already :) $\endgroup$ Commented Sep 19, 2023 at 1:40
  • $\begingroup$ Thank you. I appreciate the kind words. $\endgroup$ Commented Sep 20, 2023 at 18:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .