4. If three dice of different sizes are rolled randomly, the probability that the sum of the numbers shown on two or three of the dice is 7 is $\qquad$ .


4. $\frac{35}{72}$.

Let $A_{i}=\{$ three dice do not show $i\}(i=1,2$, $\cdots, 6$.
By the principle of inclusion-exclusion, we have
$$
\begin{array}{l}
\left|\overline{A_{1}} \cap \overline{A_{6}}\right|=\left|\overline{A_{1} \cup A_{6}}\right| \\
=6^{3}-\left(\left|A_{1}\right|+\left|A_{6}\right|-\left|A_{1} \cap A_{6}\right|\right) \\
=6^{3}-\left(5^{3}+5^{3}-4^{3}\right)=30 .
\end{array}
$$

Similarly, $\left|\overline{A_{2}} \cap \overline{A_{5}}\right|=\left|\overline{A_{3}} \cap \overline{A_{4}}\right|=30$.
Thus, the total number of cases where exactly two dice show numbers that sum to 7 is
$$
\begin{array}{l}
\left|\overline{A_{1}} \cap \overline{A_{6}}\right|+\left|\overline{A_{2}} \cap \overline{A_{5}}\right|+\left|\overline{A_{3}} \cap \overline{A_{4}}\right|=90 . \\
\text { Also, } 7=1+2+4=1+1+5 \\
=1+3+3=2+2+3,
\end{array}
$$

Therefore, the total number of cases where the sum of the numbers shown on the three dice is 7 is $\mathrm{A}_{3}^{3}+3 \mathrm{C}_{3}^{2}=15$.
Thus, the required probability is $\frac{15+90}{6^{3}}=\frac{35}{72}$.