Let $(\Omega, \mathcal{F}, \mathbb{P})$ be a probability space
Denote by $\mathcal{B}$ the Borel $\sigma$-algebra on $\mathbb{R}$, denote by $\lambda$ the Lebesgue measure on $(\mathbb{R}, \mathcal{B})$. We will use the term random variable to refer to a function $\varphi : \Omega\rightarrow\mathbb{R}$ that is $\mathcal{F}/\mathcal{B}$-measurable. For every random variable $\varphi$, we will write $R_{\varphi}$ to denote $\varphi$'s range, and we will write $\mathbb{P}_{\varphi}$ to denote $\varphi$'s distribution, in other words $\mathbb{P}_{\varphi}:\mathcal{B}\rightarrow[0,1]$ is the function satisfying $\mathbb{P}_{\varphi}(B) = \mathbb{P}\big(\varphi^{-1}(B)\big)$ for every Borel set $B \in \mathcal{B}$. For every random variable $\varphi$ we will denote by $\mathbb{E}(\varphi)$ $\varphi$'s expectation w.r.t. $\mathbb{P}$, and for every pair of random variables $\varphi, \psi$ we will denote by $\mathbb{E}(\varphi|\psi)$ the conditional expectation of $\varphi$ given $\psi$ w.r.t. $\mathbb{P}$.
Now, let $X, Y$ be random variables such that
- $X$ and $Y$ are mutually independent w.r.t. $\mathbb{P}$,
- $R_X$ is countable (i.e. $R_X$'s cardinality is $\leq \aleph_0$),
- $\mathbb{P}_Y \ll \lambda$,
- $X$ is integrable in $(\Omega, \mathcal{F}, \mathbb{P})$.
I'd like to find $\mathbb{E}(X|X+Y)$, up to a $\mathbb{P}$-null set.
I managed to solve this problem for a special case (see below), but I need help with the general case.
Solution for a special case
I will solve the question for the special case that
- $\inf\ \big\{|x - y|\ :\ x, y \in R_X,\ x \neq y \big\} \in (0,\infty)$.
- $R_Y \subseteq \big(-\frac{a}{2}, \frac{a}{2}\big)$, where $a$ is the above infimum.
Define $g$ to be the function $g:\mathbb{R}\rightarrow\big(R_X\cup\{0\}\big)$ satisfying for every $r \in \mathbb{R}$ that $g(r) = x$ if $r \in \big(x-\frac{a}{2}, x+\frac{a}{2}\big)$ for some $x \in R_X$ and $g(r) = 0$ otherwise.
$g$ is $\mathcal{B}/\mathcal{B}$-measurable and satisfies: $g\circ(X+Y) = X$. Therefore $g\circ(X+Y)$ is $\sigma(X+Y)/\mathcal{B}$-measurable ($\sigma(X+Y)$ being the $\sigma$-algebra on $\Omega$ generated by $X+Y$) and we have for every $A \in \sigma(X+Y)$, $$ \mathbb{E}\Big(\big(g\circ(X+Y)\big)\mathbb{1}_A\Big) = \mathbb{E}(X\mathbb{1}_A). $$
This shows that $g\circ(X+Y) = \mathbb{E}(X|X+Y)$, up to a $\mathbb{P}$-null set. QED
Remark
Note that my special-case solution makes no use of the fact that $X$ and $Y$ are independent, nor of the fact that $\mathbb{P}_Y \ll \lambda$. Also, the fact that $R_X$ is countable can be deduced from the assumption that $\inf\ \big\{|x - y|\ :\ x, y \in R_X,\ x \neq y \big\} \in (0,\infty)$.
Let $p$ and $f$ denote the pmf and pdf of $X$ and $Y$, respectively. Then for $\epsilon>0$, $$ h_z(\epsilon):=\mathsf{P}(|X+Y-z|\le \epsilon)=\sum_{x\in R}p(x)\int_{z-x-\epsilon}^{z-x+\epsilon}f(y)\,dy $$ and $$ g_z(\epsilon):=\mathsf{E}[X1\{|X+Y-z|\le \epsilon\}]=\sum_{x\in R}xp(x)\int_{z-x-\epsilon}^{z-x+\epsilon}f(y)\,dy. $$ Finally, $$ \mathsf{E}[X\mid X+Y=z]=\lim_{\epsilon\to 0}\frac{g_z(\epsilon)}{h_z(\epsilon)}. $$