Hypergeometric Distribution

Hypergeometric Distribution is a discrete distribution best suited for estimating probabilities of card playing. For example, what is the probability distribution of spades in a five-card poker hand? Before getting into the formula, we’ll see how R estimates it.

dhyper(x, m, n, k, log = FALSE)

For zero occurrence of spades after drawing five cards without replacement,
x: number of spades = 0
m: number of spades in the deck = 13
n: number of other cards in the deck = total cards – m = 52- 13 = 39
k: number of cards drawn from the deck = 5

dhyper(0, 13, 39, 5, log = FALSE)

Here is the distribution in a five-hand poker hand.