I'm looking for help with:

  1. Confirming or correcting my calculation of the conditional probability when the conditional event is uncertain, and
  2. How to best utilize probability trees to visualize and understand conditional probabilities when the conditional event is uncertain

Using the following example tree: Example probability tree

Bayes Theorem is just conditional probability when the conditional event is certain. Using the example tree, given that conditional event B has occurred with 100% certainty, we can use Bayes Theorem to get $$P(A|B) = \frac{P(B|A)\cdot P(A)}{P(B)} = \frac{P(B|A)\cdot P(A)}{P(B∩A)+P(B∩¬A)} = \frac{0.1\cdot0.8}{0.08+0.18} = 0.31$$ or we can visualize the P(¬B∩A) and P(¬B∩¬A) branches being eliminated from the probability tree, and use normalization to arrive at what amounts to the exact same calculation $$P(A|B) = \frac{P(B∩A)}{P(B∩A)+P(B∩¬A)} = \frac{0.08}{0.08+0.18} = 0.31$$

However, now I want to use this same tree to determine P(A) and P(¬A) given that B has occurred with less than 100% certainty (call this B', so that we're calculating P(A|B') and P(¬A|B')).

As an example of how this could arise, consider the classic scenario of drawing balls from jars. A is the "red jar" event, so that the probability tree is telling us that if we randomly select a jar to draw a ball from, there is an 80% chance of drawing from a red jar and a 20% chance of drawing from a non-red jar. B is the "black ball" event, so that the probability tree is telling us that if we draw from a red jar, there is a 10% chance that the ball will be black (and thus a 90% chance that it will be something other than black) and if we draw from a non-red jar, there is a 90% chance that the ball will be black (and thus a 10% chance that it will be something other than black).

If we randomly pull a ball from a random jar, and we are using a ball color identifying machine that is only 75% accurate, what is the calculation to determine the probability that we pulled from a red jar given the result from the ball color identifying machine?

I think that the solution is to normalize the cumulative probabilities so that P(B') = 0.75 and P(¬B') = 0.25. Then to get the conditional probability P(A|B'), you would sum the normalized cumulative probabilities under the A branch, and likewise for P(¬A|B'). This makes sense and is a generalized form that is equivalent to Bayes Theorem when P(B') = 1.0 and P(¬B') = 0. That said, I am not 100% confident in this solution (no pun intended) as I could not locate any corresponding examples or explanations.

Now I also want to be able to apply this to the probability tree (assuming the technique is correct) to aid in visualizing and understanding the situation. One thought I had for the presentation was to define the normalization constants C(P(B')) and C(P(¬B')), and append them to the branches along with the resulting normalized cumulative probability. For P(B') = 0.75, this gives $$C(P(B')) = C(0.75) = \frac{P(B')}{P(B)} = \frac{P(B')}{P(B∩A)+P(B∩¬A)} = \frac{0.75}{0.08+0.18} = 2.88$$ $$C(P(¬B')) = C(0.25) = \frac{P(¬B')}{P(¬B)} = \frac{P(¬B')}{P(¬B∩A)+P(¬B∩¬A)} = \frac{0.25}{0.72+0.02} = 0.34$$ $$P(B'∩A) = C(P(B'))\cdot P(B∩A) = 2.88\cdot 0.08 = 0.23$$ $$P(¬B'∩A) = C(P(¬B'))\cdot P(¬B∩A) = 0.34\cdot 0.72 = 0.24$$ $$P(B'∩¬A) = C(P(B'))\cdot P(B∩¬A) = 2.88\cdot 0.18 = 0.52$$ $$P(¬B'∩¬A) = C(P(¬B'))\cdot P(¬B∩¬A) = 0.34\cdot 0.02 = 0.01$$ and the corresponding tree is as follows: Example uncertain probability tree

Now just sum the branch's cumulative probabilities to get the conditional probabilities: $$P(A|B') = P(B'∩A)+P(¬B'∩A) = 0.23 + 0.24 = 0.47$$ $$P(¬A|B') = P(B'∩¬A)+P(¬B'∩¬A) = 0.52 + 0.01 = 0.53$$ By giving our B event uncertainty at 75% accuracy, we've moved the conditional probability of A from 31% (using Bayes and 100% accuracy) to 47%, which makes sense because the prior probability of A was higher.

I don't want to reinvent the wheel but I have not been able to locate any guidance on this kind of scenario. So, can you please confirm that the calculation is correct? And does the updated tree make sense as a way to visualize and present the situation? Or do you know of any resources that address this scenario in a more standardized way? Thanks in advance.


Your book most likely wants you to take the values you calculated ($\mathsf P(A'\mid B')=\mathsf P(A\mid B)$, et cetera), and use $\mathsf P(B')=0.75$ to calculate $\mathsf P(A')$.

So use the Law of Total Probability.

$$\mathsf P(A')=\mathsf P(A'\mid B')\mathsf P(B')+\mathsf P(A'\mid \neg B')\mathsf P(\neg B')$$

  • $\begingroup$ There's no book. Just trying to get clarity on this scenario, and the Law of Total Probability is not what I'm looking for. Do I need to clarify the question further? If so, what is unclear? $\endgroup$ – Travis R Aug 28 '18 at 4:31
  • $\begingroup$ Well, why does the probability for $B$ change? Why would you seek the probability for $A$ when it does? Why would the existing conditional probabilities still be relevant under a changed situtation? Basically: What is your motivation for this problem? $\endgroup$ – Graham Kemp Aug 28 '18 at 4:41
  • $\begingroup$ OK, I updated the question. Hopefully the new example clarifies the motivation for the question. $\endgroup$ – Travis R Aug 28 '18 at 5:07

Upon revisiting this question, it occurred to me that the uncertain conditional event is no different than adding another conditional to the tree to capture whether the observation of the event is accurate. So if C = observation is accurate, then the new probability tree is Full probability tree

The solution proposed in the question is wrong because it uses B' as if it means "event B was observed" but then assigns it a value of P(C), or "observation was accurate". If B' is defined as "event B was observed" then P(A|B') is the sum of the leaves that observe event B given A, divided by the sum of the total leaves that observe event B. Since B is "event actually occurred", any leaf with both C and B is an observation of the event (B') because the event was accurately observed. But it's also the case that any leaf with both ¬C and ¬B is an observation of the event (B') because the event didn't actually occur but the observation was incorrect, meaning it was incorrectly observed to have occurred. Therefore, the leaves that observe event B are $$C∩A∩B=0.06, ¬C∩A∩¬B=0.18, C∩¬A∩B=0.135, ¬C∩¬A∩¬B=0.005$$

$$P(A|B') = \frac{P(C∩A∩B)+P(¬C∩A∩¬B)}{P(C∩A∩B)+P(¬C∩A∩¬B)+P(C∩¬A∩B)+P(¬C∩¬A∩¬B)} = \frac{0.06+0.18}{0.06+0.18+0.135+0.005}=0.63$$

In this case, the 25% reduction in observation accuracy has doubled the conditional probability for A!


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.