Problem:
What is the probability of getting exactly two pairs in a poker hand of
$7$ cards?
Note: Only $5$ cards count, and the cards that count will be determined by the player holding the cards.
Answer:
Let $p$ be the probability we seek. We will count it as two pairs if there are two pairs and it is also a flush. We will not count it as two pairs if we have two kings and three queens. \begin{align*} p &= \dfrac{ {13 \choose 2} { 4 \choose 2 }{4 \choose 2 } (44)(43)(42) } { { 52 \choose 7 } } \\ {13 \choose 2} &= \dfrac{ 13(12) } { 2 } = 78 \\ { 4 \choose 2 } &= \dfrac{4(3)}{2} = 6 \\ % p &= \dfrac{ 78(6)(6) (44)(43)(42) } { { 52 \choose 7 } } \\ { 52 \choose 7 } &= \dfrac{ 52(51)(50)(49)(48)(47)(46) } { 7(6)(5)(4)(3)(2) } \\ { 52 \choose 7 } &= \dfrac{ 52(51)(50)(7)(48)(47)(46) } { 6(5)(4)(3)(2) } \\ { 52 \choose 7 } &= \dfrac{ 13(51)(50)(7)(48)(47)(46) } { 3(5)(4)(3) } \\ { 52 \choose 7 } &= \dfrac{ 13(51)(10)(7)(16)(47)(46) } { 4(3) } = \dfrac{ 13(51)(10)(7)(4)(47)(46) } { 3 } \\ { 52 \choose 7 } &= 13(17)(10)(7)(4)(47)(46) \\ p &= \dfrac{ 78(6)(6) (44)(43)(42) } { 13(17)(10)(7)(4)(47)(46) } \\ \end{align*} Now we have to simplify the fraction to find $p$. \begin{align*} p &= \dfrac{ 78(3)(3) (44)(43)(42) } { 13(17)(10)(7)(47)(46) } = \dfrac{ 78(3)(3) (22)(43)(42) } { 13(17)(5)(7)(47)(46) } \\ p &= \dfrac{ 78(3)(3) (11)(43)(42) } { 13(17)(5)(7)(47)(23) } \\ p &= \dfrac{ 13945932 } { 8361535 } \\ p &\doteq 1.667867 \\ \end{align*} Where did I go wrong?
Based upon the comments I have gotten, here is a revised solution:
Answer:
Let $p$ be the probability we seek. We will count it as two pairs if there are two pairs and it is also a flush. We will not count it as two pairs if we have two kings and three queens hence we need to subtract it out.
\begin{align*} p &=\dfrac{ {13 \choose 2} { 4 \choose 2 }{4 \choose 2 } {44 \choose 3} - {13 \choose 2} { 4 \choose 3 }{4 \choose 2 } {44 \choose 2} } { { 52 \choose 7 } } \\ {13 \choose 2} &= \dfrac{ 13(12) } { 2 } = 78 \\ { 4 \choose 2 } &= \dfrac{4(3)}{2} = 6 \\ {44 \choose 3} &= \dfrac{ 44(43)(42) } { 3(2) } = 44(43)(7) \\ {44 \choose 3} &= 13244 \\ { 4 \choose 3 } &= 4 \\ { 52 \choose 7 } &= \dfrac{ 52(51)(50)(49)(48)(47)(46) } { 7(6)(5)(4)(3)(2) } \\ { 52 \choose 7 } &= \dfrac{ 52(51)(50)(7)(48)(47)(46) } { 6(5)(4)(3)(2) } \\ { 52 \choose 7 } &= \dfrac{ 13(51)(50)(7)(48)(47)(46) } { 3(5)(4)(3) } \\ { 52 \choose 7 } &= \dfrac{ 13(51)(10)(7)(16)(47)(46) } { 4(3) } = \dfrac{ 13(51)(10)(7)(4)(47)(46) } { 3 } \\ \end{align*} \begin{align*} {44 \choose 2} &= \dfrac{ 44(43) } { 2 } = 22(43) \\ { 52 \choose 7 } &= 13(17)(10)(7)(4)(47)(46) \\ p &= \dfrac{ 78(6)(6)(13244) - 78(4)(6)(22)(43) } { 13(17)(10)(7)(4)(47)(46) } \\ p &= \dfrac{ 17709120 } { 13(17)(5)(7)(4)(47)(46) } \\ p &= \dfrac{ 3541824 } { 13(17)(7)(4)(47)(46) } \\ p &= \dfrac{ 885456 } { 13(17)(7)(47)(46) } \\ p &= \dfrac{ 885456 } { 3344614 } = \dfrac{ 68112 } { 257278 } \\ p &= \dfrac{ 34056 } { 128639 } \\ p &\doteq 0.2647409 \end{align*} Now is it right?
Here is my third attempt to get it right.
Answer:
Let $p$ be the probability we seek. We will count it as two pairs if there are two pairs and it is also a flush. We will not count it as two pairs if we have two kings and three queens.
\begin{align*} p &=\dfrac{ {13 \choose 2} { 4 \choose 2 }{4 \choose 2 } \left( \dfrac{44(40)(36)}{3(2)} \right) - {13 \choose 2} { 4 \choose 3 }{4 \choose 2 } {44 \choose 2} } { { 52 \choose 7 } } \\ {13 \choose 2} &= \dfrac{ 13(12) } { 2 } = 78 \\ { 4 \choose 2 } &= \dfrac{4(3)}{2} = 6 \\ { 4 \choose 3 } &= 4 \\ { 52 \choose 7 } &= \dfrac{ 52(51)(50)(49)(48)(47)(46) } { 7(6)(5)(4)(3)(2) } \\ { 52 \choose 7 } &= \dfrac{ 52(51)(50)(7)(48)(47)(46) } { 6(5)(4)(3)(2) } \\ { 52 \choose 7 } &= \dfrac{ 13(51)(50)(7)(48)(47)(46) } { 3(5)(4)(3) } \\ { 52 \choose 7 } &= \dfrac{ 13(51)(10)(7)(16)(47)(46) } { 4(3) } = \dfrac{ 13(51)(10)(7)(4)(47)(46) } { 3 } \\ \end{align*} \begin{align*} {44 \choose 2} &= \dfrac{ 44(43) } { 2 } = 22(43) \\ { 52 \choose 7 } &= 13(17)(10)(7)(4)(47)(46) \\ p &= \dfrac{ 78(6)(6) \left( \dfrac{44(40)(36)}{3(2)} \right) - 78(4)(6)(22)(43) } { 13(17)(10)(7)(4)(47)(46) } \\ % p &= \dfrac{ 78(6)(6) \left( 22(10)(12) \right) - 78(4)(6)(22)(43) } { 13(17)(10)(7)(4)(47)(46) } \\ p &= \dfrac{ 39(6)(6) \left( 22(10)(12) \right) - 39(4)(6)(22)(43) } { 13(17)(5)(7)(4)(47)(46) } \\ % p &= \dfrac{ 39(6)(6)( 2640 ) - 39(4)(6)(22)(43) } { 13(17)(5)(7)(4)(47)(46) } \\ p &= \dfrac{ 39(6)(6)( 2640 ) - 39(4)(6)(22)(43) } { 13(17)(5)(7)(4)(47)(46) } \\ p &= \dfrac{ 39(6)(6)( 660 ) - 39(6)(22)(43) } { 13(17)(5)(7)(47)(46) } \\ p &= \dfrac{ 705276 } { 13(17)(5)(7)(47)(46) } \\ p &= \dfrac{ 352638 } { 13(17)(5)(7)(47)(23) } \\ p &= \dfrac{ 352638 } { 8361535 } \\ p &\doteq 0.0421738 \end{align*} Now is it right?
Here is my fourth attempt to get it right.
Answer:
Let $p$ be the probability we seek. We will count it as two pairs if there are two pairs and it is also a flush. We will not count it as two pairs if we have two kings and three queens.
\begin{align*} p &=\dfrac{ {13 \choose 2} { 4 \choose 2 }{4 \choose 2 } \left( \dfrac{44(40)(36)}{3(2)} \right) } { { 52 \choose 7 } } \\ {13 \choose 2} &= \dfrac{ 13(12) } { 2 } = 78 \\ { 4 \choose 2 } &= \dfrac{4(3)}{2} = 6 \\ { 4 \choose 3 } &= 4 \\ { 52 \choose 7 } &= \dfrac{ 52(51)(50)(49)(48)(47)(46) } { 7(6)(5)(4)(3)(2) } \\ { 52 \choose 7 } &= \dfrac{ 52(51)(50)(7)(48)(47)(46) } { 6(5)(4)(3)(2) } \\ { 52 \choose 7 } &= \dfrac{ 13(51)(50)(7)(48)(47)(46) } { 3(5)(4)(3) } \\ { 52 \choose 7 } &= \dfrac{ 13(51)(10)(7)(16)(47)(46) } { 4(3) } = \dfrac{ 13(51)(10)(7)(4)(47)(46) } { 3 } \\ { 52 \choose 7 } &= 13(17)(10)(7)(4)(47)(46) \\ \end{align*} \begin{align*} p &=\dfrac{ 78 (6) (6) \left( \dfrac{44(40)(36)}{3(2)} \right) } { 13(17)(10)(7)(4)(47)(46) } \\ % p &=\dfrac{ 78 (6) (6)(44)(40)(6)} { 13(17)(10)(7)(4)(47)(46) } \\ p &=\dfrac{ 78 (3) (3)(44)(40)(6)} { 13(17)(10)(7)(47)(46) } \\ p &=\dfrac{ 78 (3) (3)(44)(4)(6)} { 13(17)(7)(47)(46) } \\ p &=\dfrac{ 78 (3) (3)(44)(2)(6)} { 13(17)(7)(47)(23) } \\ p &=\dfrac{ 6 (3) (3)(44)(2)(6)} { 17(7)(47)(23) } \\ p &=\dfrac{ 28512} { 128639 } \\ p &\doteq 0.2216435 \end{align*} Now is it right?
I didn't check the rest of your work that closely. The above numerator is wrong, because the denominator of $\displaystyle \binom{52}{7}$ presumes that the order that the cards are dealt is unimportant.
Therefore, the numerator must be computed in a consistent manner. The LHS of the numerator is okay, but the trailing $3$ factors in the numerator should be replaced by $\displaystyle \binom{44}{3}.$
Edit
Besides the above major mistake there is an additional subtle flaw. What happens if you have $3$ pair? Presumably, that is okay. However, since a full house has been ruled out, you also have to consider that you could have $2$ pair + trips of a $3$rd rank. So, even with the $\displaystyle \binom{44}{3}$ correction, you still have a problem.