4

My book says this.

Consider a sequence of independent trials, each of which can be classified as good, bad, or neutral, which happen (on any given trial) with probabilities $p, q,$ and $1 − p − q$, respectively. (We do not necessarily have $q = 1 − p$ here, although that case is allowed.) Then the probability that something good happens before something bad happens is $p/(p + q)$.

My question is, how did they derive this formula $p/(p+q)$ for probability that something good happens before something bad happens?

can someone show me a derivation/explain to me this?

3 Answers3

2

Informally, you can ignore the neutral events, because if one happens you are back where you started. You can then scale up the probabilities $p$ and $q$ so they sum to $1$, which gets the probability of something good being $\frac p{p+q}$ and the probability of something bad being $\frac q{p+q}$. Note these sum to $1$ and have the proper ratio, which should convince you.

More formally, the chance of good before bad is a string of neutrals followed by a good and the chance of bad before good is a string of neutrals followed by a bad. Again, the ratio has to be $\frac pq$ and the sum has to be $1$ because the chance of an infinite string of neutrals is $0$. If you want, you can sum the geometric series and get the same result for more work.

Ross Millikan
  • 374,822
  • When I try to the geometric series, I get $\frac{p}{1-q}$. This is after a bit of spiked egg-nog, so I may have summed badly or am not seeing how to get from that expression to $\frac{p}{p+q}$, but it doesn't seem automatic that "you can sum the geometric series and get the same result for more work." – Eric Towers Dec 25 '20 at 02:35
  • @EricTowers: remember that the probability of a neutral is $1-p-q$, so the denominator of the sum should be $1-(1-p-q)=p+q$ – Ross Millikan Dec 25 '20 at 03:10
  • Ah. Misread as $P(\text{neutral}) = q$. Thanks! – Eric Towers Dec 25 '20 at 05:07
2

In the repeated trials, the only try that matters is the first one that isn't neutral. For that one, it's good before bad if and only if that one is good. The probability is then as advertised: the probability of good divided by the probability that the try matters.

Ethan Bolker
  • 95,224
  • 7
  • 108
  • 199
0

Let $B$ denote the first trial where something bad happens, and let $X$ denote the number of times something good happens within the first $B-1$ trials. Then $B\sim \text{Geometric}(q)$ and $X|B\sim \text{Binomial}\Big(B-1,\frac{p}{1-q}\Big)$ and you're looking to compute $$P(X\geq 1)=1-P(X=0)$$ From the total law of probability, $$P(X=0)=\sum_{b=1}^{\infty}P(X=0|B=b)P(B=b)=\sum_{b=1}^{\infty}\Big(\frac{1-p-q}{1-q}\Big)^{b-1}(1-q)^{b-1}q$$ The RHS evaluates to $\frac{q}{p+q}$ and so $$P(X\geq 1)=1-\frac{q}{p+q}=\frac{p}{p+q}$$

Matthew H.
  • 9,191