The Normal distribution has the probability density function (PDF):
\(f(x | \mu, \sigma) = \frac{1}{\sigma\sqrt{2\pi}} \exp\left(-\frac{(x - \mu)^2}{2\sigma^2}\right),\)
where:
- \(\mu\)
is the mean of the distribution, which determines the centre of the bell curve.
- \(\sigma\)
is the standard deviation, which controls the spread of the distribution (\(\sigma > 0\)).
These two functions are for sampling using the STORS algorithm based on the proposal that has been constructed using srnorm_optimize.
By default, srnorm() samples from a standard Normal distribution (mean = 0, sd = 1).
The proposal distribution is pre-optimized at package load time using srnorm_optimize() with
steps = 4091, creating a scalable proposal centred around the mode.
If srnorm() is called with custom mean or sd parameters, the samples are generated
from the standard Normal distribution, then scaled and location shifted accordingly.