# What is the probability that a randomly chosen 3-digit integer is divisible by $5$?

So I was given a question with two parts:

The first part is like this:

How many 3-digit integers (integers from 100 to 999 inclusive) are divisible by 5?

My solution: $\frac{(999-100+1)}{5} = 180$

The second part following the first part is like this:

What is the probability that a randomly chosen 3-digit integer is divisible by 5?

I saw a similar question where they took the above answer and subtracted by 17 and added 1

Is this correct?

Solution: $180/900$

• Why are you subtracting by $17$ and adding $1$? – miradulo Jan 20 '16 at 14:59
• @DonkeyKong In the previous example they did that i thought it was a general method, was unsure so i just took the first answer and did that – Zero Jan 20 '16 at 15:01
• Something like "subtracting $17$ and adding $1$" is hardly ever going to be a general method. That's like saying hocus pocus at a math equation. You know how many 3 digits integers there are, and you now know how many of these 3 digit integers are divisible by 5. To get the probability for a randomly chosen 3 digit integer, just divide your result $180$ by your sample space of $900$. – miradulo Jan 20 '16 at 15:05
• @DonkeyKong Thank you – Zero Jan 20 '16 at 15:07

Number of $3$ digit numbers which are divisible by $5$ :
To calculate this, note that there are $9$ choices for putting digits in the hundreds' place $[1-9]$, $10$ choices for putting digits in the tens' place $[0-9]$ and $2$ choices for putting digits in the units' place $[0,5]$. Hence total number of $3$ digit numbers which are divisible by $5$ is $9\times 10 \times 2 =180$.
However total number of $3$-digit numbers is $900$.
So the probability is $\large\frac{180}{900}=\frac{1}{5}$