If $Z = X + Y$ where $X$ and $Y$ are two independent, uniform random variables, then what is the conditional distribution of $X | Z$? So I have been struggling with this question for a while. Suppose $X$ is uniformly distributed over an interval $(a, b)$ and $Y$ is uniformly distributed over $(-\sigma, \sigma)$, $X$ and $Y$ are independent. Consider a random variable $Z = X + Y$. What would be the conditional distribution of $X | Z$, i.e. $F_{X|Z}(x)$?
I know that $F_X(x) = \frac{x - a}{b-a}$ and $F_y(y) = \frac{y + \sigma}{2\sigma}$ but I am having trouble figuring out $F_{X|Z}(x)$. Could anyone help me? My gut says that $X|Z$ should be uniformly distributed over $(Z - \sigma, Z + \sigma)$ but I can't figure out how to prove this.
 A: $X|Z$ can't, in general, be uniformly distributed over $(z-\sigma,z+\sigma)$ because there are values of $z$ such that $(z-\sigma,z+\sigma)$ is not a subset of $(a,b)$. (Note that $Z$ is a random variable, $z$ is real number drawn from its distribution. $Z-\sigma$ is not a real number, because $Z$ is a random variable, not a real number. A random variable over the real numbers is different from a real number.)
Draw a rectangle with horizontal dimension $(a,b)$ and vertical $(-\sigma,\sigma)$. Then draw diagonal lines with slope $-1$ in the rectangle. Each diagonal line represents a constant value of $z$. For a particular $z_0$, $X$ will be uniformly distributed along the horizontal extension of the corresponding diagonal line. To find $X|Z$, you have to take several cases depending on whether $z<a$, $z>b$, $z<-\sigma$, $z>\sigma$.
A: You can show that the conditional density of $X$ given $X+Y$ is uniform by applying the change of variables formula. Define the transformation $(W,Z):=(X,X+Y)$. The joint density of $(W,Z)$ is
$$
f_{W,Z}(w,z)=f_{X,Y}(x(w,z),y(w,z)) = f_{X,Y}(w, z-w).\tag1$$ (Check that the Jacobian of the transformation is $1$.) Since the joint density of $(X,Y)$ is
$$f_{X,Y}(x,y)=I_{(a,b)}(x)I_{(-\sigma,\sigma)}(y),\tag2$$ write (1) as
$$
f_{W,Z}(w,z)=I_{(a,b)}(w)I_{(-\sigma,\sigma)}(z-w).\tag3
$$
Plotting in the $(w,z)$-plane, we find the density (3) is uniform over a skewed diamond shape. In fact, for fixed $z$ the value of (3) is zero unless $a<w<b$ and $z-\sigma<w<z+\sigma$, in which case the value of (3) is $1$. The key observation is that for fixed $z$, the expression (3), when nonzero, is constant as a function of $w$. This means that when we divide (3) by the marginal density $f_Z(z)$ (note we don't even have to compute the value!), the resulting conditional density $f_{W\mid Z}(w\mid z)$ remains constant as a function of $w$.
