# Phase distribution of a non-zero mean complex Gaussian random variable

We know that if $X\sim CN(0,\sigma^2\mathbf{I}_{2\times 2})$, then its phase has a uniform distribution over $[0,2\pi]$. Now what is the distribution of its phase if $X\sim CN(\mu,\sigma^2\mathbf{I}_{2\times 2})$? Obviously it is not uniform.

Such distribution is covered in "Analysis on Functions and Characteristics of the Rician Phase Distribution" by Zhongtao Luo, Yanmei Zhan and Edmond Jonckheere (see here: https://ieeexplore.ieee.org/document/9238805)

For small variance, the distribution can be approximated by Gaussian. For higher variance, the distribution becomes more like a von-mises or wrapped-gaussian distribution. An exact expression for the distribution is given in above referenced paper.

One can also find a derivation of this probability density function in Appendix D of

https://arxiv.org/abs/2402.05793v1

Here we provide a complete derivation of the Rician phase probability density function, repeating the analysis from the above reference. Consider that the conditional probability density for obtaining the outcome $$\beta \in\mathbb{C}$$, when selecting from a complex Gaussian density with mean $$\alpha\in\mathbb{C}$$ and variance one, is as follows: $$$$p(\beta|\alpha)=\frac{1}{\pi}e^{-\left\vert \alpha-\beta\right\vert ^{2}}.$$$$ Letting $$\alpha=re^{-i\phi}$$ and $$\beta=be^{-i\hat{\phi}}$$, with $$r,b\geq0$$ and $$\phi,\hat{\phi}\in\left[ -\pi,\pi\right]$$, we find that \begin{align} p(\beta|\alpha)\ d^{2}\beta \notag & =\frac{1}{\pi}e^{-\left\vert \alpha -\beta\right\vert ^{2}}\ d^{2}\beta\\ & =\frac{1}{\pi}\exp\!\left( -\left\vert re^{-i\phi}-be^{-i\hat{\phi}% }\right\vert ^{2}\right) \ b\ db\ d\hat{\phi}. \end{align} Then we obtain the marginal probability density for the phase $$\hat{\phi}$$ by integrating over the magnitude $$b$$: \begin{align} p(\hat{\phi}|r,\phi) & =\int_{0}^{\infty}db\ \frac{b}{\pi}\exp\!\left( -\left\vert re^{-i\phi}-be^{-i\hat{\phi}}\right\vert ^{2}\right) \\ & =\int_{0}^{\infty}db\ \frac{b}{\pi}\exp\!\left( -\left\vert r-be^{-i\left( \hat{\phi}-\phi\right) }\right\vert ^{2}\right) . \label{eq:integral-rep-rician} \end{align} Considering that \begin{align} \left\vert r-be^{-i\left( \hat{\phi}-\phi\right) }\right\vert ^{2} \notag & =r^{2}-2rb\cos(\hat{\phi}-\phi)+b^{2}\\ & =\left( r\sin(\hat{\phi}-\phi)\right) ^{2}+\left( b-r\cos(\hat{\phi} -\phi)\right) ^{2}, \end{align} we find that \begin{align} p(\hat{\phi}|r,\phi)\nonumber & =\frac{e^{-\left( r\sin(\hat{\phi}-\phi)\right) ^{2}}}{\pi}\int _{0}^{\infty}db\ b\ e^{-\left( b-r\cos(\hat{\phi}-\phi)\right) ^{2}}\\ & =\frac{e^{-\left( r\sin(\hat{\phi}-\phi)\right) ^{2}}}{\pi}\int _{-r\cos(\hat{\phi}-\phi)}^{\infty}d\bar{b}\ \left( \bar{b}+r\cos(\hat{\phi }-\phi)\right) \ e^{-\bar{b}^{2}}. \end{align} Now consider that \begin{align} & \int_{-r\cos(\hat{\phi}-\phi)}^{\infty}d\bar{b}\ \left( \bar{b}+r\cos (\hat{\phi}-\phi)\right) \ e^{-\bar{b}^{2}}\nonumber\\ & =\int_{-r\cos(\hat{\phi}-\phi)}^{\infty}d\bar{b}\ \bar{b}\ e^{-\bar{b}^{2}% }+r\cos(\hat{\phi}-\phi)\int_{-r\cos(\hat{\phi}-\phi)}^{\infty}d\bar {b}\ e^{-\bar{b}^{2}}\\ & =-\frac{1}{2}\int_{-r\cos(\hat{\phi}-\phi)}^{\infty}\frac{d}{d\bar{b}% }\ e^{-\bar{b}^{2}}+r\cos(\hat{\phi}-\phi)\frac{\sqrt{\pi}}{2}\left( 1+\operatorname{erf}(r\cos(\hat{\phi}-\phi))\right) \\ & =\frac{1}{2}e^{-\left( r\cos(\hat{\phi}-\phi)\right) ^{2}}+r\cos(\hat{\phi}-\phi)\frac{\sqrt{\pi}}{2}\left( 1+\operatorname{erf}(r\cos(\hat{\phi}-\phi))\right) . \end{align} In the above, we made use of the error function $$$$\operatorname{erf}(x) = \frac{2}{\sqrt{\pi}} \int_0^x dt \, e^{-t^2} ,$$$$ and some of its properties: $$\operatorname{erf}(+\infty)=1$$ and $$\operatorname{erf}(x) = -\operatorname{erf}(-x)$$. Thus, we finally conclude that \begin{align} & p(\hat{\phi}|r,\phi) =\frac{e^{-\left( r\sin(\hat{\phi}-\phi)\right) ^{2}}}{2\pi} \Bigg( e^{-\left( r\cos(\hat{\phi}-\phi)\right) ^{2}} +r\cos(\hat{\phi}-\phi)\sqrt{\pi}\left( 1+\operatorname{erf}(r\cos(\hat{\phi }-\phi))\right) \Bigg) \\ & =\frac{e^{-r^{2}}}{2\pi}+ \frac{e^{-\left( r\sin(\hat{\phi}-\phi)\right) ^{2}}}{2\sqrt{\pi}}r\cos(\hat{\phi}-\phi)\left( 1+\operatorname{erf}% (r\cos(\hat{\phi}-\phi))\right) . \end{align}