Calculating E(X^4) where X is the number of Heads minus number of Tails across n coin flips.

41 Views Asked by At

Let X equal the number of Heads minus number of Tails across n coin flips (fair coins). I'm running into issues figuring out how to calculate E(X^4).

I know $E(X) = E(2H-n) = 0$.

To calculate $E(X^2)$, I first calculated $Var(X) = Var(2H-n) = 4Var(H) = n$. Then I took the definition of variance $E(X^2) = Var(X) + (E(X))^2$ to get $E(X^2) = n + 0 = n$.

To try to calculate $E(X^4)$, I tried to use the same method by defining a variable $Y = X^2$ and got to the point of $E(Y^2) = Var(Y) + (E(Y))^2$. Since $E(Y) = E(X^2)$ and $E(X^2) = n$, I know $E(Y^2) = Var(Y) + n^2$. But I'm having trouble calculating $Var(Y)$ or $Var(X^2)$.

I get to the point of $Var(X^2) = Var((2H-n)^2)$, but having a lot of difficulty interpreting how to simplify this.

Am I approaching this completely wrong?

1

There are 1 best solutions below

0
On

A quick way is to observe that $L(s)=E(e^{(2H-n)s})=(\cosh s)^n$ and doing $s=0$ in $$\frac{d^4}{ds^4}L(s)=E(e^{(2H-n)s}(2H-n)^4)$$