[Math] the probability that a randomly chosen integer between 0000 and 9999 is divisible by 5

combinationsprobability

If I have to choose a random integer between the range of 0000 and 9999, what would be the probability that this chosen integer between this range will be divisible by 5?

I just wanted to know if my line of working out is correct.
For the first digit, I have 9 choices.
For the second digit, I have 10 choices.
For the third digit, I have 10 choices.
And for the final digit, I'm only going to have 2 choices [0 or 5].
Therefore, I'm going to have 9 x 10 x 10 x 2 = 1800 numbers that are divisible by 5.

For finding the probability that this number will be divisible by 5, I put this all over 10000 [the number of digits between 0000 and 9999] to get $\frac{1800}{10000}$, which comes to $\frac{9}{50}$.

Is this the correct way to go about it?

EDITED: For clarity, I've edited the question so that we are finding the probability of getting a number that is divisible 5 in between 0000 and 9999, rather than a 4-digit number that is divisible by 5 between this range.

Best Answer

If we're allowing $0000$, and other numbers less than $1000$ to count as $4$-digit numbers, then you've got $10$ choices for your first digit, not just $9$.

This should bring your answer in line with the intuitive expectation that one out of every five numbers is divisible by $5$.