# Probability question about choosing digits between 1 and 9 and that their product is a multiple of 3

Two digits between 1 and 9, inclusive, are selected at random. The same digit may be selected twice. What is the probability that their product is a multiple of 3?

I used this logic: if any one of the digits selected is 3, then the product would be a multiple of 3. There are 3 multiples of 3 (3, 6, 9) between 1-9, so $$\frac{3}{9}$$ = $$\frac{1}{3}$$, and since the second number can be anything, $$\frac{1}{3} * \frac{1}{1} = \frac{1}{3}$$. Therefore, my final answer is $$\frac{1}{3}$$. However, the answer key used complementary counting and got a different answer ($$\frac{5}{9}$$). What is wrong with my approach?

• $$P\left(3|XY\right)=P\left(3|X\right)+P\left(\neg3|X\text{ and }3|Y\right)$$ You missed the second term on RHS. Commented Sep 6, 2022 at 11:41
• I assume you meant to say that if any of the digits selected is a multiple of $3$, then the product would be a multiple of $3$. You did not account for which digit was a multiple of $3$. Commented Sep 6, 2022 at 11:47
• You've counted the number of combinations if an element from {3,6,9} on the first place. What about the second place? For example, 8*3 also works. Commented Sep 6, 2022 at 12:43

I believe you are missing the case for which the first number is not a multiple of 3, and the second one is.

Another way to think about the problem is that the probability that the product is not a multiple of 3 is the probability that both numbers are from the set {1,2,4,5,7,8} which is 6 out of 9. This probability is (6/9)², so the required probability is 1-(6/9)² = 5/9

• Welcome to MathSE. This tutorial explains how to typeset mathematics on this site. Commented Sep 6, 2022 at 11:48

Total number is: $$9\cdot 9=81$$ (9 possibilities for the first digit and 9 for the second).

Number of combinations that are not multiple of 3: $$6\cdot 6=36$$ (6 possibilities for the first digit and 6 for the second), 6 because from the set {1,2,4,5,7,8}.

Number of combinations that are multiple of 3: $$81-36=45$$.

Probability: $$\frac{45}{81}=\frac{5}{9}$$.

Two digits between 1 and 9, inclusive, are selected at random. The same digit may be selected twice.

In problems like this (with small numbers and just two independent variables), I find it often helps to draw a table and mark the cases being looked for.

What is the probability that their product is a multiple of 3?

The product would be a multiple of 3 if either number is 3. I've marked those cases with the xs in this pretty little ASCII art table:

  123456789
1 ..x..x..x
2 ..x..x..x
3 xxXxxXxxX
4 ..x..x..x
5 ..x..x..x
6 xxXxxXxxX
7 ..x..x..x
8 ..x..x..x
9 xxXxxXxxX


You can eyeball count that as 6 lines of 9 xs, except that would double-count the ones where the lines intersect (uppercase Xs), so reduce 9 for that. Of course you could count them in some other way to verify.

That gives $$P(\mathrm{product\ is\ multiple\ of\ 3}) = \frac{6 \cdot 9 - 9}{9 \cdot 9} = \frac{5 \cdot 9}{9 \cdot 9} = \frac{45}{81} = \frac{5}{9}$$

I used this logic: if any one of the digits selected is 3, then the product would be a multiple of 3. There are 3 multiples of 3 (3, 6, 9) between 1-9, so 3/9 = 1/3, and since the second number can be anything [...]

That first part is right. Just that I think in the follow-up you missed that the first number can also be anything if the second satisfies the condition. Listing the pairs explicitly helps with that, and the table also exposes the overlapping cases.

Practice problem: What's the probability if we change the problem so that the two digits can't be the same? (It's not the same, by my count.)