Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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$.
share|cite|improve this question
up vote 0 down vote accepted


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}$

share|cite|improve this answer

$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$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.