How do you calculate $E(X^2)$ given the the number of trials and the probability of success?
$E(X) = np$, then $E(X^2) = $?
Do we have to draw up a table for $n=0,1,2,\ldots,n$ and then use the probability of success for each.
$$E(X) = x \ P(X=x) \ldots$$ this would take forever, is there a shortcut?
Answer
Well, $\mathrm{var}(X) = np(1-p)$ and $\mathrm{var}(X) = E(X²) - (E(X))^2$, so: $$E(X²) = \mathrm{var}(X) + (E(X))² = np(1-p) + n^2p^2 = np(1-p+np)$$
No comments:
Post a Comment