Notes for Monday 26 March (includes Monday 19 March)

(after Test 2)

Last Monday we discussed:

• Computing the expected value for a continuous RV

• Define the variance and standard deviation for discrete and for continuous RVs

• Computing the variance for discrete and continuous RVs, using the definition and also the “computational formula”.

All definitions and many of the computations are in the slideshows:

Math2501ExpectedValueForRVs-slideshow

Math2501VarianceForRVs-slideshow

Make sure that you know the definitions and the notations! There is a pretty good summary of the notation, facts, and definitions about random variables in the box on the first page of these notes

(which are on the distributions and densities we will study next, so you may want to look through them.)

 

Another example worked in class: We also computed the expected value and variance for a continuous RV with pdf $f(x) = 3x^{2}$ for $0 < x < 1$. Here are the computations: (I omit a few details of the computation which you can probably fill in without much trouble)

Computing the expected value (the mean) of X:

$E(X)$ or $\mu_{X}$ = $\displaystyle \int_{0}^{1}x\cdot3x^{2}\textrm{d}x = 3\int_{0}^{1}x^{3}\textrm{d}x$

$= 3\left[\frac{x^{4}}{4}\right]_{0}^{1}$

$= 3\cdot \frac{1}{4} = \frac{3}{4}$

Computing the variance of X using the definition of the variance:

$Var(X)$ or $\sigma_{X}^{2}$ = $\displaystyle \int_{0}^{1}\left(x -\frac{3}{4}\right)^{2}\cdot 3x^{2}\textrm{d}x$

$= 3\displaystyle \int_{0}^{1}\left(x^{2} – \frac{3}{2}x + \frac{9}{16}\right)\cdot x^{2}\textrm{d}x$

$= 3\displaystyle \int_{0}^{1}\left(x^{4} – \frac{3}{2}x^{3} + \frac{9}{16}x^{2}\right)\textrm{d}x$

$= 3\displaystyle \left[\frac{x^{5}}{5} – \frac{3}{2}\cdot\frac{x^{4}}{4} + \frac{9}{16}\cdot\frac{x^{3}}{3}\right]_{0}^{1}$

$= 3\displaystyle \left[\frac{1}{5} – \frac{3}{8} + \frac{3}{16}\right] = \frac{3}{80}$

So the variance is $\frac{3}{80}$

NOTE: And the standard deviation is $\sqrt{\frac{3}{80}}$

 

We can simplify this computation of the variance somewhat by using the computational formula (a result of a theorem)

$\sigma^{2}_{X} = E(X^{2}) – \mu_{X}^{2}$

Applying it to our RV, we already know $\mu_{X} = \frac{3}{4}$. We need $E(X^{2})$:

$E(X^{2}) = \displaystyle \int_{0}^{1}x^{2}\cdot 3x^{2}\textrm{d}x$

$= 3 \displaystyle \int_{0}^{1}x^{4}\textrm{d}x$

$= 3 \displaystyle \left[\frac{x^{5}}{5}\right]_{0}^{1}$

$ = \frac{3}{5}$

 

Now to compute the variance:

$\sigma^{2}_{X} = E(X^{2}) – \mu_{X}^{2} = \frac{3}{5} – \left(\frac{3}{4}\right)^{2} = \frac{3}{5} – \frac{9}{16} = \frac{3}{80}$

We get the same answer as using the definition (as we should, since this is a mathematical theorem.

 

Please note that the variance cannot ever be a negative number. That is because, by definition, we are taking the mean of the squared deviations, and squared real numbers cannot be negative. If your variance ever comes out negative, you have made an error somewhere!