Confusion about sum of random variables conditional probabilities Let $X,Y$ be independent random variables, and $Z = X+Y.$
Then I want to calculate $Pr[X = x \mid Z = z].$ My confusion is on evaluating this expression.
On the one hand, I have $Pr[X = x \mid Z = z] = Pr[Z - Y = x \mid Z = z] = Pr[z - Y = x] = Pr[Y = z - x].$
But also, $Pr[Z = z \mid X = x] = Pr[X+Y = z \mid X = x] = Pr[Y = z - x].$ So these two probabilities are equal? But $Pr[Z = z \mid X = x] Pr[X = x] = Pr[X = x \mid Z = z] Pr[Z = z]$ and in general $Pr[X = x]$ and $Pr[Z = z]$ are not equal. I believe it should be $Pr[X = x \mid Z = z] = Pr[Y = z - x \mid Z = z]$ but I don't think the conditional $Z = z$ can be removed since $Y$ and $Z$ are not independent?
I'm not sure whether the first equation holds either. For example, if I roll a fair six sided die $X$ (numbered 1 to 6) and roll a fair ten sided die $Y$ and take the sum, then $Pr[X = 1 \mid Z = 2] = 1$ since the only possible outcome is $(x,y) = (1,1),$ and this is not equal to $Pr[Y = (2-1)] = 1/10.$ On the other hand it is equal to $Pr[Y = (2-1) \mid Z = 2] = 1.$ I think I'm making a mistake in one of these but it's not clear to me in which step.
(The context of this was that $X$ is a random variable with given distribution representing some unknown parameter and $Y$ is a standard normal error. Then you observe $z = x + y$ and want to estimate the $X.$)
 A: The mistake lies in this step:

$$Pr[Z−Y=x∣Z=z]=Pr[z−Y=x]$$

Note that $P(A|B)=\frac{P(B|A)\cdot P(A)}{P(B)}$. The actual evaluation is instead
$$P(Z-Y=x|Z=z)=\frac{P(Z=z|Z-Y=x)\cdot P(Z-Y=x)}{P(Z=z)}=\frac{P(Z=z|X=x)\cdot P(X=x)}{P(Z=z)}$$
If we are given $X=x$, $Z=z$ only when $Y=z-x $. Thus, $P(Z=z|X=x)=P(Y=z-x)$. The above formulation should make it clear that this is not true for $P(X=x|Z=z).$We now have
$$P(Z-Y=x|Z=z)=P(Y=z-x)\cdot\frac{ P(X=x)}{P(Z=z)}$$

In your dice example, this evaluates as
$$P(X=1|Z=2)=P(Y=1)\cdot\frac{ P(X=1)}{P(Z=2)}=\frac{1}{10}\cdot\frac{\frac1 6}{\frac1 {60}}=1$$
as expected.

I shall take another example, to make it clearer. Let us calculate the probability $P(X=2|Z=5)$. We see that $Z=5$ is achieved by the following pairs : $$(X,Y)=\{(1,4),(2,3),(3,2),(4,1)\}\implies P(X=2|Z=5)=\frac14$$
Using the formula, we can calculate the same as $$P(X=2|Z=5)=P(Y=3)\cdot \frac{P(X=2)}{P(Z=5)}=\frac1{10}\cdot \frac{\frac16}{\frac4{60}}=\frac14$$
which is the same as before.
[$P(Z=5)=\frac{4}{60}$ as there are $60$ possible $(X,Y)$ and $Z=5$ is only achieved by $4$]
