Using the Box-Muller transform to generate pseudorandom numbers with any sigma and mean
algorithm, language-agnostic, random
Solution
There's no need for a separate method. A well know result from statistics is that you can convert back and forth between a standard normal (Gaussian) value Z to a general Gaussian X with mean mu and standard deviation sigma by the simple transformation `X = sigma*Z + mu`, or vice-versa, `Z = (x - mu)/sigma`. This is why statistics books only need/provide one table for the Gaussian distribution.
Problem
I'm trying to implement the Box-Muller transform to generate pseudorandom numbers with Gaussian distribution. Apparently, this method only generates numbers with sigma 1 and mean 0. How do I use it to generate numbers with arbitrary sigma and mean?