To calculate the probability of getting a flush in a 5-card poker hand, we need to first determine the total number of ways to get a flush, and then divide that by the total number of possible 5-card poker hands.
A flush consists of 5 cards of the same suit. There are 4 suits in a standard deck of 52 cards: clubs, diamonds, hearts, and spades. Within each suit, there are 13 cards (A, 2, 3, ... 10, J, Q, K). So, to get a flush, you need to choose 5 cards from a specific suit.
The number of ways to choose 5 cards from 13 cards (the combinations) can be calculated using the binomial coefficient formula:
$$C(n, k) = \frac{n!}{k!(n-k)!}$$
where n! (read as n factorial) denotes the product of all positive integers up to n, and C(n, k) represents the number of combinations of choosing k elements from a set of n elements.
In our case, we’re choosing 5 cards from a specific suit with 13 cards:
$$C(13, 5) = \frac{13!}{5!(13-5)!}$$
Calculate the value:
$$C(13, 5) = \frac{13!}{5!8!} = \frac{13\times12\times11\times10\times9}{5\times4\times3\times2\times1} = 1287$$
Since there are 4 suits, there are a total of 4 × 1287 = 5148 ways to get a flush.
Now we need to find out the total possible 5-card poker hands we can have from a 52-card deck. This is again calculated using the binomial coefficient formula. This time, we’re choosing any 5 cards from the deck, with 52 cards:
$$C(52, 5) = \frac{52!}{5!(52-5)!}$$
Calculate the value:
$$C(52, 5) = \frac{52!}{5!47!} = \frac{52\times51\times50\times49\times48}{5\times4\times3\times2\times1} = 2,598,960$$
Finally, divide the number of ways to get a flush by the total number of possible 5-card poker hands:
$$P(\text{flush}) = \frac{\text{number of flush hands}}{\text{total possible 5-card hands}} = \frac{5148}{2,598,960}$$
Approximate the value:
P(flush) ≈ 0.00198
So, the probability of getting a flush in a 5-card poker hand from a standard 52-card deck is approximately 0.00198, or about 0.198%.