Determine the probability of each of the following types of poker hands

a. Two pairs (two cards of one denomination, two cards of a different denomination, and one card of a denomination other than those two denominations)

b. One pair (two cards of one denomination and three cards of distinct denomination, where each of the three cards has a different denomination than that of the pair)

To determine the probability of each type of poker hand, we need to calculate the total number of possible hands and the number of hands that meet the criteria for each type of hand.

a. Two pairs:
A two-pair hand consists of two cards of one denomination, two cards of a different denomination, and one card of another denomination. To calculate the probability, we divide the number of possible two-pair hands by the total number of possible hands.

To calculate the total number of possible hands, we consider that a standard deck of cards has 52 cards. From this deck, we need to choose 5 cards for our hand. Therefore, the total number of possible hands (C) is given by the combination formula:

C = nCr(52, 5) = 52! / (5!(52-5)!) = 2,598,960

Now, let's calculate the number of possible two-pair hands. To have two pairs, we need to consider two denominations out of the 13 available (A, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K). We can choose any two of these denominations in C(13, 2) ways. For each pair, there are four cards of that denomination in the deck, so we choose two cards from each of the chosen denominations in C(4, 2) ways. Finally, we select one card of any denomination that is different from the pair denominations in C(44, 1) ways.

The total number of two-pair hands (TP) is given by:
TP = C(13, 2) * C(4, 2) * C(4, 2) * C(44, 1)

Therefore, the probability (P) of getting a two-pair hand is:
P = TP / C

b. One pair:
A one-pair hand consists of two cards of one denomination and three cards of distinct denominations. As before, we calculate the probability by dividing the number of possible one-pair hands by the total number of possible hands.

To calculate the total number of possible hands (C), we use the same formula as before:
C = nCr(52, 5) = 2,598,960

Now, let's calculate the number of possible one-pair hands. We consider choosing one denomination out of the 13 available in C(13, 1) ways. For the chosen denomination, we select two cards in C(4, 2) ways. For the remaining three cards, we choose three distinct denominations from the 12 remaining denominations in C(12, 3) ways. For each of these three distinct denominations, we select one card in C(4, 1) ways.

The total number of one-pair hands (OP) is given by:
OP = C(13, 1) * C(4, 2) * C(12, 3) * C(4, 1)^3

Therefore, the probability (P) of getting a one-pair hand is:
P = OP / C

By calculating these probabilities, you can determine the likelihood of getting each type of hand in poker.