Probability to find a prime lesser than 100 in i-th position of a sequence for n numbers

32 Views Asked by At

Suppose you implemented a prime number generator to randomly produce a sequence of n primes such that only one of them is less than 100. What is the probability of the prime lesser than 100 being in the second position of the sequence?

1

There are 1 best solutions below

1
On

You have $n$ terms to the sequence only $1$ of which we are choosing to pick (the second one, not that this matters). Assuming an equal probability for each position in the sequence then the answer is $\frac1{n \choose 1}=\frac1n$.

This question is equivalent to asking the probability of choosing a red ball from a bag of $1$ red and $n-1$ blue balls. There is nothing special about the elements of the sequence being primes or the position in the list of the prime we look at. Unless of course, we do not have an even probability distribution.