2

I was asked the following question: $X$ is a random variable which follows a Bernoulli distribution with parameter $p$ and take $Y=a+bX$. Compute $\mathbb{E}(Y^3)$.

Silverfish
  • 20,678
  • 23
  • 92
  • 180
alex
  • 21
  • 1

1 Answers1

4

When it comes to computing expectations of discrete variables with a small number of possible values, I have often found it instructive to make a table of values and probabilities. For instance, a table for the Bernoulli$(p)$ variable $X$ might look like

$$\begin{array}{r | c c | r} & X & \text{Probability} &X \times \text{Probability}\\ \hline & 0 & 1-p & 0 \\ & 1 & p & p \\ \hline \text{Total} & & 1 & \mathbb{E}[X]=p \end{array}$$

The full information about the variable is contained in the two columns headed "$X$" (the values of $X$) and "Probability" (the chances of each value). The rightmost column shows the calculation of the expectation: one finds the products of the values and the probabilities, then adds them up.

From this table you can easily compute a table for the random variables $Y = a+bX$ and $Y^3$.

$$\begin{array}{r | c c r r | r} & X & \text{Probability} & Y & Y^3 & Y^3 \times \text{Probability}\\ \hline & 0 & 1-p & a + b\times 0 = a & a^3 &? \\ & 1 & p & a + b\times 1 = a + b & (a+b)^3 & ? \\ \hline \text{Total} & & 1 & & & \mathbb{E}[Y^3]=? \end{array}$$

I have left it to the interested reader to compute the missing values.

whuber
  • 281,159
  • 54
  • 637
  • 1,101
  • Magisterial! Happy fall, Professor! – Antoni Parellada Sep 23 '15 at 13:44
  • Thank you, @Antoni. If you think of the rows of this table as [tickets](http://stats.stackexchange.com/a/96000/919), then the table describes an entire box of tickets and their proportions in the box. It's an effective metaphor. – whuber Sep 23 '15 at 13:58