3.8 Practice Computing
3.8.1 Single Variable
Suppose that \(X\) has the following density function:
\[ f_{X}(x) = \begin{cases} 6x(1 - x), & 0 < x < 1 \\ 0, & otherwise \\ \end{cases} \]
- Find \(E[X]\).
- Find \(E[X^2]\).
- Find \(V[X]\).
3.8.2 Joint Density
3.8.2.1 Discrete Case: Calculate Covariance
In the reading, you saw that we define covariance to be:
\[ \begin{aligned} Cov[X,Y] &= E[(E[X] - X)^{2}(E[Y] - Y)^{2}] \\ &= E[XY] - E[X]E[Y] \end{aligned} \]
And, correlation to be a rescaled version of covariance:
\[ \begin{aligned} Cor[X,Y] & \equiv \rho[X,Y] \\ & = \frac{Cov[X,Y]}{\sigma_{X}\sigma_{Y}} \\ \end{aligned} \]
Suppose that \(X\) and \(Y\) are discrete random variables, where \(X\) represents number of office hours attended, and \(Y\) represents owning a cat. Furthermore, suppose that \(X\) and \(Y\) have the joint pmf,
f(x,y) | y=0 | y=1 |
---|---|---|
x=0 | 0.10 | 0.35 |
x=1 | 0.05 | 0.05 |
x=2 | 0.10 | 0.35 |
- Calculate the covariance of \(X\) and \(Y\).
- Are X and Y independent? Why or why not?
3.8.2.2 Continuous Case: Calculate Covariance
Suppose that \(X\) and \(Y\) have joint density \(f_{X,Y}(x,y) = 8xy, 0 \leq y < x \leq 1.\)
- Break into groups to find \(\operatorname{Cov}[X,Y]\)
Suppose that \(X\) and \(Y\) are random variables with joint density
\[ f_{X,Y}(x,y) = \begin{cases} 1, & -y < x < y, 0 < y < 1 \\ 0, & \textrm{elsewhere} \end{cases} \]
Show that \(\operatorname{Cov}[X,Y] = 0\) but that \(X\) and \(Y\) are dependent.