1
$\begingroup$

I'm working on a programming puzzle/challenge for fun, and had a question about whether or not two approaches for doing random selection are equivalent.

Lets say I have a class Deck which contains initially a collection of 52 cards. Then I have a class Shoe which holds a collection of Deck.

Would the following approaches be statistically equivalent?

Approach 1: Select a random Deck in Shoe. Then from selected deck, select a random card.

Approach 2: Pull all the cards from all the Decks in Shoe into a single collection, and randomly select a Card from that collection?

In use, the selection would be done many times, with the selected card being removed from the Deck / Shoe.

$\endgroup$
1
  • 2
    $\begingroup$ In thinking about this, I'm fairly certain they are not equivalent. If I somehow had a Shoe with 10 Decks, and one of those Deck had exactly one Card, but the rest had say 50 Cards, approach 1 would yield a 1/10 probability of selecting the single card in the small Deck vs approach 2's probability of 1/501. $\endgroup$
    – DaveH
    Commented May 7, 2014 at 17:33

1 Answer 1

1
$\begingroup$

They are equivalent for the first card drawn but not for the second or later cards until you replace the drawn cards.

As an example consider two $52$-card decks and the probability that the first two cards drawn are both the Ace of Spades:

  1. The probability the first card drawn is an Ace of Spades is $\frac1{52}$. The conditional probability that the second card is also an Ace of Spades is $\frac{1}{2} \times 0 +\frac{1}{2} \times \frac{1}{52} = \frac{1}{104}$. So the probability of a pair of Aces of Spades is $\frac{1}{5408}$.

  2. The probability the first card drawn is an Ace of Spades is $\frac1{52}$. The conditional probability that the second card is also an Ace of Spades is $\frac{1}{103}$. So the probability of a pair of Aces of Spades is $\frac{1}{5356}$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.