What is the probability that a randomly chosen four-digit integer has distinct digits? What is the probability that a randomly chosen four-digit integer has distinct digits?
first digit can't be 0 so it'd be between 9 numbers.
second digit can be 0 so it'd be between 9 numbers.
third would cant be either of the last two so between 8 numbers.
fourth would be between 7.
9*9*8*7/9000 = 0.504
 A: I get the same result:
The digit sets are
$$
D_+ = \{ 1, 2, 3, 4, 5, 6, 7, 8, 9 \} \\
D = D_+ \cup \{ 0 \} \\
$$
The four digit integer without repetition is represented by a word
$$
w = d_1 d_2 d_3 d_4 \in L_1
$$
with
\begin{align}
d_1 &\in D_+ \\
d_2 &\in D \setminus d_1 \\
d_3 &\in D \setminus \{ d_1, d_2 \} \\
d_4 &\in D \setminus \{ d_1, d_2, d_3 \}
\end{align}
So we get
$$
\lvert L_1 \rvert = 9 \cdot 9 \cdot 8 \cdot 7 = 4536
$$
All possible four digit words are represented each by a word
$$
w = d_1 d_2 d_3 d_4 \in L_2
$$
with
\begin{align}
d_1 &\in D_+ \\
d_2, d_3, d_4 &\in D
\end{align}
So we get
$$
\lvert L_2 \rvert = 9 \cdot 10 \cdot 10 \cdot 10 = 9000
$$
which gives
$$
p = 4536 / 9000 = 0.504
$$
A: A slightly different way to do is just counting all the numbers with four distinct digits (including numbers starting by zero) and substracting the invalid numbers, that are a $10\%$ of this total, that is $$V=10\cdot 9\cdot 8\cdot 7-(10\cdot9\cdot 8\cdot 7)/10=9\cdot9\cdot8\cdot 7$$
Then if we call the event to get a number of four digits with all digits different $A$ (supposing that the probability to take a number is the same for all numbers) we have that
$$\Pr[A]=\frac{9\cdot9\cdot8\cdot 7}{10^3\cdot 9}=0.504$$
