Can someone tell me if I made any mistakes on this proof :
prove :$$E(X|A)=\frac{E[XI_a]}{P(A)}$$ where $I_a=1$ if event A occurs, else $I_a=0$.
$$E(XI_a)=I_aE(E(X|A))=I_a\sum_AE(X|A)p(A)=E(X|A)p(A)$$ With the last equality being true because $A\neq0=>I_a=0$ $$E(X|A)p(A)=E(XI_a)=>E(XI_a)/p(A)=E(X|A) $$