<s>[INST] Combinatorial problem - choosing cards Here is the question: Forty cards are placed into a box, each bearing a number 1, 2, 3, 4, 5, 6, 7, 8, 9, or 10, with each number entered on four cards. Four cards are drawn from the box at random and without replacement. Let p be the probability that all four cards bear the same number. Let q be the probability that three of the cards bear a number a and the other bears a number b that is not equal to a. What is the value of q/p?
My solution: For p, we can choose any of the 1~10 cards for all four so we have a probability of $\frac{10}{\binom{40}{4}}.$ For q, we have to choose 2 kinds of cards getting us $\binom{10}{2}$ for the first kind of cards, we choose 3 to get $\binom{4}{3}$ and we choose 1 for the next kind for $\binom{4}{1}.$ Therefore, q = $\frac{45 \cdot 16}{\binom{40}{4}}.$ Thus dividing, we get $\boxed{72}.$
Is my logic correct?
 [/INST] Your first answer is fine, but your second is not. For the second problem there are $10$ ways to choose the number to be chosen $3$ times, and $\binom43=4$ sets of $3$ cards of that number, so there are $10\cdot4=40$ ways to choose the triplet. For any given triplet there are $9$ possible values of the singleton and $4$ cards of that value, so there are $9\cdot4=36$ ways to choose the singleton. Thus, there are $40\cdot36=1440$ ways to choose a hand of the desired type, and
$$q=\frac{1440}{\binom{40}4}=\frac{1440}{91390}=\frac{144}{9139}\,.$$
</s>