<s>[INST] Rolling $4$ dice and multiplying the results. What is the probability that the product is divisible by $5$ or has $5$ as the least significant digit? Four fair dice are rolled and the four numbers shown are multiplied together. What is the probability that this product
(a) Is divisible by $5$?
(b) Has last digit $5$?
MY ATTEMPT
a) A number is divisible by $5$ if and only if it has at least one factor equal to $5$. Let us denote by $F$ the event "it occurs at least one number five". Hence the sought probability is given by
\begin{align*}
\textbf{P}(F) = 1 - \textbf{P}(F^{c}) = 1 - \frac{5^{4}}{6^{4}} = 1 - \left(\frac{5}{6}\right)^{4}
\end{align*}
b) Here is the problem. I am not able to describe properly the target results.
Am I on the right track? Can someone please help me to solve it? Any help is appreciated.
 [/INST] Your answer for part $(a)$ is correct. For part $(b)$, observe that a number $N$ has last digit $5$ iff it's divisible by $5$ and odd. This means that if we denote our rolls by $a,b,c,d$ then $N=abcd$ where at least one of $a,b,c,d$ is a $5$ and none of $a,b,c,d$ is even. This means we have to avoid $2,4,6$ on all rolls, as well as obtain at least one $5$. 


*

*Case 1: Exactly one $5$. Choose one of $4$ positions for the $5$ and fill in the remaining three spots with either $1$ or $3$. This can be done in $\binom{4}{1}\cdot 2^{3}$ ways.

*Case 2: Exactly two $5$s. Choose two of $4$ positions for the $5$s and fill in the remaining two spots with either $1$ or $3$. This can be done in $\binom{4}{2}\cdot 2^{2}$ ways.

*Case 3: Exactly three $5$s. Choose three of $4$ positions for the $5$s and fill in the remaining spot with either $1$ or $3$. This can be done in $\binom{4}{3}\cdot 2^{1}$ ways.

*Case 4: All $5$s. There is only one way to do this.


The number of desirable outcomes is therefore
$$\binom{4}{1}\cdot 2^{3}+\binom{4}{2}\cdot 2^{2}+\binom{4}{3}\cdot 2+ 1$$
and since there are $6^{4}$ total outcomes, the desired probability is
$$\frac{\binom{4}{1}\cdot 2^{3}+\binom{4}{2}\cdot 2^{2}+\binom{4}{3}\cdot 2+ 1}{6^{4}}$$
</s>