Probability= (Number of odd integers < 7000) / (Number of integers less than 7000)
To find number of integers less than 7000, we consider the cases:
- Number of 1 digit integers (all less than 7000) = 5
- Number of 2 digit integers (all less than 7000) = 5*4 = 20 (five digits to choose from for the first digit, four for the second digit)
- Number of 3 digit integers (all less than 7000) = 5*4*3 = 60 (same idea as above)
- Number of 4 digit integers (all less than 7000)
We know the first digit can only be a 2,4,6 so there are 3 choices for the first digit. Then there are 4 choices for the second digit, 3 for the third and so on. so there are 3*4*3*2 = 72 ways
Adding them up gives 157 total integers less than 7000.
For number of odd integers less than 700, once again we split cases. The key here is always deal with restricted positions first, which will be the last digit:
- Number of 1 digit integers = 2 (9 and 7)
- Number of 2 digit integers = 2*4 =8(2 choices for second digit, 4 choices for first digit)
- Number of 3 digit integers = 2*4*3=24
- Number of 4 digit integers - there are 2 restrictions in this case: the last digit and the first digit. Fortunately the choices for the first digit (2,4,6) wont affect the available choices for the last digit (7,9) so we can consider them independently. So 2 choices for last digit, 3 choices for first digit, 3 choices afterwards for second digit and 2 choices for third digit gives 2*3*3*2 = 36 choices.
Adding them up gives 70 choices. Then putting them together gives 70/157