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)$.
-
That's the thing I don't even know where to start. I am not aksing for the fully developed solution. But if someone could be knd enough to at least tell me how I can start solving this.... – alex Sep 23 '15 at 08:31
-
2Can you try to compute $\mathbb{E}[X]$, $\mathbb{E}[X^2]$, $\mathbb{E}[X^3]$? Then you are almost done. – Xi'an Sep 23 '15 at 08:33
-
E[X] = p right ? then E[X^2] = p^2 and so on – alex Sep 23 '15 at 08:43
-
Ok so E[X]= p, E[X^2] = p, E[X^3] = p – alex Sep 23 '15 at 08:53
-
1You are one line away from the answer: what is $Y^3$? – Xi'an Sep 23 '15 at 08:55
-
Not so sure about this one. Math is not my strong suit.Y^3 = (a+bX)^3 – Sep 23 '15 at 09:12
-
1Multiplication distributes over addition - expand out the brackets. – Scortchi - Reinstate Monica Sep 23 '15 at 11:49
1 Answers
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.

- 281,159
- 54
- 637
- 1,101
-
-
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