TITLE: How to transform normally distributed random sequence N(0,1) to uniformly distributed U(0,1)?
QUESTION [5 upvotes]: Everybody knows how to convert U(0,1) to N(0,1). However does anybody know an efficient algorithm solving the opposite task? I mean how to generate U(0,1) sequence from N(0,1) one?
Asking because a group of voice and speech researchers with whom I work are routinely trying to represent results of their measurements which they believe to be normally distributed using a linear 0 to 100 scale. As a result they are getting negative values outside of their linear scale obviously because they are dealing with random noise that can be roughly assumed to be normal and therefore this noise theoretically spans the whole real axis. Though I can imagine that I need to take a logarithm of the normal distribution, then multiply the negative quadratic term by -1 and then take a square root of it to get a linear function, a question is: does anybody know an efficient algorithm for doing that, I mean for generating high quality U(0,1) random numbers from N(0,1). I would highly appreciate any feedback on this!!

REPLY [8 votes]: Naively, this seems to just be a problem of remapping the probability densities. I do not understand the answer by vanna since that requires two variates.
Going from Gaussian to Uniform requires going from an infinite support $[-\infty,+\infty]$ to a finite support, like $[0,1]$.
I think that the simplest way to achieve this is along the lines of what stefan-hansen was suggesting:

normalize the data to Gaussian(0,1) by subtracting the average and dividing by the standard deviation: $y = \frac{x - \hat\mu}{\hat\sigma}$, and
transform the values using the CDF: $z=\frac{1}{2}Erfc(-\frac{y}{\sqrt{2}})$, where $Erfc$ is the complementary error function.

If $y$ is distributed with Gaussian(0,1), $z$ will be distributed as Uniform(0,1).
This requires having estimates of $\hat\mu$ and $\hat\sigma$ before proceeding with the transform, but that should not be a problem.
(I would post histograms illustrating the procedure, but I do not have enough points.)