  disp('Cov/Corr of Two Discrete Random Variables')
  lw = 2; 
  set(0, 'DefaultAxesFontSize', 14);
  fs = 14;
  msize = 10;  

X=[1 2]; pX=[0.6 0.4]; EX = X * pX'
   %EX = 1.4000

Y=[5 10 15]; pY=[0.35  0.3  0.35]; EY = Y*pY'
   %EY =10

XY =[5 10 15 20 30];  ...
pXY=[0.1   0.2+0.25   0.3  0.1  0.05];  EXY=XY * pXY'
   %EXY = 13
   
CovXY = EXY - EX * EY
   %CovXY = -1
   
 VarX = (X - EX).^2   *  pX'   %VarX = 0.24
 VarY = (Y - EY).^2   *  pY'   %VarY = 17.5

 CorrXY = CovXY /sqrt(VarX * VarY)  %-0.488
 
 