# Number of times an experiment must be run, with conditional probability

In a given experiment, event $A$ has a probability of $1.26\%$ of occurring. That is, $P(A) = .0126$.

If event $A$ occurs, then event $B$ has a $.99\%$ chance of occurring. That is, $P(B|A) = .0099$.

Event $B$ cannot occur without event $A$ occurring first. (Not sure how to write this one in math symbols).

Question: What is the minimum number of times the experiment must be run to have at least a $50\%$ chance for event $B$ occurring at least once?

So I noted these:

• $1-.0126=0.9874$
• $.99\%$ of $.0126$ is $0.00012474$.
• $.0126-0.00012474=0.01247526$

So I could draw this: Then, I looked up the formula for conditional probability just to check:

$P(B|A) = \dfrac{P(B \cap A)}{P(A)} = \dfrac{.00012474}{.01247526} \approx .00999899$ so that works out.

So I think, that this means that every time the experiment is run, that $P(B) = .00012474$. So the probability that event $B$ will not occur is $1-.00012474=0.99987526$.

So, in $n$ runs, there is a probability of $0.99987526^n$ of getting no event $B$'s.

So, the probability of getting at least one event $B$ in $n$ runs would be, $1 - 0.99987526^n$.

So, then I thought I could solve something like this: $1 - 0.99987526^n = .5$. I get around $n = 5556.39$, so I thought to round up to $5557$ runs. This seems a bit low to me, is there something wrong in my reasoning here?

Probability isn't one of my strongest suits, so if you could make your answers as accessible as possible that'd be great. Thanks.

So $P(B)=0.00012474=b$. if X is the number of times B is realized after n experiments, then $P(X>0)=1-P(X=0)=1-(1-b)^n$. So you are correct.

Please don't forget that your event B only has 1 over 10 000 chances to happen...So it seems normal than after approx 5000, it has 50% probability to have happened.

Actually, we can understand it with this approximation at the first order : $P(X>0)=1-P(X=0)=1-(1-b)^n=1-(1-nb)=nb$

This approach confirms the work above.

P(A) = 0.0126 P(B) = 0.0099 P(AB) = P(A)*P(B) = 0.00012474

1/P(AB) = 8016.674683

Try Poisson (using lower case p for Poisson probability)

p(0) = e^-m = .5

m = ln(2)

p(not 0) = 1 - p(0) = .5, so we can use the result from p(0).

N is number of experiments to perform

Because m = N * P(AB) = ln(2) -> p(0) = .5

N = ln(2)/P(AB) = 5556.735