Artificial intelligent assistant

Partial Marginalization of 3 variable conditional probability I have a 3 variable (A,B,C) joint distribution function made according to the formula C := A + B; A and B are independent. So, the probability distribution is: A B C P(A,B,C) --------------------- 0 0 0 0.25 0 1 1 0.25 1 0 1 0.25 1 1 1 0.25 And remaining cases have zero probability. I'm trying to get the distribution obtained by marginalize the variable B Now, P(A,B,C) = P(A).P(B).P(C|A,B) If I try to marginalize this distribution with respect to B, I get: P(A,C) = P(A).P(B=0).P(C|A,B=0) + P(A).P(B=1).P(C|A,B=1) But I'm not sure how to get the final P(A,C) expression from that, because the final P(A,C) should have a distribution of: A C P(A,C) --------------------- 0 0 0.25 0 1 0.25 1 0 0 1 1 0.5 I initially thought it would be P(A,C) = P(A).P(C|A), but it seems that's not the case here.

Notice that because $C=A+B$ , then: $$~\mathsf P(C=z\mid A=x, B=y) ~ = ~ \begin{cases} 1 &:& x+y=z~,~x\in\\{0,1\\}~,~y\in \\{0,1\\}\\\\[0.5ex]0 &:& \text{elsewhere}\end{cases}$$

So, therefore: $$\begin{align} \mathsf P(A=x, B=y, C=z) ~ = ~ & \mathsf P(A=x) ~ \mathsf P(B=y) ~ \mathbf 1_{x+y=z} \\\\[1ex] = ~ & \tfrac 1 4 ~ \mathbf 1_{x\in\\{0,1\\}~,~y\in \\{0,1\\}~,~z=x+y} \end{align}$$

Because $~\mathsf P(A=x)~=~\tfrac 12~\mathbf 1_{x\in \\{0, 1\\}}~$ and likewise for the p.m.f. of $B$.

$\Box$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy e78700f5a2c022b71e1abd8d58c69508