Tranformation of probability density function of a source

60 Views Asked by At

i have a source that generates numbers with uniform probability density with in a range. Is there any way by which the data from the source having uniform probability density can be manipulated so that the output has a Gaussian probability density. And the same can be inverted.

I want to implement it in communication systems. I have a PAM (pulse amplitude modulation) source with uniform distribution. Is there any way the data can be manipulated so that the output from the transmitter has a Gaussian distribution. The same can be inverted at the receiver. The receiver receives a Gaussian distribution and then data is restored to its original uniform distribution.

1

There are 1 best solutions below

3
On BEST ANSWER

I don't know the engineering reason for going through the trouble of "code then transmit then decode", but mathematically this can easily be done with the Method of Inverse Transform. If you don't like wikipedia, any of the mostly-identical Google hits will do.

Denote the lower and upper bound of your uniform random variable $U$ with $a$ and $b$. That is, $U \sim \mathrm{Unif}[a,b]$ where $-\infty < a < b < \infty$.

Then $Z \equiv G(U)$ will have a standard Normal distribution $Z \sim \mathcal{N}(0,1)$ with the transformation $G$ being the shifted-scaled inverse error function $$G(U) = \mathrm{erf}^{-1}\bigl( \frac{2U - a - b}{ b - a }\bigr)$$ where the argument stems from $\displaystyle\frac{U - \frac{b+a}2}{ \frac{b - a}2 }$, centering the data to zero and scaling it to $[-1, 1]$.

As the error function itself has to be done numerically anyway (the CDF of Normal distribution, $\Phi$, is error function shifted-scaled), the inverse error function $\textbf{erf}^{-1}$ has to be implemented numerically or with approximation (see e.g. the wiki section).

If you're using C++, Python, Mathematica, Matlab, R, or even Microsoft Office Excel, then there are built-in commands for $\textbf{erf}^{-1}$. If you're working in C or the Numbers app (in Apple OS X) then I'm afraid you have to code it yourself.


You can do a further transformation $X \equiv \mu + \sigma Z$ to have general Gaussian $X \sim \mathcal{N}(\mu, \sigma)$ with mean $\mu$ and variance $\sigma^2$.


At the receiver end, perform the "CDF-transform" (also inverse of $G$) to recover the uniform data $W = U$ with $$W = H(X) \equiv a + \frac{b - a}2 \bigl( 1 + \mathrm{erf}(X) \bigr) $$