How do I calculate the probability of drawing certain cards from a deck?

87 Views Asked by At

I have a deck of $40$ cards. They are equally numbered one to five. This means that there are $8$ ones, twos, threes, fours and fives. I will draw $5$ cards from the deck.

I want to find the probability that one of those cards is a three.

I want to find the probability that all five of the cards are threes.

How do I do this?

3

There are 3 best solutions below

1
On

The second is easier. How many possible ways are there to pick a group of $5$ cards from a set of $40$? How many of these groups are all threes?

For the first, the answer is $$5\times\frac{8}{40}\times\frac{32}{39}\times\frac{31}{38}\times\frac{30}{37}\times\frac{29}{36}.$$ Can you see how each of these fractions arise?

0
On

There are $5$ cards $3$ and $40$ cards in total.

The probability to get exactly one $3$ is $p = 5\cdot \frac{8\cdot 32 \cdot 31 \cdot 30 \cdot 29 }{40\cdot 39\cdot 38\cdot 37 \cdot 36} $.

The probability to get $5$ $3$ is $p = \frac{8\cdot 7\cdot 6\cdot 5\cdot 4}{40\cdot 39\cdot 38\cdot 37\cdot 36}$.

0
On

Hypergeometric distribution with 8 successes and 32 failures, drawing 5 items without replacement. Let $X$ be the number of successes (3's). [I suppose you are expected to show how to get numerical answers from combinatorial symbols, and to give a rationale for answers. I'll leave the details of that to you.]

From R: Probabilities $P(X = 1), P(X \ge 1), P(X = 5)$ from R, where dhyper is a hypergeometric PDF:

dhyper(1, 8,32, 5)
[1] 0.4371983
1 - dhyper(0, 8,32, 5)
[1] 0.6939612
dhyper(3, 8,32, 5)
[1] 0.04221225

Combinatorial symbols:

$P(X = 1) = \frac{{8\choose 1}{32\choose 4}}{{40\choose 5}}.$

$P(X \ge 1) = 1 - P(X = 1) =1-\frac{{8\choose 0}{32\choose 5}}{{40\choose 5}}.$

$P(X=5) = \frac{{8\choose 5}{32\choose 0}}{{40\choose 5}}.$

Simulation.

With 10 million iterations one can expect two or three place accuracy.

set.seed(1228)
deck = rep(1:5, each = 8)
threes = replicate(10^7, sum(sample(deck, 5)==3))
mean(threes == 1)
[1] 0.4372205
mean(threes >= 1)
[1] 0.6939325
mean(threes==3)
[1] 0.0422606

Bar chart of hypergeometric distribution.

x = 0:3;  PDF = dhyper(x, 8,32, 3)
plot(x, PDF, type="h", lwd=3)
 abline(h=0, col="green2")
 abline(v=0, col="green2")

enter image description here