4
$\begingroup$

Could you tell me if my reasoning is right? I'm new in probability so I'm still not secure of how I should use the classical distributions to model problems.

My problem is the following: I have a success-failure experiment such that the probability of success is $p\in(0,1)$ ($p$ is supposed to be very little, but this shouldn't change the reasoning). If we run the experiment one time, the probability of success is $p$. If we run the experiment $n$ times, the probability of having $k$ successes is $\binom{n}{k}p^k(1-p)^{n-k}$, for $0\leq k\leq n$. This is modeled by the binomial distribution.

What I want to know is an inverse problem, we can say. How many experiments we should run to have one success with probability at least $50\%$? I'm looking for the minimal number $n$ of experiments.

My idea: We can keep $n$ unknown and ask for the probability of having at least one success in $n$ experiments. This is given by $\sum_{k=1}^n \binom{n}{k}p^k(1-p)^{n-k}$. It's possible to use some program to find the minimum $n$ such that $\sum_{k=1}^n \binom{n}{k}p^k(1-p)^{n-k}\geq \frac{1}{2}$. In fact, I did this for some values of $p$, in particular, for $p=\frac{1}{10000}$ we have $n=6932$.

But I'm not sure of this argument. I was looking for the number of experiments necessary to have one success with probability at least $50\%$, but ended up calculating the number of experiments necessary to have at least one success with probability at least $50\%$.

$\endgroup$
4
$\begingroup$

The number of experiments necessary to have at least one success with probability at least $50\%$ can be calculated as the number of experiments necessary to have no success with probability at most $50\%$. This requires $(1-p)^n \le \frac12$ so $n \ge \dfrac{\log 2}{- \log(1-p)}.$ With your example of $p=\frac{1}{10000}$ this gives $n\ge 6931.1$ (approximately, and you will round up to the next integer).

The number of experiments necessary to have exactly one success with probability at least $50\%$ requires $n p(1-p)^{n-1} \ge \frac{1}{2}$ and this will not have a closed form solution if you do not use something like Lambert-W functions. But for small $p$ there will be no sensible solution to this anyway: in your example of $p=\frac{1}{10000}$, the maximum probability of exactly one success happens when $n=9999$ or $10000$ and is then about $36.78978\% \approx \exp(-1)$ which is too low to answer your question.

$\endgroup$
  • $\begingroup$ Are you saying that $\sum_{k=1}^n \binom{n}{k}p^k(1-p)^{n-k} = 1-(1-p)^n$ ? $\endgroup$ – diff_math Sep 17 '15 at 23:46
  • 1
    $\begingroup$ Yes, I am, or was. I deleted my answer because I had written a solution on the assumption you meant at least one success. It is often impossible to have a probability $\gt 50\%$ of exactly one success. Basically, if we have a large enough sample to have a good chance of at least one success, chances are good we will have $2$ or more. $\endgroup$ – André Nicolas Sep 17 '15 at 23:47
  • $\begingroup$ @diff_math Yes. It obviously is. Summing from k=0 to n is the probability of anything from no to all successes; which is $1$. So if we subtract the probability of no success from $1$ we get the required probability of at least one success. $\endgroup$ – Graham Kemp Sep 17 '15 at 23:49
  • $\begingroup$ It seems that when I say there is no solution for small $p$, I mean $p \lt \frac12$. When $p=\frac12$ then $n=1$ or $2$ are solutions and when $p \gt \frac12$ then $n=1$ is a solution to your "exactly one" question $\endgroup$ – Henry Sep 17 '15 at 23:49
  • $\begingroup$ Thanks for clarifying. I will rewrite my comment on the other answer, because this is what made me confused. You can see my problem in this lines: suppose you have a die with 10000 sides numbered and pick one specfic side. How many times you should throw the die until you have at least $50\%$ of chance of coming up this side? I got a little confused about what to use: at least one success or exactly one success. $\endgroup$ – diff_math Sep 17 '15 at 23:54
4
$\begingroup$

The number of successes in $n$ independent Bernoulli trials with probability of success $p$ is a binomial random variable $X$, such that $$\Pr[X = k] = \binom{n}{k} p^k (1-p)^{n-k}, \quad k = 0, 1, 2, \ldots, n.$$ Therefore, the probability of observing at least one success in one trial is the complement of the probability of observing no successes: $$\Pr[X \ge 1] = 1 - \Pr[X = 0] = 1 - \binom{n}{0} p^0 (1-p)^{n-0} = 1 - (1-p)^n.$$ We then wish to find the minimum $n$ such that $$0.5 \le \Pr[X \ge 1] = 1 - (1-p)^n;$$ that is to say, $$n \ge -\frac{\log 2}{\log(1-p)} = \left\lceil -\frac{\log 2}{\log (1-p)} \right\rceil.$$ For $p = 10^{-4}$, this gives $n = 6932$ as you wrote.


If, however, you want the probability of exactly one success to be at least 50%, this would be $$0.5 \le \Pr[X = 1] = \binom{n}{1} p^1 (1-p)^{n-1} = np(1-p)^{n-1}.$$ The solution of this inequality does not have an elementary closed form for general $p \in (0,1)$ and positive integer $n$. However, we can show that there is no solution to this inequality if $p < 0.44303\ldots$, since for a fixed $p \in (0,1)$, treating $n$ temporarily as a continuous positive real and differentiating $\Pr[X = 1]$ with respect to $n$, we can see that a local extremum occurs when $$n = -1/\log(1-p),$$ attaining $$\Pr[X = 1]_{\text{max}} \approx \frac{-p}{e(1-p)\log(1-p)}.$$ And this expression is less than $1/2$ for $p < 0.44303\ldots$. Of course, $n$ is a positive integer, so this is just an approximation, but it remains the case that when $p$ is "small," no number of experiments will guarantee that the probability of exactly one success will exceed $0.5$.

$\endgroup$
  • $\begingroup$ You can see my problem in this lines: suppose you have a die with 10000 sides numbered and pick one specfic side. How many times you should throw the die until you have at least $50\%$ of chance of coming up this side? I got a little confused about what to use: at least one success or exactly one success. $\endgroup$ – diff_math Sep 17 '15 at 23:51
  • $\begingroup$ My interpretation of the wording above is "at least one." $\endgroup$ – André Nicolas Sep 17 '15 at 23:53
  • 1
    $\begingroup$ You can close the gap between your approximation $0.443$ and the true bound of $0.5$ by considering $n=1,2,3$ $\endgroup$ – Henry Sep 17 '15 at 23:54
  • $\begingroup$ @diff_math That question is a completely different one to the binomial question! You are using a binomial model when your actual model is geometric. The fundamental difference is that in a binomial model, the number of trials is fixed in advance. In your proposed experiment, you continue to conduct trials until you achieve success. $\endgroup$ – heropup Sep 17 '15 at 23:54
  • $\begingroup$ @Henry Indeed, I agree. I just didn't bother going through those last steps since the range of $p$ of interest is so much smaller. $\endgroup$ – heropup Sep 17 '15 at 23:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.