# What is $P(A|B,C)$ when $B$ and $C$ are independent?

Let's say that I know the following:

• $$P(A|B)$$ is the probability that a storm is coming given it's cloudy.
• $$P(A|C)$$ is the probability that a storm is coming given that the dogs bark.
• $$P(B)$$ and $$P(C)$$ are independent.

How do I compute the following?:

• $$P(A|B,C)$$, the probability of a storm coming given that it's cloudy AND the dogs are barking.

In layman's terms, I know that there is some likelihood that a storm is coming if it's cloudy. And, I know that there is some likelihood that a storm is coming if the dogs are barking. Therefore, shouldn't I have more confidence that a storm is coming if it's cloudy AND the dogs are barking? How do compute this?

The reason that I ask this question is because I am trying to combine measurements from two different sensors that measure the same thing. If I combine the measurements, shouldn't I expect greater confidence in my measurement?

This post and this post are related to my question, but the answers fall short in that I do not know the general probabilities of $$P(B)$$ and $$P(C)$$ to compute $$P(A|B,C)$$.

• Two concepts to familiarize yourself with are conditional independence and Bayes rule. Also know that you can sum over a joint distribution to get a marginal distribution: e.g. in loose notation $P(Y) = \sum_X P(XY)$. Commented Nov 3, 2022 at 15:39
• If the only inputs are the conditional probabilities $P(B|A)$ and $P(C|A)$ one cannot compute $P(A|B\cap C)$ [in general]. Commented Nov 3, 2022 at 16:01
• Thanks @Xi'an. To put my question into perspective, I would liken it to a scenario where I seek a second opinion from a doctor to determine if I have cancer: Let's say I want to know if I have cancer ($P(A)$). Doctor $B$ says I have cancer and is 75% sure ($P(B|A)=0.75$). I get a second opinion and Doctor $C$ also says I have cancer and is 75% sure ($P(C|A)=0.75$). Shouldn't I have a greater confidence than 75% that I have a cancer? Surely it is worth seeking a second opinion. Commented Nov 3, 2022 at 19:21

Note: This answer is to the original version of the question, which asked whether $$\mathbb{P}(B|A)$$ and $$\mathbb{P}(C|A)$$ can be used with no other information to obtain $$\mathbb{P}(A|B,C)$$.

Consider two scenarios, both of which have $$\mathbb{P}(B|A) = \mathbb{P}(C|A) = 0.5$$:

Scenario 1:

\begin{align*} \mathbb{P}(A,B,\overline C) &= 0.2 \\ \mathbb{P}(A,\overline B, C) &= 0.2 \\ \mathbb{P}(\overline A, B, C) &= 0.2 \\ \mathbb{P}(\overline A, \overline B, \overline C) &= 0.4 \end{align*}

Scenario 2:

\begin{align*} \mathbb{P}(A,B,C) &= 0.1 \\ \mathbb{P}(A,B,\overline C) &= 0.1 \\ \mathbb{P}(A,\overline B, C) &= 0.1 \\ \mathbb{P}(A,\overline B,\overline C) &= 0.1 \\ \mathbb{P}(\overline A, \overline B, \overline C) &= 0.6 \end{align*}

In scenario 1, $$\mathbb{P}(A|B,C) = 0$$. In scenario 2, $$\mathbb{P}(A|B,C) = 1$$. Clearly, you'll need more than just $$\mathbb{P}(B|A)$$ and $$\mathbb{P}(C|A)$$ to compute $$\mathbb{P}(A|B,C)$$.

• I'm not sure I follow. Perhaps I phrased my question incorrectly. To put it into perspective, my question could be changed to a scenario that is more familiar to us, "How do I quantify the probability of having cancer if I got an opinion from two different doctors?" Commented Nov 3, 2022 at 19:33
• @WilliamGrand I think you're still going to need some additional information. If A indicates you having cancer and B and C are two different doctors' prognosis, then $\mathbb{P}[B|A] = \mathbb{P}[C|A] = 0.75$ could be very informative (for instance, if $\mathbb{P}[B|\overline A] = \mathbb{P}[C|\overline A] = 0$) or very uninformative (for instance, if $\mathbb{P}[B|\overline A] = \mathbb{P}[C|\overline A] = 0.75$ -- the doctors are just guessing!). Commented Nov 3, 2022 at 19:54
• Thanks. I believe that is exactly how to phrase the question. What additional information are you suggesting that I need? Commented Nov 3, 2022 at 20:32

The answer is the conflation of probabilities, explained here.

In the syntax that answers my question, the equation becomes:

$$P(A|B,C)=\eta{P(A|B) P(A|C)}$$

where $$\eta$$ is the normalization factor:

$$\eta=\left({P(A|B)P(A|C) + P(\overline A|B)P(\overline A|C)}\right)^{-1}$$

My question could be changed to a scenario that is more familiar to us, "How do I quantify the probability of having cancer if I got an opinion from two different doctors?" Surely getting a second opinion will give us more confidence about the prognosis! If $$A$$ indicates you having cancer and $$B$$ and $$C$$ are two different doctors' prognosis (thanks @josliber), where $$P(A|B)=0.75$$ and $$P(A|C)=0.75$$, then applying those values in the equation above gives us:

$$P(A|B,C)=\frac{0.75 * 0.75}{0.75 * 0.75 + (1-0.75)*(1-0.75)}=0.9$$

Two doctors were 75% confident about their prognosis. Combining those prognoses gives us 90% confidence that I have cancer.

• By reading the linked answer, it looks like you're actually treating your data as $\mathbb{P}(A|B) = 0.75$ and $\mathbb{P}(A|C) = 0.75$, aka the probability that you have cancer given diagnosis by each of the two doctors. This is not what's written in the question or answer. Also, there's a very strong independence assumption being made, that's not acknowledged in your question or answer. Commented Nov 4, 2022 at 14:12
• As a thought exercise, imagine if doctor C always copied whatever doctor B says. Then clearly you wouldn't get any more confidence in your diagnosis from collecting C in addition to B. This highlights your need for independence assumptions. Commented Nov 4, 2022 at 14:15
• Ok, yes, $B$ and $C$ are independent. I suppose I should make that clear in the question. $P(A|B)$ vs. $P(B|A)$ almost sounds like a debate over semantics, i.e. what is the likelihood I have cancer given a positive prognosis vs. what is the likelihood I have a positive prognosis given I have cancer. It's difficult for me to identify which to use. Commented Nov 4, 2022 at 14:30
• $\mathbb{P}(A|B)$ and $\mathbb{P}(B|A)$ seem pretty different to me (in more than semantic ways!); luckily they're linked by Bayes' theorem as long as we know $\mathbb{P}(A)$ and $\mathbb{P}(B)$. Please add the independence assumption if you know it to be true! For cancer diagnosis by two differennnt doctors, I'd say it's rarely if ever true, but perhaps in your setting it could be. Commented Nov 4, 2022 at 14:46
• Your equation makes little sense why should we have the value $P(A|B,C) = 0.9$? Counterexample: consider the case where P(A) = P(B) = P(C) = 0.75 and A,B,C are independent, then the same values are entered in your formula but we should have $P(A|B,C) = 0.75$. Commented Nov 7, 2022 at 15:57

given values of

P(A|B,C) P(A|B,!C) P(A|!B,C) P(A|!B,!C)

given

P(B), P(C) and P(A|B) and P(A|C)

given B and C are independent

Then:

P(A|B) = P(A|B,C) * P(C) + P(A|B,!C) * P(!C) P(A|C) = P(A|B,C) * P(B) + P(A|!B,C) * P(!B)

This only gives you two equations but three unknowns P(A|B,!C), P(A|!B,C) and P(A|B,C).