A computer program selects an integer in the set {k : 1 ≤ k ≤ 10,00,000} at…
2014
A computer program selects an integer in the set {k : 1 ≤ k ≤ 10,00,000} at random and prints out the result. This process is repeated 1 million times. What is the probability that the value k = 1 appears in the printout atleast once ?
- A.
0.5
- B.
0.704
- C.
0.632121
- D.
0.68
Attempted by 19 students.
Show answer & explanation
Correct answer: C
Key idea: compute the probability that the value 1 never appears, then subtract from 1.
Probability a single random integer is not 1 = 999999/1000000.
Probability none of the 1,000,000 independent trials equals 1 = (999999/1000000)^1000000.
Therefore the probability that 1 appears at least once = 1 − (999999/1000000)^1000000.
Numerical approximation: (999999/1000000)^1000000 ≈ e^{-1} ≈ 0.367879, so the desired probability ≈ 1 − e^{-1} ≈ 0.6321205588 ≈ 0.632121.
Answer: 1 − (999999/1000000)^1000000 ≈ 0.632121