# How to simulate data points from the following distribution?

I have the random variable $X\sim0.5Normal[2,2]+0.5Normal[20,2]$ and I am trying to use Mathematica to simulate, say, 500 points from this distribution. I briefly looked into Monte Carlo Simulation online, but I think they only use examples where the distribution is a "well-known" (i.e. Normal, Beta, etc.).

RandomVariate[
MixtureDistribution[{.5, .5},
NormalDistribution @@@ {{2, 2},{20, 2}}],
500]

Histogram[%, 30]


• Wow thank you so much!!! – J. Campos Jun 12 '17 at 17:31