Suppose $U$ is uniformly distributed on $[0,1]$, $X_1,X_2$ are identically distributed and non-negative random variables. Assume that $U,X_1,X_2$ are independent. I was asked to calculate $P(U<X_1|X_1+X_2=1)$.
(1) I am confused that the event $\{X_1+X_2=1\}$ could have probability 0, i.e. $P(\{X_1+X_2=1\})=0$, then in that case how to define the conditional probability mentioned above?
Answer: I had a misunderstanding towards the concepts of conditional probability. Check https://en.wikipedia.org/wiki/Conditioning_%28probability%29#Conditional_probability_2 for instance.
(2) I had a "feeling" that the answer should be $\frac{1}{2}$ but I am not able to give a formal proof. Is this answer correct and how to prove it?
Answer: Using the definition in wikipedia, the problem is simple. The answer (according to the text I'm reading) is $0.5$.
We have: $$\begin{align} L&:=\lim_{\epsilon\to0}\mathbb{P}(U\le X_1 |\{1-\epsilon \le X_1+X_2 \le 1 \})\\ &=\lim_{\epsilon\to0}\frac{\mathbb{E}(\mathbf{1}_{\{U\le X_1\}}\cdot \mathbf{1}_{\{1-\epsilon \le X_1+X_2 \le 1 \}})}{\mathbb{E}( \mathbf{1}_{\{1-\epsilon \le X_1+X_2 \le 1 \}})}\\ &=\lim_{\epsilon\to0}\frac{\mathbb{E}(\mathbb{E}(\mathbf{1}_{\{U\le X_1\}}\cdot \mathbf{1}_{\{1-\epsilon \le X_1+X_2 \le 1 \}}|X_1))}{\mathbb{E}(\mathbb{E}( \mathbf{1}_{\{1-\epsilon \le X_1+X_2 \le 1 \}}|X_1))}\\ &=\lim_{\epsilon\to0}\frac{\mathbb{E}(\mathbb{E}(\mathbf{1}_{\{U\le X_1\}}|X_1)\cdot\mathbb{E}( \mathbf{1}_{\{1-\epsilon - X_1 \le X_2 \le 1-X_1 \}}|X_1))}{\mathbb{E}(\mathbb{P}( 1-\epsilon - X_1 \le X_2 \le 1-X_1|X_1))}\\ &=\color{red}{\lim_{\epsilon\to0}\frac{\mathbb{E}(\min \{{X_1,1}\} \cdot P_X(\max\{{1-X_1,0}\})-P_X(\max\{{1-X_1-\epsilon,0}\}))}{\mathbb{E}( P_X(\max\{{1-X_1,0}\})-P_X(\max\{{1-X_1-\epsilon,0}\}))}}\\ \end{align}$$
Take for example, $X_1$ and $X_2$ follow the uniform distribution $\mathcal{U}(0,1)$, then $$\begin{align} L&:=\lim_{\epsilon\to0}\frac{\mathbb{E}(X_1 \cdot (1-X_1-(1-X_1-\epsilon)^{+}))}{\mathbb{E}( 1-X_1-(1-X_1-\epsilon)^{+})}\\ &=\lim_{\epsilon\to0}\frac{\mathbb{E}(X_1(1-X_1)\mathbf{1}_{\{X>1-\epsilon\}}-\epsilon X\mathbf{1}_{\{X \le 1-\epsilon\}})}{\mathbb{E}((1-X_1)\mathbf{1}_{\{X>1-\epsilon\}}-\epsilon \mathbf{1}_{\{X \le 1-\epsilon\}})} \\ &= \lim_{\epsilon\to0} \frac{\int_{1-\epsilon}^1x(1-x)dx-\epsilon\int_{0}^{1-\epsilon}xdx}{\int_{1-\epsilon}^1(1-x)dx-\epsilon\int_{0}^{1-\epsilon}dx}\\ &= \frac{-\frac{13}{2}\epsilon+\frac{3}{2}\epsilon^2-\frac{5}{6}\epsilon^3}{-\epsilon+\frac{3}{2}\epsilon^2}\\ \color{red}{L}& \color{red}{=\frac{1}{2}} \end{align}$$
The case $X_1$ and $X_2$ follow the exponential distribution $\mathcal{E}(c)$, I let you calculate the analytical result. The result must be equal to: $$L:=\frac{\mathbb{E}(X\cdot \mathbf{1}_{\{X \le 1\}} \cdot ce^{-cX})}{\mathbb{E}( \mathbf{1}_{\{X \le 1\}} \cdot ce^{-cX})}=\color{red}{\frac{\int_0^1cxe^{-cx}dx}{\int_0^1ce^{-cx}dx}}$$