# Probability - A Conceptual Doubt

Why, when calculating the conditional probability of A given B, do we assume that the probability of B is greater than zero?

• think of B containing A. If B had no members, it could not contain a ∈ A ⊂ B. Mar 18, 2018 at 3:54
• If $P(B) = 0$, then you have freedom to choose the value of $P(A\mid B)$, and any such choice never affects the computation of probability under $P$ in view of the law of total probability. In layman's terms, you can assume whatever for something that never happens. This convention is often theoretically useful, especially when you need to consider a family of conditional probabilities (such as transition kernel of a Markov process). Mar 18, 2018 at 4:14
• @isomorphismes: $P(B)=0$ does not imply $B=\emptyset$. Mar 18, 2018 at 11:24

We have

$$P(A\mid B)=\frac{P(A\cap B)}{P(B)}$$

If $P(B)=0$ then the RHS is undefined.

Also, if we're given that $B$ happens then it cannot be the case that $P(B)=0$. That's a contradiction.

Here is an example of when we can still calculate $P(A|B)$ when $P(B)=0$

Let $X\sim N(0,1)$ and $Y\sim N(0,1)$

Let $A$ be the event that $X\lt1$ and let $B$ be the event that $X+Y=2$

Then $P(A)=\Phi(1) \approx 0.8413$ and $P(B)=0$ since the normal distribution is continuous but still $P(A|B)=0.5$

• "Also, if we're given that B happens then it cannot be the case that P(B)=0. That's a contradiction." — Consider an uniform distribution on $[0,1]$. Then $P(\{x\})=0$ for all $x\in [0,1]$. Thus from your claim it would follow that you cannot get any value from $[0,1]$. But a probability distribution of $[0,1]$, including the uniform distribution, exactly means that the random variable takes a values from that interval. A contradiction. Mar 18, 2018 at 11:30
• Your statement in your first section is true in discrete probability spaces but not necessarily in continuous ones. I'm sure you know this but it should be pointed out to others. Mar 18, 2018 at 11:52
• What does the notation N(x,y) stand for? Mar 18, 2018 at 12:29
• Normally distributed with mean 0 and variance 1
– Remy
Mar 18, 2018 at 21:09

It is to avoid the divide-by-zero error that occurs when you try to divide by zero.

The definition of a conditional probability mass function, that $\mathsf P(A\mid B):=\mathsf P(A\cap B)\div\mathsf P(B)$ is only viable when $B$ has an non-zero measure.

Still, however, when $\mathsf P(B)=0$ there are other compatible definitions for conditional probability measures that can be used; although they are not necessarily probability mass functions.

• Could you please elaborate on the other functions that are used for conditional probability, when P(B) = 0? I've never heard of them before. If it's worth it, just add it to your answer :) Mar 18, 2018 at 3:39