Find the moment generating of the following distribution P(X=x)=q^x p, x=0,1,2

To find the moment generating of this distribution, we need to calculate the expectation of e^(tX), where X is the random variable and t is a constant.

The moment generating function is given by M(t) = E[e^(tX)].

To find the expectation, we can use the formula:

E[e^(tX)] = Σ e^(tx) * P(X=x)

Plugging in the given distribution, we have:

E[e^(tX)] = e^(t*0) * q^0 * p + e^(t*1) * q^1 * p + e^(t*2) * q^2 * p
= p + e^t * q*p + e^(2t) * q^2 * p

Therefore, the moment generating function M(t) of this distribution is:

M(t) = p + e^t * q*p + e^(2t) * q^2 * p