## What is the best way to find the variance?

Given the joint density $\displaystyle f(x,y)=\frac{e^{-\frac{x}{y}}e^{-y}}{y}$ where $\displaystyle 0<x,y<\infty$. What is the best way to find $\displaystyle var(X)$?

1) Integrate the joint distribution with respect to y. E.g.$\displaystyle \int^{\infty}_{0}\frac{e^{-\frac{x}{y}}e^{-y}}{y}.dy$ in order to find the marginal distribution of X. Then apply $\displaystyle E[X^2]-(E[X])^2$ But the above integration is hard to solve.

2) Using conditional probability method. First find the conditional distribution of X given Y=y e.g $\displaystyle (f(X|Y))$ and solve for E(X) with E[E(X|Y)]=E[X]. I've got this but what about finding $\displaystyle E[X^2]$ ?

3) Use the fact that $\displaystyle Var(X)=E[Var(X|Y)] + Var(E(X|Y))$ with $\displaystyle Var(X|Y)=E(X^2|Y)-[E(X|Y)]^2$ Finding $\displaystyle E(X^2|Y)$ is quite tedious which require to solve for $\displaystyle \int^{\infty}_{0}x^2\frac{e^{-\frac{x}{y}}}{y}.dx$ Moreover, I have no idea how to obtain $\displaystyle Var(E(X|Y))$ though I know that [tex]E(X|Y)=y[/Math] which is $\displaystyle \int^{\infty}_{0}x\frac{e^{-\frac{x}{y}}}{y}.dx$