Use A for Z and B for Market. Returns are expressed as decimals in the calculations.
E[RA]=0.1(0.3)+0.25(0.2)+0.5(0.15)+0.15(−0.2)=0.125 E[RB]=0.1(0.12)+0.25(0.1)+0.5(0.08)+0.15(0.06)=0.086 Var(A)=0.0030625+0.00140625+0.0003125+0.01584375=0.020625 Var(B)=0.0001156+0.000049+0.000018+0.0001014=0.000284 σA=0.020625,σB=0.000284 Cov(A,B)=s∑ps(As−E[A])(Bs−E[B])=0.00205 ρAB=0.020625×0.0002840.00205≈0.847028 Covariance = 0.002050; correlation = 0.847028.