(In reply to
computer solution by Charlie)
The solution invites a comparison with the probability that eight random digits will consist of only two distinct digits.
The probability that 8 digits would consist solely of 1's and 2's is 1/5^8, but there are 45 possible combinations of 2 digits chosen out of 10, so the overall probability of any pair of digits is 45/5^8 or 0.0001152.
However, that calculation included the possibility of all the same digit. Of all the 8-digit numbers consisting of no more than two distinct digits, 1/2^7 would consist of just one or the other of these two, so 0.0001152 should be multiplied by (1 - 0.0078125) for a result of .0001143.
However, we also haven't taken into consideration that the 8-digit numbers have no leading zeros, so that any pair of digits, one of which is zero, is underrepresented by half. Also not considered is the fact that some of the integers from the truncation of N are 9 digits long, further decreasing the probability.
So it's not surprizing that .000066 or .0000909 falls somewhat short of .0001143.
|
Posted by Charlie
on 2010-10-31 14:44:13 |