2nd derivative of the MGF of a binomial distribution

885 Views Asked by At

I was working with the MGF of a Bernoulli Distribution;
I expected the $2$nd derivative of it to be the variance $(np\times(1-p))$ but after deriving and putting $t = 0$ into the equation I came to the result:
$$E(X^2) = np(np+1-p)$$ Which is clearly not equal to the variance. I already double and triple checked my derivation with Wolfram Alpha but cant find any reason behind this.

My failed attempt

1

There are 1 best solutions below

0
On BEST ANSWER

The variance $E[X^2] - E[X]^2$ is not the same as the second moment $E[X^2]$.

The variance is $\text{Var}(X)=np(1-p)$ and the second moment is $$E[X^2] = \text{Var}(X) + E[X]^2 = np(1-p) + (np)^2 = np(np + 1 - p).$$