The moment generating function of the binomial distribution with parameters n and p is given by: M(t) = (pe^t + 1 - p)^n
Calculating the first derivative of the moment generating function with respect to t and evaluating the function at t = 0 we get the expected value:
M’(t) = npe^t(p e^t + 1 - p)^(n-1) M’(0) = np
Hence, the expected value of the binomial distribution with parameters n and p is np.
Again, calculating the second derivative of the moment generating function with respect to t, evaluated at t = 0, we get the variance:
M”(t) = np e^t.(n-1).(p e^t + 1 - p)^(n-2).p e^t+ (p e^t + 1 - p)^(n-1).np e^t M”(0) = n(n-1)p^2 + np
Therefore, the variance of the binomial distribution with parameters n and p is n(n-1)p^2 + np.
The moment generating function of the exponential distribution with rate parameter \(\lambda\) is:
M(t) = E(e^(tX)) = \(\int\)[0,\(\infty\)] e^(tx) \(\lambda\)e^(-\(\lambda\)x) dx = \(\lambda\) / (\(\lambda\) - t), for t < \(\lambda\)
Now,the expected (first moment) value can be found by evaluating the first derivative of the moment generating function at t=0:
M’(0) = [d/dt (\(\lambda\) / (\(\lambda\)- t))]t = 0
= \(\lambda\) / (\(\lambda\) - 0)^2
= 1 / \(\lambda\)
Therefore, the expected value of the exponential distribution is 1/\(\lambda\).
The second moment can be found by evaluating the second derivative of the moment generating function at t=0:
M”(0) = [d^2 / dt^2 (\(\lambda\) / ( \(\lambda\)- t))]t = 0
= 2\(\lambda\) / (\(\lambda\) - 0)^3
= 2 / \(\lambda\)^2
Now, the variance of the exponential distribution is:
variance = M’(0)- {M”(0)}^2
= 2 / \(\lambda\)^2 - (1/\(\lambda\))^2
= 1/\(\lambda\)^2
Hence, the variance is 1/\(\lambda\)^2.