just studied probability generating functions, and I have studied that a probability of $X^k$ while X is $bin(n,p)$ can be calculated using some formula with probability generating functions that argue - $E[X(X-1)(X-2)...(X-k+1)]$ = the kth derivative of $G_X(1)$.
I know that -
$X^3 = X(X-1)(X-2) + 3X^2 - 2X$
$E[X^3] = E[X(X-1)(X-2)] + 3E[X^2] -2E[X]$
but I'm having trouble to understand how to compute precisely
$E[X(X-1)(X-2)]$
Thanks
You have $E[X(X-1)(X-2)] = G_X^{\prime\prime\prime}(1)$, where $G_X(z)$ is the pgf of $X$.
In your particular case the pgf of a $bin(n, p)$ random variable is $G_X(z) = (q + pz)^n$. (Here $q = 1-p$, which is pretty much standard notation.)
So you can differentiate to get
$$G_X^\prime(z) = pn (q+pz)^{n-1}, G_X^{\prime\prime}(z) = (pn) (p(n-1)) (q+pz)^{n-2}, G_X^{\prime\prime\prime}(z) = (pn) (p(n-1)) (p(n-2)) (q+pz)^{n-3}.$$
Presumably you can take it from here, by plugging in $z = 1$ and simplifying.