TDSM 2.27
From The Data Science Design Manual Wikia
- If 0 can be the first digit:
For first 4 digits, choose randomly from the set 7 numbers: {0, 1, 8, 2, 5, 6, 9} ⇒ there are 74 ways to do so.
For the next 4 digits, choose the corresponding digit from {0, 1, 8, 5, 2, 9, 6}. (i.e.: the 1st digit is 6 then the 8th digit must be 9) There is only one way to do so.
So the probability that the number looks the same even if the calculator is turned upside down is 74108
- If 0 cannot be the first digit: the first digit can only be picked from the set {1, 8, 2, 5, 6, 9}, and given that the number is an 8-digit number, there are only 9 possibilities of picking the first number (from 1 to 9)
So the probability that the number looks the same even if the calculator is turned upside down is 6⋅739⋅107