Let X,Y,Z be independent random variables where X,Y are uniformly distributed on [0,1] and Z is an exponential with mean 1.
How can I set up the conditional density of X given XY = t for [0,1], and the conditional density of X+Z = t for t>= 0
Let X,Y,Z be independent random variables where X,Y are uniformly distributed on [0,1] and Z is an exponential with mean 1.
How can I set up the conditional density of X given XY = t for [0,1], and the conditional density of X+Z = t for t>= 0
Update: the question originally also asked about the distribution of $X$ conditional on $XY$, though it has been edited out now. This answer is for that question.
The cdf of $T=XY$ conditional on $X=x$ is $F_{T|X}(t)=P(y<t/x)$, which is $1$ if $t>x$ and $t/x$ otherwise.
So the density of $T|X=x$ is $f_{T|X}= 1_{[0,x]}(t)1/x$. The conditional density the other way around is
$$f_{X|T=t}(x)= \frac{1_{[0,x]}(t) 1/x}{\int_t^1 1/x\,dx}= \frac{-1}{\log t} \frac{1}{x}$$
Given that it's easy to come up with different answers and this took me longer than it should, here's a check by simulation
The underlying R code is
x<-runif(1e7)
y<-runif(1e7)
i<- abs(x*y-0.3)<0.0001
hist(x[i],prob=TRUE)
curve((-1/x)/log(0.3),add=TRUE,col="blue")
so the graph is the density of $X$ conditional on $|XY-0.3|<0.0001$, which should be a reasonable approximation to conditioning on $XY=0.3$. And so it seems