Problem 2
Calculate the expected value and variance of the binomial distribution using the moment generating function.
Given:
The \(B_{n,p}\)binomial distribution of X, the moment generating function is given as:
\(M_{(t)} = (pe^t + (1-p))^n\)
The Expected Value of X is given as the first derivative:
\(M'_{(t)} = n(pe^t + (1-p))^{n-1}pe\)
\(E(X) = M'_{(0)} = np\)
The variance is given as the second derivative:
\(M''_{(t)} = n((1-p)+pe^t)^{n-1}(pe^t)n(n-1)(1-p^tpe^t)(pe^t)\)
\(E(X^2) = M''_{(0)}= n(n-1)p^2 + np\)
\(Var(X) = E(X^2) - E(X)^2\)
\(n(n-1)p^2 + np - (np)^2\)
\((np^2) - np^2 + np - np^2\)
\(np(1 - p)\)
Problem 3
Calculate the expected value and variance of the exponential distribution using the moment generating function.
The moment generating function for Exponential distribution is given as:
\(M_{(t)} = \lambda/(\lambda - t)\)
The Expected Value is given as the first derivative:
\(M'_{(t)} = \lambda/(\lambda - t)^2\)
\(E(X) = M'_{(0)} = 1/\lambda\)
The Variance is given as the second derivative:
\(M''_{(t)} = 2\lambda/(\lambda - t)^3\)
\(E(X^2) = M''_{(0)} = 2/\lambda^2\)
\(Var(X) = E(X^2) - E(X)^2\)
\(= 2/\lambda^2 - 1/\lambda^2\)
\(= 1/\lambda^2\)