P(A=0)=(2/3)^4=16/81
P(A=1)=4*(2/3)^3*(1/3)=32/81
P(A=2)=6*(2/3)^2*(1/3)^2=24/81
P(A=3)=4*(2/3)*(1/3)^3=8/81
P(A=4)=(1/3)^4=1/81
E(A)=0*16/81+1*32/81+2*24/81+3*8/81+4*1/81=4/3
P(A=0)=(2/3)^4=16/81
P(A=1)=4*(2/3)^3*(1/3)=32/81
P(A=2)=6*(2/3)^2*(1/3)^2=24/81
P(A=3)=4*(2/3)*(1/3)^3=8/81
P(A=4)=(1/3)^4=1/81
E(A)=0*16/81+1*32/81+2*24/81+3*8/81+4*1/81=4/3