// Example 1.62 A man tosses a coin twice clc; clear; disp(1/4,"Probab. of getting 2 tails in 2 throws",1/2,"Probab. of getting 1 head and 1 tail in 2 throws",1/4,"Probab. of getting 2 heads in 2 throw"); disp(1,"If coin turns tail man will pay Rs =",2,"If coin turns head man will get Rs ="); disp(4.5,"Variance =",(1/4)*2*2+(1/2)*((1*2)+(1*(-1)))+(1/4)*2*(-1),"Expected gain is (1/4)*2*2+(1/2)*(1*2)+(1*(-1))+(1/4)*2*(-1) =");