$4$ random digits, $2$ different ones. I have been trying to solve the following problem

What is the probability that among $4$ random digits, there appear exactly $2$ different ones?

Two different digits means that there should be two groups of $2$. There is $10$ possibilities for $2$ digits and another $9$ for the next two. But since this is an ordered solution, I thought that these numbers should be permuted as two pairs of indistinguishable objects. So my attempt for the required probability is
$$\frac{10\times 9\times \binom{4}{2}}{10^4}=0.054$$
This does not appear to be correct though. Could you please help me understand where I have gone wrong in the above? 
Thank you.
 A: Let $X$ and $Y$ be the two different digits, where $0 \leq X < Y \leq 9$ (so order matters). Then the possibilities are:
$$
XXXY, XXYX, XYXX, YXXX,\\
XXYY, XYXY, XYYX, YXXY, YXYX, YYXX,\\
XYYY, YXYY, YYXY, YYYX
$$
So the numerator of your fraction should be:
$$
\binom{10}{2} \cdot \left[ \binom{4}{1} + \binom{4}{2} + \binom{4}{3} \right]
= 630
$$
A: There are $10^4$ equally likely digit strings of length $4$, all by assumption equally likely.  We want to count the "good" strings, the ones that have exactly $2$ different digits. It is actually a little easier to count the bad strings, but we will not take that path.
There are two types of good strings: (i) Strings that have $3$ occurrences of one digit, and $1$ occurrence of another digit and (ii) Strings that have $2$ of one kind and $2$ of another.
First we count (i). The digit we have $1$ of can be chosen in $10$ ways. It can be placed in any one of $4$ positions, and then the digit we have $3$ of can be chosen in $9$ ways, for a total of $(10)(4)(9)$.
Now we count (ii). The two digits we have one each of can be chosen in $\binom{10}{2}$ ways. For each such way, the position of $2$ occurrences of the smaller chosen digit can be chosen in $\binom{4}{2}$ ways, for a total of $\binom{10}{2}\binom{4}{2}$. 
Now add the results of (i) and (ii) and divide by $10^4$.
Remark: Note that counting (ii) is a bit tricky. It is all too easy to overcount by a factor of $2$.  Your calculation did exactly that, and did not deal with the Type (i) possibilities.
