# Is the difference between two samples of two distributions a sample of the difference of the distributions? [closed]

My question is as follows. Suppose you have two variables $$X$$, $$Y$$. If I pick a random sample $$x$$ from the distribution over $$X$$ that has probability density function $$f_X$$, and another random sample $$y$$ from the distribution over $$Y$$ that has probability density function $$f_Y$$, is $$x-y$$ a random sample of the distribution over $$X-Y$$ that has probability density function $$f_{X-Y}(z)=\int_{-\infty}^{\infty}f_X(x)f_Y(x-z)dx$$? In other words, by taking two random samples $$x$$ and $$y$$ and setting $$z=x-y$$, have I taken a random sample from the distribution over $$Z=X-Y$$?

It seems like it should be the case by definition, but I haven't been able to convince myself beyond doubt. Can anyone help?

• What does „be a sample“ mean for you? I.e. given some numbers $x_1,...,x_n$ when is that a sample of a series of random variables $X_1,...,X_n$? – Fabian Werner Sep 12 '19 at 11:16
• I mean a sample picked at random from that distribution. I've edited the question to clarify. – user259707 Sep 12 '19 at 11:24
• Please explain what you mean by "$x-y.$" Are you thinking of samples as being ordered sequences of values, so that you can subtract them component by component; or are you randomly subtracting elements of one sample from elements of another; or are you forming all possible differences of elements between the two samples? The answer depends on your meaning. – whuber Sep 12 '19 at 12:20
• I was thinking of examples like $X\sim Lap(\mu_1,b_1)$ and $Y\sim Lap(\mu_2,b_2)$, in which case one can sample $x$ from X and $y$ from Y then easily take $x-y$ as both $x$ and $y$ are just real numbers. But I'm interested in every case, if there's a difference between them. – user259707 Sep 12 '19 at 13:22