Let X1 and X2 have a trinomial distribution. Differentiate the moment-generating function to show that their covariance is -np1p2 Solution The moment generating function is (p1e^t1` + p2e^t2 + 1 - p1 - p2)^n Using the derivative with repect to t1 and t2 gives us E[x1x2] Then, var(x1,x2) = E(x1x2) - E(x1)E(x2) We know that E(x1) = np1 and E(x2) = np2. We can also see this from the first derivative of the moment generating function. The derivative with respect to t1 is np1e^t1(p1e^t1` + p2e^t2 + 1 - p1 - p2)^(n-1) (Note that this gives us E(x1) = np1; calculating for x2 similiarly gives us E(x2) = np2) Then, the derivative with respect to t2 is np1e^t1(n-1)p2e^t2(p1e^t1` + p2e^t2 + 1 - p1 - p2)^(n-2) Evaluating this at t1 = t2 = ...=tk-1 = 0, we getnp1(n-1)p2(1)^n-2= np1(n-1)p2 Then the covariance isnp1(n-1)p2 - np1(np2) = p1p2(n^2-n)-n^2p1p2 = p1p2(n^2-n-n^2) = -np1p2.