# Combination of Random Variables Conditional Probability

If A and B are independent discrete random variables and C = A+B, then how should one compute the pmf of P(A|C)?

For example, let X be the result from a coin toss(1 or 0 for H and T) and Y be the result from a second coin toss.

Then, the combinations are x,y,z = (1,1,2)(0,1,1)(1,0,1)(0,0,0)

Thus P(Y|Z) is: when z = 0, P(Y=1|Z=0) = 0. and P(Y=0|Z=0) = 1 when z = 1, P(Y=1|Z) = 1/2 and when Z=2, P(Y|Z) = 1 and so on

How can this be summarized in to a PMF? and what should be the approach for continuous random variables?

By Bayes' rule, $P(A|C)=P(C|A)P(A)/P(C)$
Then, $P(C|A)=P(A+B|A)$ which is a shift of $B$ by $A=a$: $P(A+B<b|A=a)=P(B<b-a|A=a)=P(B<b-a)=F_{B}(b-a)$.
• if $A$ is given (i.e. $A=a$), then $B-a$'s probability will be the same but shifted in values by a values $a$ (consider a coin toss, shifted by the value $1$ for instance). About the marginals, you need to know them. If the variables are continuous then you can use this with densities.