Final answer:
To find the moments of the random variable Y from the generating function, we differentiate the function with respect to t and evaluate it at t=0. The first moment is -p + q and the second moment is p + q.
Step-by-step explanation:
To find the moments of the random variable Y from the generatingfunction M(t) = pe-t + qet + 1 - p - q, we need to find the coefficients of the terms in the power series expansion. In this case, the generating function is a polynomial, so the moments can be found by taking derivatives of the generating function and evaluating them at t=0.
a. To find the first moment (mean), we take the first derivative of the generating function with respect to t. M'(t) = -pe-t + qet. Evaluating this at t=0, we get M'(0) = -p + q. So the first moment is -p + q.
b. To find the second moment (variance), we take the second derivative of the generating function with respect to t. M''(t) = pe-t + qet. Evaluating this at t=0, we get M''(0) = p + q. So the second moment is p + q.