5
$\begingroup$

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!!

  • 6
    If $X\sim \mathcal{N}(0,1)$ then $\Phi(X)\sim U(0,1)$, where $\Phi$ is the CDF of $X$.2012-06-04
  • 0
    Thanks, however doesn't the graph of Ф(X) show that it is nonlinear, while U(0,1) is a linear function? I mean for normal distribution Ф(X) is slowly growing first then very quickly growing in the region of the bell and then its growth considerably slows down again, right? Therefore it is not uniformly distributed, even though its values are really conveniently in the range from 0 to 1. So an additional transformation for Ф(X) will be required. To get Ф(X) I will need to integrate N(0,1) so my question is if there is a known efficient algorithm to convert N(0,1) to U(0,1). Thanks!2012-06-04
  • 0
    $U(0,1)$ is a random variable that has a CDF that is linear. $\Phi(X)$ is another random variable that has exactly the same CDF as a $U(0,1)$ distribution. So suppose you have a draw $u\sim U(0,1)$, then you simply compute $\Phi(u)$ which is a draw from an $\mathcal{N}(0,1)$ distribution ($\Phi$ is available in most statistical packages).2012-06-04
  • 0
    As you can see from graphs given at http://en.wikipedia.org/wiki/Cumulative_distribution_function the Ф(X) (that is itself a CDF, i.e. an integral of normal distribution density from -∞ to x) is non-linear for normal distribution, while the CDF for U(0,1) is linear in the interval from 0 to 1. Therefore these two functions are different. If you disagree could you please provide a confirming link? Thanks a lot!2012-06-04
  • 0
    No $\Phi(X)$ is not a CDF. It is not a function defined on $\mathbb{R}$. Instead it is indeed a random variable $\Omega\ni \omega\mapsto \Phi(X(\omega))$ with the property that $P(\Phi(X)\leq x)=x$, $x\in (0,1)$, i.e. it is a $U(0,1)$-variable. See for example the first lines of the definition here: http://en.wikipedia.org/wiki/Inverse_transform_sampling#Definition or here http://www.aiaccess.net/English/Glossaries/GlosMod/e_gm_probability_integral_transformation.htm2012-06-04
  • 0
    thanks Stefan, these links are helpful. I was just a little confused because your first comment said "where Φ is the CDF of X"2012-06-04
  • 0
    Yes, $\Phi$ is the CDF of $X$, i.e. $\Phi: \mathbb{R} \to [0,1]$, $\Phi(x)=P(X\leq x)$. Now $X$ itself is a random variable, and hence it is a function defined on some probability space $(\Omega,\mathcal{F},P)$, i.e. $X:\Omega\to \mathbb{R}$. This shows that $\Phi(X)$ is a well-defined function from $\Omega$ into $[0,1]$.2012-06-04

2 Answers 2