5. There are 5 red balls and 5 black balls, numbered $1,2,3,4,5$ respectively, and 4 balls are drawn from them. The probability that the numbers on the drawn balls are all different is ( ).
(A) $\frac{5}{21}$
(B) $\frac{2}{7}$
(C) $\frac{1}{3}$
(D) $\frac{8}{21}$
5.D.

From 10 balls, choosing 4, there are $\mathrm{C}_{10}^{4}=210$ different ways. If it is required that the numbers of the chosen balls are all different, one can first select 4 numbers from 5 numbers, which has $\mathrm{C}_{5}^{4}$ ways. For each number, there are two colors to choose from, so the number of ways to pick balls with all different numbers is $C_{5}^{4} \cdot 2^{4}=80$. Therefore, the probability of picking balls with all different numbers is $\frac{80}{210}=\frac{8}{21}$.