First we find the probability of the complement event.
The complement event is the event that the integer selected contains
no digits of 9. That means they only contain digits of 0 through 8.
The number of ways to choose the first digit is 8. (1,2,3,4,5,6,7,8}
For each way to choose the first digit there are 9 ways to choose the
middle digit. (0,1,2,3,4,5,6,7,8}
For each way to choose the first and middle digits there are also
9 ways to choose the last digit. (0,1,2,3,4,5,6,7,8}
That's 8×9×9 = 648
The denominator of the probability can be figured either of two ways,
take your pick.
1. There are 999 integers from 1 to 999.
There are 99 integers from 1 to 99 which are not between 100 and
999. So there are 999-99 = 900 integers between 100 and 999.
2. The number of ways to choose the first digit is 9. (1,2,3,4,5,6,7,8,9}
For each way to choose the first digit there are 10 ways to choose the
middle digit. (0,1,2,3,4,5,6,7,8,9}
For each way to choose the first and middle digits there are also
10 ways to choose the last digit. (0,1,2,3,4,5,6,7,8,9}
That's 9×10×10 = 900
The probability of the complement event is 648 out of 900, or the
fraction 648/900 which, by dividing numerator and denominator
by 36, reduces to 18/25 or as a decimal 0.72 or as a percent, 72% of
the time the integer will not contain a digit of 9.
Therefore to find the event asked for, we subtract from 1:
As a fraction, 1 - 18/25 = 25/25-18/25 = (25-18)/25 = 7/25
As a decimal, 1.00 - 0.72 = 0.28
As a percent, 100% - 72% = 28%
Edwin