# Sample from random normal with sliding mean

I have a uniform random variable $$x$$ and a normal random variable $$z = \mathcal{N}(x, \sigma)$$ (i.e. the mean is given by $$x$$). How can I draw samples $$(X, Z)$$ such that they correspond to their respective distributions? Can I draw from $$x$$ and $$y = \mathcal{N}(0, \sigma)$$ separately and then apply the transformation $$z = x + y$$?

• Yes - that should work. Personally, I write $Z \sim \mathcal{N}(x, \sigma^2)$ using the variance rather than the standard deviation – Henry Oct 22 '18 at 23:08