# Probability of a conditional event vs. expected probability of a conditional event

I'm having a hard time understanding the two different approaches of measuring probability of an event.

Suppose there are two events $$A$$ and $$B$$.

1) Event $$A$$ occurs with probability $$p_A$$. This $$p_A$$ itself is random, so it has a pdf $$f_A(p_A)$$ over $$[0,1]$$.

2) Likewise, event $$B$$ occurs with probability $$p_B$$, and the pdf of $$p_B$$ is denoted by $$f_B$$.

3) The joint event $$A\cap B$$ occurs with probability $$p_{A}$$. That is, the event $$A$$ is nested in the event $$B$$.

What I want to calculate is the "probability of event $$A$$ when event $$B$$ has occured". The two approaches I'm confusing is as follows

Approach 1: It's simply the expected value of $$p_{A|B}$$. So, the prob. is given by $$\int p_{A|B}f_{A|B}dp_{A|B}=\int\frac{p_{A}}{p_B}f_{A|B}(p_A,p_B)dp_Adp_B.$$

Approach 2: Using the formula for a conditional probability, we have $$P[A|B]=\frac{P[A]}{P[B]}=\frac{\int p_Af_A(p_A)dp_A}{\int p_B f_B(p_B)dp_B}.$$

As far as I believe, the two approaches do not have to produce the same answers. Which approach should be the correct one and what are the differences in the interpretation?

It's simply the expected value of $$p_{𝐴|𝐵}$$
We're saying that $$P(A|B)=E[p_{A|B}]$$, but at first, $$p_{A|B}$$ needs a proper definition, which in turn should, maybe, demystify other terms: $$f_{A|B}(p_A,p_B)$$.
The second approach follows directly from total probability law and Bayes Theorem: $$P(A|B)=\frac{P(A\cap B)}{P(B)},\ \ P(A)=\int \underbrace{P(A|p_A)}_{p_A}f_{p_A}(p_A)dp_A=E[p_A]$$
• So, it's wrong to use the mean of the probabilities of event to represent the probability of event. and it's because it's just a first moment that does not contain all the information about the probabilities($p_{A|B}$)? Oct 3 '19 at 2:18
• I just have doubts about $p_{A|B}\overbrace{=}^?p_A/p_B$, and the meaning imposed over $p_{A|B}$. How would you describe it? If I'm not mistaken, your sentence "it's wrong to use the mean of the probabilities of event to represent the probability of event" implies that $P(A)\neq E[p_A]$, but it is actually true. Oct 3 '19 at 10:13