# Conditional probability of continuous variable

Suppose that random variable $U$ follows a continuous Uniform distribution with parameters 0 and 10 (i.e. $U \sim \rm{U}(0,10)$ )

Now let’s denote A the event that $U$ = 5 and B the event that $U$ is equal either to $5$ or 6.
According to my understanding, both events have zero probability to occur.

Now, if we consider to compute $P(A|B)$ , we cannot use the conditional law $P\left( {A|B} \right) = \frac{{P\left( {A \cap B} \right)}}{{P\left( B \right)}}$, because $P(B)$ is equal to zero.
However, my intuition tells me that $P(A|B) = 1/2$.

“The concept of a conditional probability with regard to an isolated hypothesis whose probability equals 0 is inadmissible.” A. Kolmogorov

For continuous random variables, $$XX$$ and $$YY$$ say, conditional distributions are defined by the property that they recover the original probability measure, that is, for all measurable sets $$A∈A(X)A\in\mathcal{A}(\mathbf{X})$$, $$B∈B(Y)B\in\mathcal{B}(\mathbf{Y})$$,$$P(X∈A,Y∈B)=∫BdPY(y)∫BdPX|Y(x|y)\mathbb{P}(X\in A,Y\in B)=\int_B \text{d}P_Y(y) \int_B \text{d}P_{X|Y}(x|y)$$This implies that the conditional density is defined arbitrarily on sets of measure zero or, on other words, that the conditional density $$pX|Y(x|y)p_{X|Y}(x|y)$$ is defined almost everywhere. Since the set $${5,6}\{5,6\}$$ is of measure zero against the Lebesgue measure, this means that you can define both $$p(5)p(5)$$ and $$p(6)p(6)$$ in absolutely arbitrary manners and hence that the probability $$P(U=5|U∈{5,6})\mathbb{P}(U=5|U\in\{5,6\})$$can take any value.

This does not mean you cannot define a conditional density by the ratio formula $$f(y|x)=f(x,y)/f(x)f(y|x)=f(x,y)\big/f(x)$$as in the bivariate normal case but simply that the density is only defined almost everywhere for both $$xx$$ and $$yy$$.

“Many quite futile arguments have raged – between otherwise competent
probabilists – over which of these results is ‘correct’.” E.T. Jaynes

The fact that the limiting argument (when $$ϵ\epsilon$$ goes to zero) in the above answer seems to give a natural and intuitive answer is related with Borel’s paradox. The choice of the parametrisation in the limit matters, as shown by the following example I use in my undergrad classes.

Take the bivariate normal $$X,Yi.i.d.∼N(0,1)X,Y\stackrel{\text{i.i.d.}}{\sim}\mathcal{N}(0,1)$$ What is the conditional density of $$XX$$ given that $$X=YX=Y$$?

If one starts from the joint density $$φ(x)φ(y)\varphi(x)\varphi(y)$$, the “intuitive” answer is [proportional to] $$φ(x)2\varphi(x)^2$$. This can be obtained by considering the change of variable $$(x,t)=(x,y−x)∼φ(x)φ(t+x)(x,t)=(x,y-x) \sim \varphi(x)\varphi(t+x)$$ where $$T=Y−XT=Y-X$$ has the density $$φ(t/√2)/√2\varphi(t/\sqrt{2})/\sqrt{2}$$. Hence $$f(x|t)=φ(x)φ(t+x)φ(t/√2)/√2f(x|t)=\dfrac{\varphi(x)\varphi(t+x)}{\varphi(t/\sqrt{2})/\sqrt{2}}$$ and $$f(x|t=0)=φ(x)φ(x)φ(0/√2)/√2=φ(x)2√2f(x|t=0)=\dfrac{\varphi(x)\varphi(x)}{\varphi(0/\sqrt{2})/\sqrt{2}}=\varphi(x)^2\sqrt{2}$$ However, if one considers instead the change of variable $$(x,r)=(x,y/x)∼φ(x)φ(rx)|x|(x,r)=(x,y/x) \sim \varphi(x)\varphi(rx)|x|$$ the marginal density of $$R=Y/XR=Y/X$$ is the Cauchy density $$ψ(r)=1/π{1+r2}\psi(r)=1/\pi\{1+r^2\}$$ and the conditional density of $$XX$$ given $$RR$$ is $$f(x|r)=φ(x)φ(rx)|x|×π{1+r2}f(x|r)=\varphi(x)\varphi(rx)|x| \times \pi \{1+r^2\}$$ Therefore, $$f(x|r=1)=πφ(x)2|x|/2.f(x|r=1)= \pi\varphi(x)^2|x|/2\,.$$
And here lies the “paradox”: the events $$R=1R=1$$ and $$T=0T=0$$ are the same as $$X=YX=Y$$, but they lead to different conditional densities on $$XX$$.