The probability of four of a kind in poker with wild cards

pokerprobabilitysolution-verification

Below is a problem I made up and did.

Problem:

Suppose that we have a standard poker deck and we add $2$ cards to it. These two cards added
are jokers and are considered wild cards. What is the probability of getting exactly
$4$ of a kind in a poker hand drawn from this deck? A hand consisting of
$3$ aces, $1$ king and $1$ joker counts as $4$ of a kind. A hand consisting of
$3$ aces and $2$ jokers does not counts as $4$ of a kind.
Answer:
Let $p$ be the probability we seek. There are $54 \choose 5$ ways of selecting $5$ cards from this deck. We can get $4$ of a kind with $0$ wild cards, $1$ wild card or $2$ wild cards. Let
$p_0$ be the probability that we get $4$ of a kind without any wild cards. Let
$p_1$ be the probability that we get $4$ of a kind with exactly $1$ wild card. Let
$p_2$ be the probability that we get $4$ of a kind with exactly $2$ wild cards.
\begin{align*}
p &= p_0 + p_1 + p_2 \\
p_0 &= \dfrac{ 13 { 4 \choose 4 }(48) } { {{54} \choose 5} } \\
p_0 &= \dfrac{ 13 (48) } { {{54} \choose 5} } \\
p_1 &= \dfrac{ 13 { 4 \choose 3 }(48)(2) } { {{54} \choose 5} } \\
{ 4 \choose 3 } &= 4 \\
p_1 &= \dfrac{ 13 (4)(48)(2) } { {{54} \choose 5} } \\
p_2 &= \dfrac{ 13(48)(47){ {4} \choose {2} }(2)(1) } { {{54} \choose 5} } \\
{ 4 \choose 3 } &= \dfrac{ 4(3) } {2} = 6 \\
p_2 &= \dfrac{ 13(48)(47)(6)(2)(1) } { {{54} \choose 5} } \\
\end{align*}

Now we can find $p$.
\begin{align*}
p &= \dfrac{ 13(48) + 13 (4)(48)(2) + 13(48)(47)(6)(2)(1) } { {{54} \choose 5} } \\
p &= \dfrac{ 13(48) ( 1 + (4)(2) + (47)(6)(2)(1)) } { {{54} \choose 5} } \\
p &= \dfrac{ 13(48) ( 9 + (47)(6)(2)) } { {{54} \choose 5} } \\
p &= \dfrac{ 13(48) ( 9 + 564) } { {{54} \choose 5} } \\
p &= \dfrac{ 13(48) ( 573) } { {{54} \choose 5} } \\
{{54} \choose 5} &= \dfrac{ 54(53)(52)(51)(50) }{5(4)(3)(2) } \\
{{54} \choose 5} &= \dfrac{ 54(53)(52)(51)(10) }{4(3)(2) } \\
{{54} \choose 5} &= \dfrac{ 54(53)(52)(51)(5) }{4(3) } \\
{{54} \choose 5} &= \dfrac{ 54(53)(13)(51)(5) }{ 3 } \\
{{54} \choose 5} &= 54(53)(13)(17)(5) \\
p &= \dfrac{ 13(48) ( 573) } { 54(53)(13)(17)(5) } \\
p &= \dfrac{ 13(8) ( 573) } { 9(53)(13)(17)(5) } \\
p &= \dfrac{ 8 ( 573) } { 9(53)(17)(5) } \\
p &= \dfrac{ 4584 } { 40545 }
\end{align*}

Is my solution right? It seems a bit high to me.

Here is an updated solution.

Let $p$ be the probability we seek. There are $54 \choose 5$ ways of selecting $5$ cards from this deck. We can get $4$ of a kind with $0$ wild cards, $1$ wild card or $2$ wild cards. Let
$p_0$ be the probability that we get $4$ of a kind without any wild cards. Let
$p_1$ be the probability that we get $4$ of a kind with exactly $1$ wild card. Let
$p_2$ be the probability that we get $4$ of a kind with exactly $2$ wild cards. \
\begin{align*}
p &= p_0 + p_1 + p_2 \\
p_0 &= \dfrac{ 13 { 4 \choose 4 }(48) } { {{54} \choose 5} } \\
p_0 &= \dfrac{ 13 (48) } { {{54} \choose 5} } \\
p_1 &= \dfrac{ 13 { 4 \choose 3 }(48)(2) } { {{54} \choose 5} } \\
{ 4 \choose 3 } &= 4 \\
p_1 &= \dfrac{ 13 (4)(48)(2) } { {{54} \choose 5} } \\
p_2 &= \dfrac{ 13{ {4} \choose {2} } 48 { {2} \choose {2} } } { {{54} \choose 5} } \\
{ 4 \choose 2 } &= \dfrac{ 4(3) } {2} = 6 \\
p_2 &= \dfrac{ 13(6)(48) } { {{54} \choose 5} } \\
\end{align*}

Now we can find $p$.
\begin{align*}
p &= \dfrac{ 13(48) + 13 (4)(48)(2) + 13(6)(48) } { {{54} \choose 5} } \\
p &= \dfrac{ 13(48) ( 1 + (4)(2) + 6) } { {{54} \choose 5} } \\
p &= \dfrac{ 13(48) ( 15) } { {{54} \choose 5} } \\
p &= \dfrac{ 9360 } { {{54} \choose 5} } \\
{{54} \choose 5} &= \dfrac{ 54(53)(52)(51)(50) }{5(4)(3)(2) } \\
{{54} \choose 5} &= \dfrac{ 54(53)(52)(51)(10) }{4(3)(2) } \\
{{54} \choose 5} &= \dfrac{ 54(53)(52)(51)(5) }{4(3) } \\
{{54} \choose 5} &= \dfrac{ 54(53)(13)(51)(5) }{ 3 } \\
{{54} \choose 5} &= 54(53)(13)(17)(5) \\
p &= \dfrac{ 9360 } { 54(53)(13)(17)(5) } \\
p &= \dfrac{ 1872 } { 54(53)(13)(17) } = \dfrac{ 468 } { 13(53)(13)(17) } \\
p &= \dfrac{ 468 } { 152269 }
\end{align*}

Now is my solution right?

Here is my third attempt to get it right:

Answer:
Let $p$ be the probability we seek. There are $54 \choose 5$ ways of selecting $5$ cards from this deck. We can get $4$ of a kind with $0$ wild cards, $1$ wild card or $2$ wild cards. Let
$p_0$ be the probability that we get $4$ of a kind without any wild cards. Let
$p_1$ be the probability that we get $4$ of a kind with exactly $1$ wild card. Let
$p_2$ be the probability that we get $4$ of a kind with exactly $2$ wild cards. \
\begin{align*}
p &= p_0 + p_1 + p_2 \\
p_0 &= \dfrac{ 13 { 4 \choose 4 }(48) } { {{54} \choose 5} } \\
p_0 &= \dfrac{ 13 (48) } { {{54} \choose 5} } \\
p_1 &= \dfrac{ 13 { 4 \choose 3 }(48)(2) } { {{54} \choose 5} } \\
{ 4 \choose 3 } &= 4 \\
p_1 &= \dfrac{ 13 (4)(48)(2) } { {{54} \choose 5} } \\
p_2 &= \dfrac{ 13{ {4} \choose {2} } 48 { {2} \choose {2} } } { {{54} \choose 5} } \\
{ 4 \choose 2 } &= \dfrac{ 4(3) } {2} = 6 \\
p_2 &= \dfrac{ 13(6)(48) } { {{54} \choose 5} } \\
\end{align*}

Now we can find $p$.
\begin{align*}
p &= \dfrac{ 13(48) + 13 (4)(48)(2) + 13(6)(48) } { {{54} \choose 5} } \\
p &= \dfrac{ 13(48) ( 1 + (4)(2) + 6) } { {{54} \choose 5} } \\
p &= \dfrac{ 13(48) ( 15) } { {{54} \choose 5} } \\
p &= \dfrac{ 9360 } { {{54} \choose 5} } \\
{{54} \choose 5} &= \dfrac{ 54(53)(52)(51)(50) }{5(4)(3)(2) } \\
{{54} \choose 5} &= \dfrac{ 54(53)(52)(51)(10) }{4(3)(2) } \\
{{54} \choose 5} &= \dfrac{ 54(53)(52)(51)(5) }{4(3) } \\
{{54} \choose 5} &= \dfrac{ 54(53)(13)(51)(5) }{ 3 } \\
{{54} \choose 5} &= 54(53)(13)(17)(5) \\
p &= \dfrac{ 9360 } { 54(53)(13)(17)(5) } \\
p &= \dfrac{ 1872 } { 54(53)(13)(17) } = \dfrac{ 936 } { 27(53)(13)(17) } \\
p &= \dfrac{ 312 } { 9(53)(13)(17) }
= \dfrac{ 104 } { 3(53)(13)(17) } \\
p &= \dfrac{ 104 } { 35139 }
\end{align*}

Now is my solution right?

Best Answer

Your $p_0$ and $p_1$ are correct, but $$p_2 = \frac{\binom{13}{1}\binom{4}{2}\binom{48}{1}\binom{2}{2}}{\binom{54}{5}}.$$ So $$p=p_0+p_1+p_2=\frac{624+4992+3744}{\binom{54}{5}}=\frac{9360}{\binom{54}{5}}.$$

This also turns out to be the probability of getting a full house, and you might find that calculation to be a fun exercise. See https://oeis.org/A053083.