what is the probability of getting 3 of a kind in poker?

3 of a kind is:
Any three cards of the same rank with two other different cards.

I know the answer it suppose to be 54912/2598960

But how do you get that?

there are 13 ranks from which the 3 cards can come from, plus 2 more from the remaining

no of ways to get 3 cards = 13*C(4,3)
but we need two more cards from the remaining 48 cards or C(48,2)
so no of ways to choose 3 of a kind
= 13*C(4,3)*C(48,2) = 58656

but that would include the cases where the other two cards could be two-of-a-kind with a different rank.
We can't have that or our 3 of a kine would be a full house.
so we have to subtract the number of ways to get a full house which would be
13*C(4,3)*12*C(4,2) = 3744

so the prob of 3 of a kind
= (58656-3744)/C(52,5)
= 54912/2598960
= 3432/162435

To calculate the probability of getting 3 of a kind in poker, we need to consider the number of possible outcomes and the number of favorable outcomes.

1. Determine the number of possible outcomes:
In a standard deck of 52 playing cards, there are 259,8960 different possible combinations of 5-card hands.

2. Determine the number of favorable outcomes:
To have 3 of a kind, we need to select a rank for the three cards (e.g., three aces, three kings, etc.) and select any two other different cards.

- Select a rank: There are 13 ranks (2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K, A) to choose from.
- Select the suit of the three cards: Each rank has 4 suits, so there are 4 choices for each of the three cards. Thus, we have 4 * 4 * 4 = 64 different combinations for selecting the suits of the three cards.
- Select the remaining two cards: After selecting the three of a kind, there are 52 - 3 = 49 cards remaining. We need to choose two cards from these 49, which can be done in (49 choose 2) = 49! / (2! * (49 - 2)!) = 1176 different ways.

3. Calculate the probability:
The probability of getting 3 of a kind is the number of favorable outcomes divided by the number of possible outcomes:
Probability = favorable outcomes / possible outcomes = (13 * 64 * 1176) / 2598960 ≈ 0.02112845138.

Simplifying the fraction (13 * 64 * 1176) / 2598960 gives the answer 54912 / 2598960, which is approximately 0.0211 or 2.11%.