2
$\begingroup$

With the given data: After picking 30 random natural integers in a pool of X-natural-numbers (numbers do not disappear from the pool after picking). The probability of NOT picking 1 pre-defined specific number should be around a probability of 0,3%.

This is what I'm trying to calculate: The size of the pool

What I want to know: The formula

2 Answers 2

1

It is not entirely clear what the problem is, so I will make an interpretation that I hope is the one you intend. Out of habit, I will use $n$ instead of $X$.

We have a pool of $n$ distinct natural numbers, or indeed any $n$ distinct objects. We suppose that $A$ is one of these objects.

We pick from this pool $30$ times, each time replacing the object that we picked, so that the composition of the pool does not change. The probability that in $30$ trials, we never pick $A$, is $0.003$. We want to know the number $n$ of objects in the pool.

The probability that, on any individual pick, we get the object $A$, is $\dfrac{1}{n}$. So the probability that we don't get $A$ is $1-\dfrac{1}{n}$. The probability that this happens $30$ times in a row is $\left(1-\frac{1}{n}\right)^{30}.\qquad\qquad (\ast)$ So we want to solve the equation $\left(1-\frac{1}{n}\right)^{30}=0.003.$ This equation can be solved in various ways, including "trial and error." In our particular situation, trial and error is a very good way. If we play with the calculator a bit, using the formula $(\ast)$, we find that if $n=5$, the probability of never getting $A$ is about $0.0012379$, while if $n=6$, the probability is about $0.0042127$. There is no integer $n$ such that the probability is exactly $0.003$. We get closest with $n=6$.

We now describe a more systematic way of solving our equation. Take the logarithm of both sides. I will use logarithm to the base $10$, though I would prefer the natural logarithm (base $e$). We obtain $30\log\left(1-\frac{1}{n}\right)=\log(0.003).$ Calculate. We get $\log\left(1-\frac{1}{n}\right)\approx -0.084096.$ Recall that if $y=\log x$ then $x=10^y$. We conclude that $\left(1-\frac{1}{n}\right)\approx 0.823956,$ which gives $n=5.6803994$. Of course, that is not right, $n$ must be an integer. If we let $n=5$, the probability we never get $A$ is quite a bit less than $0.003$, while if $n=6$, the probability we never get $A$ is greater than $0.003$.

Remark: You might be interested in numbers other than your special $30$ and $0.003$. More generally, suppose that we pick $k$ times, and we want the probability of never getting $A$ to be $p$. Then we need to solve the equation $\left(1-\frac{1}{n}\right)^{k}=p.$ Like in our concrete case, we can find the appropriate value of $n$ by using logarithms. In general, like in our concrete case, there will not be an integer $n$ that gives probability exactly $p$. Again, we use logarithms to the base $10$, though any base will do. We get $k\log\left(1-\frac{1}{n}\right)=\log p,$ and therefore $\log\left(1-\frac{1}{n}\right)=\frac{\log p}{k},$ and therefore $1-\frac{1}{n}=10^{\frac{\log p}{k}}.$ Solving for $n$, we obtain $n=\frac{1}{1-10^{\frac{\log p}{k}}}.$

Suppose that instead of your $0.003$, we let $p=0.95$. Let $k=30$. Using the above formula, we get $n\approx 585.4$. This could have taken some time to reach by trial and error.

  • 1
    @Terence: One must be careful: nothing and nobody in the real world is truly normal. Joke aside, there is a serious point. You are using the normal distribution as a model, or as an approximation to the "real" distribution. In (say) the left tail, the normal approximation may be very good in that the true probability is close to $0$, and the normal gives an answer close to $0$. But the **ratio** of the tail probabilities may be quite far from $1$. Because of poor tail fit between truth and normal approximation in the ratio sense, the calculated $n$ might be quite far away from the truth.2012-02-17
0

The chance of not picking the predefined integer in our thirty picks $= \left( \dfrac {x-1} {x}\right) ^{30} = 0.3$. Now solve for x.

  • 0
    $x=\dfrac {1} {1-0.9606} = 25.420867390196038892702305462344 $2012-02-17