# Bernoulli Random Variable

Let $X$ be a Bernoulli random variable with probability of success $p$. Answer the following questions.

• (i) Derive the formulas for the mean, the variance, and the standard deviation of X.
• (ii) Find the third and fourth moments of $X$.
-
Welcome to math.SE: since you are new, I wanted to let you know a few things about the site. In order to get the best possible answers, it is helpful if you say in what context you encountered the problem, and what your thoughts on it are; this will prevent people from telling you things you already know, and help them give their answers at the right level. If this is homework, please add the homework tag; people will still help, so don't worry. Also, many find the use of imperative ("Prove", "Solve", etc.) to be rude when asking for help; please consider rewriting your post. –  Fabian Jan 18 '13 at 6:37

$E(e^{Xt})=E(1+Xt+X^2\frac{t^2}{2!}+\cdots)=1+E(X)t+E(X^2)\frac{t^3}{3!}+\cdots$

Now, $p_X(0)=1-p$ and $p_X(1)=p$

hence, $E(e^{Xt})=e^{0.t}p_X(0)+e^{1.t}p_X(1)=1-p +e^tp=(1-p)+p(1+t+t^2/2!+t^3/3!+\cdots)= 1+pt+p(t^2/2!)+p(t^3/3!)+\cdots$

Now, $r_{th}$ moment of $X$= coefficient of $t^r/r!$ in expansion of $E(e^{Xt})$ which is coming out to be $p$ $\forall r\in \Bbb N$

Therefore, $E(X^r)=p$ $\forall r\in \Bbb N$.

therefore, Mean=$E(X)=p$

variance= $E(X^2)-(E(X))^2=p-p^2$

Standard deviation =$\sqrt{variance}$

-

$X$ has probability density function given by $$p_X(0)=P(X=0)=(1-p),\quad p_X(1)=P(X=1)=p.$$ By knowing these probabilities, we can find the moments of any order by using the law of the unconscious statistician, i.e. $$E[g(X)]=\sum_{x=0}^1g(x)p_X(x)$$ for any function $g$. Try this with $g(x)=x$, $g(x)=x^2$, $g(x)=x^3$ and $g(x)=x^4$, and recall that $\mathrm{Var}(X)=E[X^2]-E[X]^2$.

-