# Product probability

I have a random variable $Z = XY$, where $Y$ is a random variable of unknown distribution and $X$ is noise induced by a sampling process, which is uniformly distributed in $U(0,1)$. $X$ and $Y$ are independent. $Y$ is from a parametric family and non-negative.

The p.d.f. of $Z$ is given here:

$$f_Z(z) = \int_{-\infty}^\infty f_X(x) f_Y \left (\frac{z}{x} \right ) \frac{1}{|x|} dx,$$

which simplifies to

$$f_Z(z) = \int_{0}^1 f_Y \left (\frac{z}{x} \right ) \frac{1}{|x|} dx,$$

given $X$ is $U(0, 1)$.

First question: is the above correct and useful?

Second question: assuming I have observations for $Z$, how do I apply the formulae above to get the distribution and parameters of $Y$? In the end, I want to be able to sample from $Y$.

• It all depends on what you are willing to assume about the distribution of $Y$. Two characteristics are particularly important: Is it a member of a parametric family or not? Are its values certain to be non-negative or not? – whuber Feb 26 '16 at 14:43
• Yes, $Y$ should be parametric and non-negative. I think that $Y$ is chi square, but I am not sure. I edited my question to reflect your comment. – Kwyjibo12345 Feb 26 '16 at 14:44

If you observe $Z$ and assume $X$ and $Y$ are independent, then, if all you want to do is sample from $Y$, you do not even need to know the pdf of $Z$ or $Y$.

Say you observe $Z_1,...,Z_n$. Then just draw $X_1,...,X_n \sim U(0,1)$ and set $Y_i = Z_i/X_i$ for $i=1,...,n$.

For an arbitrarily sized sample of $Y$ (one greater than $n$) you could randomly sample from $Z_1,...,Z_n$ and repeat the above.

Thanks to @whuber for pointing out that the above is incorrect. Instead of doing that, I will propose a Method of Moments (MM) technique for the special case that $Y$ is distributed chi-squared, as suggested in the comments of the original post.

Let $Y\sim \chi (k)$ and $X \sim U(0,1)$. Note that $E[Z]=E[XY]$. If $cov[X,Y]=0$, which would be true under independence, then $E[XY]=E[X]E[Y]=.5 \times k$. So $2 \times E[Z]=k$ and finally; $$\frac{2}{n}\sum_{i=1}^n Z_i \approx k$$

you could round the above to estimate the chi-squared parameter. This estimate is consistent, meaning that as $n \rightarrow \infty$ it will converge on $k$. However, it is not necessarily the most statistically efficient estimator, meaning that estimators with less variance could be proposed.

• This could be a problem if $Y$ is bounded. For example, if $Y$ had an upper limit of 10 and you observe $Z=8$ and generate a uniform variate of 0.5 Then you will generate a $Y$ realization of 16, which is impossible. – soakley Feb 26 '16 at 19:54
• @soakley that would be true, I didn't think about that. My impression from above though was that the only restriction on $Y$ was that it was non-negative. I don't think that causes any problems here. – Zachary Blumenfeld Feb 26 '16 at 19:57
• This solution produces a terribly wrong answer because it implicitly assumes you can invert the operation of multiplying two independent random variables. If you were to try this out a few times, you would rapidly notice you were getting some outlandish values of $Y_i$, as @soakley observes. – whuber Feb 26 '16 at 22:29
• @whuber. I don't understand how that would be true if the $X$ and $Y$ were independent so I am probably missing something. I did notice that when simulating you get large values for $Y$ though. – Zachary Blumenfeld Feb 26 '16 at 22:35
• Consider one possible realization. Suppose, say, that $Y_i=2$ and $X_i=1/2$, so that $Z_i=1$. You come along and draw a new value of $X_i$, as you describe, and it equals $0.1$, say. Let's call this value $X_i^\prime$. Your "reconstructed" version of $Y_i$ is $1/(0.1)=10$. It has little connection with the original $Y_i$, because it is equal to $Y_i$ multiplied by the random variable $X_i/X_i^\prime$. You are, in effect, asserting that the distribution of $Y_i$ is the same as that of $Y_i$ times $X_i/X_i^\prime$, but the latter is much more spread out. – whuber Feb 26 '16 at 22:40