To solve this problem, we define a 4-digit number as a sequence of four slots. We are constrained by the condition that exactly one digit must be a 7.
We partition the total sample space into two mutually exclusive cases based on the position of the 7.
Case 1: The 7 is at the thousands place.
The first digit is fixed as
7. The remaining three slots can be any digit from
{0,1,2,3,4,5,6,8,9}, which provides
9 choices for each slot.
n1=1×9×9×9=729
Case 2: The 7 is not at the thousands place.
The
7 can occupy one of the three remaining positions (hundreds, tens, or units). The thousands place cannot be
0 or
7, leaving
8 choices. The other two slots, excluding the
7, have
9 choices each.
n2=3×(8×9×9)=1944
The total sample space is the sum of these cases:
n(A)=729+1944=2673
Sub-case 1: The last digit is 7.
Since the number must contain exactly one
7, and it is fixed at the units place, no other digit can be
7. The thousands place has
8 choices (excluding
0 and
7), while the hundreds and tens places have
9 choices each.
n(E1)=8×9×9×1=648
Sub-case 2: The last digit is 2.
Here, the
7 must occupy one of the other three positions. If the
7 is at the thousands place, we have
1×9×9×1=81 ways. If the
7 is at the hundreds or tens place, we have
2×8×9×1=144 ways.
n(E2)=81+144=225
The total number of favorable outcomes is the sum of the sub-cases:
n(E)=648+225=873
The probability
P(E) is the ratio of favorable outcomes to the total sample space:
P(E)=2673873
By dividing both the numerator and the denominator by their greatest common divisor,
9, we obtain the final result:
P(E)=29797