# Wrapped normal distribution

Parameters Probability density functionThe support is chosen to be [-π,π] with μ=0 Cumulative distribution functionThe support is chosen to be [-π,π] with μ=0 ${\displaystyle \mu }$ real${\displaystyle \sigma >0}$ ${\displaystyle \theta \in }$ any interval of length 2π ${\displaystyle {\frac {1}{2\pi }}\vartheta \left({\frac {\theta -\mu }{2\pi }},{\frac {i\sigma ^{2}}{2\pi }}\right)}$ ${\displaystyle \mu }$ if support is on interval ${\displaystyle \mu \pm \pi }$ ${\displaystyle \mu }$ if support is on interval ${\displaystyle \mu \pm \pi }$ ${\displaystyle \mu }$ ${\displaystyle 1-e^{-\sigma ^{2}/2}}$ (circular) (see text) ${\displaystyle e^{-\sigma ^{2}n^{2}/2+in\mu }}$

In probability theory and directional statistics, a wrapped normal distribution is a wrapped probability distribution that results from the "wrapping" of the normal distribution around the unit circle. It finds application in the theory of Brownian motion and is a solution to the heat equation for periodic boundary conditions. It is closely approximated by the von Mises distribution, which, due to its mathematical simplicity and tractability, is the most commonly used distribution in directional statistics.

## Definition

The probability density function of the wrapped normal distribution is[1]

${\displaystyle f_{WN}(\theta ;\mu ,\sigma )={\frac {1}{\sigma {\sqrt {2\pi }}}}\sum _{k=-\infty }^{\infty }\exp \left[{\frac {-(\theta -\mu +2\pi k)^{2}}{2\sigma ^{2}}}\right]}$

where μ and σ are the mean and standard deviation of the unwrapped distribution, respectively. Expressing the above density function in terms of the characteristic function of the normal distribution yields:[1]

${\displaystyle f_{WN}(\theta ;\mu ,\sigma )={\frac {1}{2\pi }}\sum _{n=-\infty }^{\infty }e^{-\sigma ^{2}n^{2}/2+in(\theta -\mu )}={\frac {1}{2\pi }}\vartheta \left({\frac {\theta -\mu }{2\pi }},{\frac {i\sigma ^{2}}{2\pi }}\right),}$

where ${\displaystyle \vartheta (\theta ,\tau )}$ is the Jacobi theta function, given by

${\displaystyle \vartheta (\theta ,\tau )=\sum _{n=-\infty }^{\infty }(w^{2})^{n}q^{n^{2}}{\text{ where }}w\equiv e^{i\pi \theta }}$ and ${\displaystyle q\equiv e^{i\pi \tau }.}$

The wrapped normal distribution may also be expressed in terms of the Jacobi triple product:[2]

${\displaystyle f_{WN}(\theta ;\mu ,\sigma )={\frac {1}{2\pi }}\prod _{n=1}^{\infty }(1-q^{n})(1+q^{n-1/2}z)(1+q^{n-1/2}/z).}$

where ${\displaystyle z=e^{i(\theta -\mu )}\,}$ and ${\displaystyle q=e^{-\sigma ^{2}}.}$

## Moments

In terms of the circular variable ${\displaystyle z=e^{i\theta }}$ the circular moments of the wrapped normal distribution are the characteristic function of the normal distribution evaluated at integer arguments:

${\displaystyle \langle z^{n}\rangle =\int _{\Gamma }e^{in\theta }\,f_{WN}(\theta ;\mu ,\sigma )\,d\theta =e^{in\mu -n^{2}\sigma ^{2}/2}.}$

where ${\displaystyle \Gamma \,}$ is some interval of length ${\displaystyle 2\pi }$. The first moment is then the average value of z, also known as the mean resultant, or mean resultant vector:

${\displaystyle \langle z\rangle =e^{i\mu -\sigma ^{2}/2}}$

The mean angle is

${\displaystyle \theta _{\mu }=\mathrm {Arg} \langle z\rangle =\mu }$

and the length of the mean resultant is

${\displaystyle R=|\langle z\rangle |=e^{-\sigma ^{2}/2}}$

The circular standard deviation, which is a useful measure of dispersion for the wrapped normal distribution and its close relative, the von Mises distribution is given by:

${\displaystyle s=\ln(R^{-2})^{1/2}=\sigma }$

## Estimation of parameters

A series of N measurements zn = e n drawn from a wrapped normal distribution may be used to estimate certain parameters of the distribution. The average of the series z is defined as

${\displaystyle {\overline {z}}={\frac {1}{N}}\sum _{n=1}^{N}z_{n}}$

and its expectation value will be just the first moment:

${\displaystyle \langle {\overline {z}}\rangle =e^{i\mu -\sigma ^{2}/2}.\,}$

In other words, z is an unbiased estimator of the first moment. If we assume that the mean μ lies in the interval [−ππ), then Arg z will be a (biased) estimator of the mean μ.

Viewing the zn as a set of vectors in the complex plane, the R2 statistic is the square of the length of the averaged vector:

${\displaystyle {\overline {R}}^{2}={\overline {z}}\,{\overline {z^{*}}}=\left({\frac {1}{N}}\sum _{n=1}^{N}\cos \theta _{n}\right)^{2}+\left({\frac {1}{N}}\sum _{n=1}^{N}\sin \theta _{n}\right)^{2}\,}$

and its expected value is:

${\displaystyle \left\langle {\overline {R}}^{2}\right\rangle ={\frac {1}{N}}+{\frac {N-1}{N}}\,e^{-\sigma ^{2}}\,}$

In other words, the statistic

${\displaystyle R_{e}^{2}={\frac {N}{N-1}}\left({\overline {R}}^{2}-{\frac {1}{N}}\right)}$

will be an unbiased estimator of eσ2, and ln(1/Re2) will be a (biased) estimator of σ2

## Entropy

The information entropy of the wrapped normal distribution is defined as:[1]

${\displaystyle H=-\int _{\Gamma }f_{WN}(\theta ;\mu ,\sigma )\,\ln(f_{WN}(\theta ;\mu ,\sigma ))\,d\theta }$

where ${\displaystyle \Gamma }$ is any interval of length ${\displaystyle 2\pi }$. Defining ${\displaystyle z=e^{i(\theta -\mu )}}$ and ${\displaystyle q=e^{-\sigma ^{2}}}$, the Jacobi triple product representation for the wrapped normal is:

${\displaystyle f_{WN}(\theta ;\mu ,\sigma )={\frac {\phi (q)}{2\pi }}\prod _{m=1}^{\infty }(1+q^{m-1/2}z)(1+q^{m-1/2}z^{-1})}$

where ${\displaystyle \phi (q)\,}$ is the Euler function. The logarithm of the density of the wrapped normal distribution may be written:

${\displaystyle \ln(f_{WN}(\theta ;\mu ,\sigma ))=\ln \left({\frac {\phi (q)}{2\pi }}\right)+\sum _{m=1}^{\infty }\ln(1+q^{m-1/2}z)+\sum _{m=1}^{\infty }\ln(1+q^{m-1/2}z^{-1})}$

Using the series expansion for the logarithm:

${\displaystyle \ln(1+x)=-\sum _{k=1}^{\infty }{\frac {(-1)^{k}}{k}}\,x^{k}}$

the logarithmic sums may be written as:

${\displaystyle \sum _{m=1}^{\infty }\ln(1+q^{m-1/2}z^{\pm 1})=-\sum _{m=1}^{\infty }\sum _{k=1}^{\infty }{\frac {(-1)^{k}}{k}}\,q^{mk-k/2}z^{\pm k}=-\sum _{k=1}^{\infty }{\frac {(-1)^{k}}{k}}\,{\frac {q^{k/2}}{1-q^{k}}}\,z^{\pm k}}$

so that the logarithm of density of the wrapped normal distribution may be written as:

${\displaystyle \ln(f_{WN}(\theta ;\mu ,\sigma ))=\ln \left({\frac {\phi (q)}{2\pi }}\right)-\sum _{k=1}^{\infty }{\frac {(-1)^{k}}{k}}{\frac {q^{k/2}}{1-q^{k}}}\,(z^{k}+z^{-k})}$

which is essentially a Fourier series in ${\displaystyle \theta \,}$. Using the characteristic function representation for the wrapped normal distribution in the left side of the integral:

${\displaystyle f_{WN}(\theta ;\mu ,\sigma )={\frac {1}{2\pi }}\sum _{n=-\infty }^{\infty }q^{n^{2}/2}\,z^{n}}$

the entropy may be written:

${\displaystyle H=-\ln \left({\frac {\phi (q)}{2\pi }}\right)+{\frac {1}{2\pi }}\int _{\Gamma }\left(\sum _{n=-\infty }^{\infty }\sum _{k=1}^{\infty }{\frac {(-1)^{k}}{k}}{\frac {q^{(n^{2}+k)/2}}{1-q^{k}}}\left(z^{n+k}+z^{n-k}\right)\right)\,d\theta }$

which may be integrated to yield:

${\displaystyle H=-\ln \left({\frac {\phi (q)}{2\pi }}\right)+2\sum _{k=1}^{\infty }{\frac {(-1)^{k}}{k}}\,{\frac {q^{(k^{2}+k)/2}}{1-q^{k}}}}$