- DSP log - http://www.dsplog.com -

Deriving PDF of Rayleigh random variable

Posted By Krishna Sankar On July 17, 2008 @ 5:51 am In DSP | 9 Comments

In the post on Rayleigh channel model [1], we stated that a circularly symmetric random variable is of the form $Z = X + jY$, where real and imaginary parts are zero mean independent and identically distributed (iid) Gaussian random variables. The magnitude $|Z|$ which has the probability density,

$p(z) = \frac{z}{\sigma^2}e^{\frac{-z^2}{2 \sigma^2}},\ \ \ z\ge 0$

is called a Rayleigh random variable. Further, the phase $\theta$ is uniformly distributed from $[0,\ 2\pi]$. In this post we will try to derive the expression for probability density function (PDF) for $|Z|$ and $\theta$.

The text provided in Section 5.4.5 of [ELECTRONIC-COMMUNICATION:PRADIP] [2] is used as reference.

## Joint probability

The probability density function of $x$ is

$p(x) = \frac{1}{\sqrt{2\pi\sigma^2}}e^{\frac{-x^2}{2\sigma^2}}$.

Similarly probability density function of $y$ is

$p(y) = \frac{1}{\sqrt{2\pi\sigma^2}}e^{\frac{-y^2}{2\sigma^2}}$.

As $X$ and $Y$ are independent random variables, the joint probability [3] is the product of the individual probability, i.e,

$p(x,y) = \frac{1}{{2\pi\sigma^2}}e^{\frac{-(x^2+y^2)}{2\sigma^2}}$.

The joint probability that the random variable $X$ lies between $x$ and $x+dx$ and the random variable $Y$lies between $y$ and $y+dy$is,

$P(x\le X+dx,y\le Y+dy)=\frac{1}{{2\pi\sigma^2}}e^{\frac{-(x^2+y^2)}{2\sigma^2}}dxdy$.

## Conversion to polar co-ordinate

Given that $(x,y)$ is in the Cartesian co-ordinate form [4], we can convert that into the polar co-ordinate [5] $(z,\theta)$ where,
$Z=\sqrt{X^2+Y^2}$ and
$\Theta = \tan^{-1}\left(\frac{Y}{X}\right)$.

Figure: Cartesian co-ordinate to polar co-ordinate

The area $dxdy$ is Cartesian co-ordinate form is equal to the area $zdzd\theta$ in the polar co-ordinate form.

$P(x\le X+dx,y\le Y+dy)=P(z\le Z+dz,\theta\le \Theta+d\theta)$.

Simplifying,
$\begin{eqnarray}P(z\le Z+dz,\theta\le \Theta+d\theta)&=&\frac{1}{{2\pi\sigma^2}}e^{\frac{-(x^2+y^2)}{2\sigma^2}}zdzd\theta\\&=&{\frac{z}{{\sigma^2}}e^{\frac{-z^2}{2\sigma^2}}}dz{\frac{1}{2\pi}}d\theta\end{eqnarray}$.

Summarizing the joint probability density function,

$p(z,\theta) = \frac{z}{{2\pi\sigma^2}}e^{\frac{-z^2}{2\sigma^2}}$.

Since $z$ and $\theta$ are independent, the individual probability density functions are,
$\huge p(z) = \frac{z}{{\sigma^2}}e^{\frac{-z^2}{2\sigma^2}},\ z\ge 0$,

$\huge p(\theta) = \frac{1}{2\pi},\ -\pi \le \theta \le \pi$.

## Simulation Model

Simple Matlab/Octave simulation model is provided for plotting the probability density of $z$ and $\theta$. The script performs the following:

(a) Generate two independent zero mean, unit variance Gaussian random variables

(b) Using the hist() function compute the simulated probability density for both $z$ and
$\theta$

(c) Using the knowledge of the equation (which we just derived), compute the theoretical probability
density function (PDF)

(d) Plot the simulated and theoretical probability density functions (PDF) and show that they are in good agreement.

Figure: Simulated/theoretical PDF of Rayleigh random variable

Figure: Simulated/theoretical PDF of uniformly distributed theta random variable

## Reference

URL to article: http://www.dsplog.com/2008/07/17/derive-pdf-rayleigh-random-variable/

URLs in this post:

[1] Rayleigh channel model: http://www.dsplog.com/2008/07/14/rayleigh-multipath-channel/