I have three random variables: $X_1$, $X_2$ and $Y$ such that $X_1$ and $X_2$ are independent and $Y = X_1 \times X_2$. I think that either this question is trivial or I'm making a rookie error, but I'm not sure which.
I have samples of $X_1$ and $X_2$ as two vectors. If I multiply these vectors point-wise, does this give me a sample of $Y$? If not, how can I obtain such a sample?
I'm also interested in more general cases where $Y = f(X_1,X_2,\dots, X_n)$, for some function $f$ where samples of the $X_i$ are given.