The random variable X takes only the values x1 and x2 (where x1=x2), and the random variable Y takes only the values y1 and y2 (where y1=y2). Their joint distribution is given by
P(X=x1,Y=y1)=a ;P(X=x1,Y=y2)=q−a ;P(X=x2,Y=y1)=p−a . Show that if E(XY)=E(X)E(Y) then
(a−pq)(x1−x2)(y1−y2)=0. Hence show that two random variables each taking only two distinct values are independent if E(XY)=E(X)E(Y).
Give a joint distribution for two random variables A and B, each taking the three values −1, 0 and 1 with probability 31, which have E(AB)=E(A)E(B), but which are not independent.