# Attempt at computing various values given a joint PDF

Let the joint PDF of $$(X, Y)$$ be defined by

$$f(x, y) = \frac{c}{y} \text{exp}\left(-y -\frac{x}{y}\right)$$

for $$x > 0$$ and $$y > 0$$

(a) Determine the constant $$c$$

(b) Find the marginal PDF of $$Y$$

(c) Find the conditional pdf of $$X$$ given $$Y = y$$

(d) Compute $$\mathbb{E}[X^2 \mid Y = y]$$

(a)

Ok, so using the fact that the sum of probability density functions equals $$1$$, I computed the value of $$c$$ as follows:

\begin{align*} 1 = c \int_{0}^{\infty}\int_{0}^{\infty} \frac{1}{y} \text{exp}\left(-y - \frac{x}{y}\right) \mathop{dx} \mathop{dy} \\ = c\int_{0}^{\infty} \frac{1}{y} \int_{0}^{\infty}\text{exp}\left(-y - \frac{x}{y} \right) \mathop{dx} \mathop{dy} \\ c\int_{0}^{\infty} \text{exp}(-y) \mathop{dy} \\ = c \\ \Longleftrightarrow \boxed{c = 1} \end{align*}

(b) I compute the marginal PDF of $$Y$$ as follows:

\begin{align*} f_{Y}(y) = \int_{0}^{\infty} f(x, y) \mathop{dx} \\ = \int_{0}^{\infty} \frac{1}{y} \text{exp} \left(-y - \frac{x}{y}\right) \mathop{dx} \\ = \frac{1}{y} \int_{0}^{\infty} \text{exp}\left(-y - \frac{x}{y} \right) \mathop{dx} \\ = \frac{1}{y} \cdot y = 1, \end{align*}

but I'm pretty sure this is wrong. Can someone please check this part of the work for me? If it's right, then I'd have

\begin{align*} f_{X|Y} = \frac{f(x, y)}{f_{Y}(x, y)} = \frac{1}{y} \text{exp} \left(-y - \frac{x}{y}\right) \end{align*} for $$x, y > 0$$ for part $$(c)$$.

(d): To compute $$\mathbb{E}[X^2 \mid Y = y]$$, we use the conditional pdf of $$x$$ given $$Y = y$$. So,

$$E[X^2 \mid Y = y] = \int_{0}^{\infty}x^{2}\cdot \frac{\text{exp}(-x/y)}{y} \mathop{dx} = 2y^{2}$$

(I omitted the steps for integration).

• When computing the marginal PDF you seem to have lost a factor of $\exp(-y)$. Oct 29, 2018 at 1:03

Part $$(a)$$ is correct.

In part $$(b)$$ you have made a mistake whilst calculating the integral.

\begin{align*} f_{Y}(y) &= \int_{0}^{\infty} f(x, y) \mathop{dx} \\ &= \int_{0}^{\infty} \frac{1}{y} \text{exp} \left(-y - \frac{x}{y}\right) \mathop{dx} \\ &= \frac{1}{y} \int_{0}^{\infty} \text{exp}\left(-y\right) \text{exp}\left(-\frac{x}{y} \right) \mathop{dx} \\ &= \frac{\text{exp}(-y)}{y} \int_{0}^{\infty} \text{exp}\left( - \frac{x}{y} \right) \mathop{dx} \\ &= \frac{\text{exp}(-y)}{y} \cdot y \\ &= \text{exp}(-y). \end{align*}

For part $$(c)$$ you would then have that

$$f_{X|Y}(x) = \frac{f(x, y)}{f_{Y}( y)} = \frac{\frac{1}{y} \text{exp} \left(-y - \frac{x}{y}\right)}{\text{exp}(-y)}$$ which reduces to (I'll leave the details up to you) $$f_{X|Y}(x) = \frac{\text{exp}(-x/y)}{y}.$$

Try and do part $$(d)$$.

• Can you please check? I've updated my post.
– user400359
Oct 30, 2018 at 0:47
• Indeed, looks right to me! Oct 30, 2018 at 2:54