crystal-gsl

Statistics

Normal distribution

The Normal distribution:

$$ f(x \mid \mu, \sigma^2) = \frac{1}{\sqrt{2\pi\sigma^2} } e^{ -\frac{(x-\mu)^2}{2\sigma^2} } $$ Example:
y1 = Statistics::Normal.sample(20000, 0.0, 1.0)
y2 = Statistics::Normal.sample(20000, 0.0, 2.0)