I have the following problem: let's say I have a function $y=f(x)$. Let $f$ be defined for all $x$ but it it might not be invertible. Further assume $x \sim p(x)$ with some probability density $p(x)$.
Can I claim that $p(y)$ exists and that $y \sim p(y)$ if I draw a sample from $p(x)$ and compute $y=f(x)$?
Let's say further I could draw samples from the conditional probability $p(x | z)$. If I use samples from this distribution and evaluate $y=f(x)$, will $y \sim p(y|z)$?
I'm asking because I'm trying to wrap my head around Thompson sampling using Bayesian Neural Networks and I was wondering if we actually sample from the posterior distribution of the expected reward by sampling the posterior distribution of the Q-network parameters.
Edit: A short explaination of the answer(s) would be greatly appreciated. Thanks!