# normalization of data with an un-known distribution

We have a random variable $x$, with an unknown distribution. We want to find a transformation $y=f(x)$, where $f(x)$ is a monotonically increasing function, and $y$ has Gaussian distribution. We randomly pick $N$ samples of $x$, say $x_1,...,x_N$. How can we define $f$, given the values $x_1,...,x_N$, that if $N$ is large enough, $y$ becomes a Gaussian?

EDIT: I think the question was misunderstood. Let me clarify a little bit. We are given $N$ random samples from an unknown distribution. and we are asked to design a monotonically increasing function $f:\mathbb{R} \to \mathbb{R}$ so that$y=f(x)$ is Gaussian. One approach is to estimate the distribution of $x$ from the $N$ given samples, then map that to $N$ samples from a normal distribution for example $N(0,1)$, then for any given $x$, $f(x)$ can be found by interpolating the mapped values for known samples. Is there a simple way to do this ?

-
I think the idea is to invoke the central limit theorem; let the function be the sample mean. – Emre Jun 21 '11 at 21:15
I deleted my answer, in view of the edit. – Shai Covo Jun 21 '11 at 22:09
How about considering $$\Phi (y) = {\rm P}(f(X) \le y) = {\rm P}(X \le f^{ - 1} (y)) = F_X (f^{ - 1} (y)),$$ where $\Phi$ is the ${\rm N}(0,1)$ distribution function and $F_X$ the distribution function of $X$ (which can be well approximated if $N$ is large enough), leading to $$f^{ - 1} (y) = F_X^{-1} (\Phi (y)).$$ – Shai Covo Jun 21 '11 at 22:32

Sort the values so $x_1 \le x_2 \le \cdots \le x_n$. If $x = t x_k + (1-t) x_{k+1}$ with $0 \le t \le 1$ then let $$y = f(x) = t \Phi^{-1} \left(\frac{2k-1}{2n}\right) + (1-t) \Phi^{-1} \left(\frac{2k+1}{2n}\right)$$ where $\Phi^{-1}$ is the inverse of the cumulative distribution function of a standard normal distribution. This is monotonic increasing (strong monotonic if the sample values are all different).
The other problem is extrapolation outside the range of the sample where you really have no information at all. You might do something like this, where knowing the standard deviation of the sample $\sigma$, if $x=x_1-k\sigma$ for positive $k$ then let $y = f(x) = \Phi^{-1} \left(\frac{1}{2n}\right) - k$, and if $x=x_n+k\sigma$ then let $y = f(x) = \Phi^{-1} \left(\frac{2n-1}{2n}\right) + k$. This too is monotonic increasing. But it is arbitrary.