Suppose that $X \sim U(0,1)$ and $Y$ conditional on $X$ as $\log(\frac{Y}{X}) \sim N(\mu, \sigma^2)$. What is the distribution on $Y$? I am working on trying to model the log of two ratios. I let $X \sim \mathcal{U}(0,1)$ and then have that $Y$ is modeled conditional on $X$ as $\log\left(\dfrac{Y}{X}\right) \sim N(\mu, \sigma^2)$. I am trying to see what the sampling distribution of $Y$ is. It appears to be the following:
$$
\log\left(\frac{Y}{X}\right)\mid X = \log\left(Y\right)-\log\left(X\right)\mid X\sim N(\mu, \sigma^2)
$$
so that:
$$
\log(Y)\mid X\sim N(\mu+\log\left(X\right), \sigma^2)
$$
Is this correct?
 A: The conditional variable $Y \mid X$ is lognormal with parameters $\mu + \log X$ and $\sigma^2$.  Thus, the unconditional density is found by integrating over the support of $X$:  $$f_Y(y) =  \frac{1}{\sqrt{2\pi} \sigma y} \int_{x=0}^1 e^{-(\log y - \mu - \log x)^2/(2\sigma^2)} \, dx.$$  With the substitution $$u = \log x, \quad x = e^u, \quad dx = e^u \, du,$$ we have $$f_Y(y) = \frac{1}{\sqrt{2\pi} \sigma y} \int_{u=-\infty}^0 e^u e^{-(\log y - \mu - u)^2/(2\sigma^2)} \, du$$ and for notational convenience, let $\lambda = \log y - \mu$.  Completing the square in the exponent, we obtain
$$-u^2 + (2 \lambda + 2\sigma^2)u - \lambda^2 = -(u - (\lambda + \sigma^2))^2 + \sigma^2(2\lambda + \sigma^2).$$  Consequently $$f_Y(y) =  \frac{e^{\lambda+\sigma^2/2}}{y} \int_{u=-\infty}^0 \frac{1}{\sqrt{2\pi} \sigma} e^{-(u - (\lambda+\sigma^2))^2/(2\sigma^2)} \, du.$$  Since this integral is the CDF for a normal distribution with mean $\lambda + \sigma^2$ and variance $\sigma^2$ evaluated at $0$, we can write $$f_Y(y) = \frac{e^{-\mu + \sigma^2/2 + \log y}}{y} \Phi\left(-\frac{\log y - \mu + \sigma^2}{\sigma}\right) = e^{-\mu + \sigma^2/2}\Phi\left(\frac{\mu - \log y}{\sigma} - \sigma \right)$$ where $\Phi$ is the CDF of the standard normal.
