[Math] Probability expectation and variance of a random variable polynomial

probability

Edited: Let's say we have random variables $A,B\sim\mathcal{U}(0,1)$.
We can easily calculate their expectation and variance and get $E(A)=E(B)=\frac{1}{2}$ and $Var(A)=Var(B)=\frac{1}{12}$.
However, what bothers me is how we can calculate expectation and variance of a random variable that can be expressed like this for example:
$$Y=3A^6-2B^2$$
How can we calculate the expectation and variance of $A^6$? I guess $B^2$ should follow from that. A and B are independent of each other.

Best Answer

We may use the Linearity of Expectation and the Bilinearity of Covariance.

$\begin{split}Y&\mathop{:=}3A^6-2B^2\\\therefore\qquad& \\\mathsf E(Y)&=3\mathsf E(A^6)-2\mathsf E(B^2)\\ \mathsf {Var}(Y)&=9\mathsf{Var}(A^6)+4\mathsf{Var}(B^2)-12\mathsf{Cov}(A^6,B^2) \\ &= 9\mathsf E(A^{12})-9\mathsf E^2(A^6)+4\mathsf E(B^{2})-4\mathsf E^2(B^2)-12\mathsf E(A^{6}B^2)+12\mathsf E(A^6)\mathsf E(B^2)\end{split}$

How those terms evaluate depends, of course, on how $A,B$ are jointly distributed.


When $A,B$ are independent and identically uniform distributed over $(0;1)$, we first note that the covariance will be zero, so only have to worry about expectation of the powers of each variable.

Now for $n\geq 1$ we have $\mathsf E(A^n)=\mathsf E(B^n)=\int_0^1 x^n~\mathsf d x =\tfrac 1{n+1}$, by definition for the uniform distribution, and the rest is just substitution.

For example: $\mathsf {Var}(A)=\mathsf E(A^2)-\mathsf E^2(A)=\tfrac 13-\big(\tfrac 12\big)^2=\tfrac 1{12}$

Related Question