Covariance of continuous functions, uniform and normal distribution

390 Views Asked by At

For X~Uniform(1, 9.9) and Y|X = x~Normal(1.4, x^2)

What is Cov(X, Y) equal to?

What I tried was: E[XY] - E[X]E[Y]

Where E[X] = 5.45 and E[Y] = 1.4

But for E[XY] I'm a bit clueless. I've considered: $$ \int_1^{9.9}\int_{-\infty}^{\infty} xx \frac{1}{9.9-1} \frac{e^-\frac{x^2}{2}}{\sqrt{2\pi}} dxdx = 1$$

or is E[XY] more like: $$ \int_1^{9.9}\int_{-\infty}^{\infty} xy \frac{1}{9.9-1} \frac{e^-\frac{(y-1.4)^2}{2x^2}}{\sqrt{2\pi x^2}} dydx = 7.63 $$ and now I realized that 7.63 is already equal to 5.45*1.4 so that would result in 0...

2

There are 2 best solutions below

0
On BEST ANSWER

Your calculation is right. $\mathbb E(X\cdot Y)=\mathbb E_X(X\cdot \mathbb E_{Y|X}[Y])=7.63$

You´re right as well that $\mathbb E(X)\cdot \mathbb E(Y)=7.63$. That means that $Cov(X,Y)=0$.

This is a nice example that a covariance of $0$ does $\texttt{not}$ necessarily imply independence.

0
On

By the law of total expectation,

$$E[XY]=E\left[E\,[XY\mid X]\right]=E\left[XE\,[Y\mid X]\right]$$

, where you are given that $E\,[Y\mid X]=1.4$ (which also implies $E\,[Y]=1.4 $ by the same result).

And note that by this theorem,

$$E\,[XY]=\iint xy f_{X,Y}(x,y)\,\mathrm{d}x\,\mathrm{d}y$$

, where $f_{X,Y}(x,y)=f_{Y\mid X=x}(y)f_{X}(x)$ is the joint density of $(X,Y)$.