Let be the probability that random variable takes the value and random variable takes the value . Then the covariance between and is: