# Von Mises distribution

In probability theory and directional statistics, the von Mises distribution (also known as the circular normal distribution or the Tikhonov distribution) is a continuous probability distribution on the circle. It is a close approximation to the wrapped normal distribution, which is the circular analogue of the normal distribution. A freely diffusing angle $\theta$ on a circle is a wrapped normally distributed random variable with an unwrapped variance that grows linearly in time. On the other hand, the von Mises distribution is the stationary distribution of a drift and diffusion process on the circle in a harmonic potential, i.e. with a preferred orientation. The von Mises distribution is the maximum entropy distribution for circular data when the real and imaginary parts of the first circular moment are specified. The von Mises distribution is a special case of the von Mises–Fisher distribution on the N-dimensional sphere.

## Definition

The von Mises probability density function for the angle x is given by:
    $f(x\mid \mu ,\kappa )={\frac {\exp(\kappa \cos(x-\mu ))}{2\pi I_{0}(\kappa )}}$
where I$_0$($\kappa$) is the modified Bessel function of the first kind of order 0, with this scaling constant chosen so that the distribution sums to unity: ∫$_{−π}$$^π$exp⁡(κcos⁡x)dx=2πI$_0$(κ).{\textstyle \int _{-\pi }^{\pi }\exp(\kappa \cos x)dx={2\pi I_{0}(\kappa )}.}
The parameters μ and 1/$\kappa$ are analogous to μ and σ$^2$ (the mean and variance) in the normal distribution:
* μ is a measure of location (the distribution is clustered around μ), and
* $\kappa$ is a measure of concentration (a reciprocal measure of dispersion, so 1/$\kappa$ is analogous to σ$^2$).
** If $\kappa$ is zero, the distribution is uniform, and for small $\kappa$, it is close to uniform.
** If $\kappa$ is large, the distribution becomes very concentrated about the angle μ with $\kappa$ being a measure of the concentration. In fact, as $\kappa$ increases, the distribution approaches a normal distribution in x with mean μ and variance 1/$\kappa$.
The probability density can be expressed as a series of Bessel functions
    $f(x\mid \mu ,\kappa )={\frac {1}{2\pi }}\left(1+{\frac {2}{I_{0}(\kappa )}}\sum _{j=1}^{\infty }I_{j}(\kappa )\cos[j(x-\mu )]\right)$
where I$_j$(x) is the modified Bessel function of order j.
The cumulative distribution function is not analytic and is best found by integrating the above series. The indefinite integral of the probability density is:
    $\Phi (x\mid \mu ,\kappa )=\int f(t\mid \mu ,\kappa )\,dt={\frac {1}{2\pi }}\left(x+{\frac {2}{I_{0}(\kappa )}}\sum _{j=1}^{\infty }I_{j}(\kappa ){\frac {\sin[j(x-\mu )]}{j}}\right).$
The cumulative distribution function will be a function of the lower limit of integration x$_0$:
    $F(x\mid \mu ,\kappa )=\Phi (x\mid \mu ,\kappa )-\Phi (x_{0}\mid \mu ,\kappa ).\,$

## Moments

The moments of the von Mises distribution are usually calculated as the moments of the complex exponential z = e$^{ix}$ rather than the angle x itself. These moments are referred to as circular moments. The variance calculated from these moments is referred to as the circular variance. The one exception to this is that the "mean" usually refers to the argument of the complex mean.
The nth raw moment of z is:
    $m_{n}=\langle z^{n}\rangle =\int _{\Gamma }z^{n}\,f(x|\mu ,\kappa )\,dx$
    $={\frac {I_{|n|}(\kappa )}{I_{0}(\kappa )}}e^{in\mu }$
where the integral is over any interval $\Gamma$ of length 2π. In calculating the above integral, we use the fact that z$^n$ = cos(nx) + i sin(nx) and the Bessel function identity:
    $I_{n}(\kappa )={\frac {1}{\pi }}\int _{0}^{\pi }e^{\kappa \cos(x)}\cos(nx)\,dx.$
The mean of the complex exponential z is then just
    $m_{1}={\frac {I_{1}(\kappa )}{I_{0}(\kappa )}}e^{i\mu }$
and the circular mean value of the angle x is then taken to be the argument μ. This is the expected or preferred direction of the angular random variables. The circular variance of x is:
    $V=1-|E[e^{ix}]|=1-{\frac {I_{1}(\kappa )}{I_{0}(\kappa )}}.$

## Limiting behavior

When $\kappa$ is large, the distribution resembles a normal distribution. More specifically, for large positive real numbers $\kappa$,
    $f(x\mid \mu ,\kappa )\approx {\frac {1}{\sigma {\sqrt {2\pi }}}}\exp \left[{\dfrac {-(x-\mu )^{2}}{2\sigma ^{2}}}\right]$
where σ$^2$ = 1/$\kappa$ and the difference between the left hand side and the right hand side of the approximation converges uniformly to zero as $\kappa$ goes to infinity. Also, when $\kappa$ is small, the probability density function resembles a uniform distribution:
    $\lim _{\kappa \rightarrow 0}f(x\mid \mu ,\kappa )=\mathrm {U} (x)$
where the interval for the uniform distribution $\mathrm {U} (x)$ is the chosen interval of length $2\pi$ (i.e. $\mathrm {U} (x)=1/(2\pi )$ when $x$ is in the interval and $\mathrm {U} (x)=0$ when $x$ is not in the interval).

## Estimation of parameters

A series of N measurements $z_{n}=e^{i\theta _{n}}$ drawn from a von Mises distribution may be used to estimate certain parameters of the distribution. The average of the series ${\overline {z}}$ is defined as
    ${\overline {z}}={\frac {1}{N}}\sum _{n=1}^{N}z_{n}$
and its expectation value will be just the first moment:
    $\langle {\overline {z}}\rangle ={\frac {I_{1}(\kappa )}{I_{0}(\kappa )}}e^{i\mu }.$
In other words, ${\overline {z}}$ is an unbiased estimator of the first moment. If we assume that the mean $\mu$ lies in the interval $[-\pi ,\pi ]$, then Arg$({\overline {z}})$ will be a (biased) estimator of the mean $\mu$.
Viewing the $z_{n}$ as a set of vectors in the complex plane, the ${\bar {R}}^{2}$ statistic is the square of the length of the averaged vector:
    ${\bar {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 expectation value is
    $\langle {\bar {R}}^{2}\rangle ={\frac {1}{N}}+{\frac {N-1}{N}}\,{\frac {I_{1}(\kappa )^{2}}{I_{0}(\kappa )^{2}}}.$
In other words, the statistic
    $R_{e}^{2}={\frac {N}{N-1}}\left({\bar {R}}^{2}-{\frac {1}{N}}\right)$
will be an unbiased estimator of ${\frac {I_{1}(\kappa )^{2}}{I_{0}(\kappa )^{2}}}\,$ and solving the equation $R_{e}={\frac {I_{1}(\kappa )}{I_{0}(\kappa )}}\,$ for $\kappa \,$ will yield a (biased) estimator of $\kappa \,$. In analogy to the linear case, the solution to the equation ${\bar {R}}={\frac {I_{1}(\kappa )}{I_{0}(\kappa )}}\,$ will yield the maximum likelihood estimate of $\kappa \,$ and both will be equal in the limit of large N. For approximate solution to $\kappa \,$ refer to von Mises–Fisher distribution.

## Distribution of the mean

The distribution of the sample mean ${\overline {z}}={\bar {R}}e^{i{\overline {\theta }}}$ for the von Mises distribution is given by:
    $P({\bar {R}},{\bar {\theta }})\,d{\bar {R}}\,d{\bar {\theta }}={\frac {1}{(2\pi I_{0}(\kappa ))^{N}}}\int _{\Gamma }\prod _{n=1}^{N}\left(e^{\kappa \cos(\theta _{n}-\mu )}d\theta _{n}\right)={\frac {e^{\kappa N{\bar {R}}\cos({\bar {\theta }}-\mu )}}{I_{0}(\kappa )^{N}}}\left({\frac {1}{(2\pi )^{N}}}\int _{\Gamma }\prod _{n=1}^{N}d\theta _{n}\right)$
where N is the number of measurements and $\Gamma \,$ consists of intervals of $2\pi$ in the variables, subject to the constraint that ${\bar {R}}$ and ${\bar {\theta }}$ are constant, where ${\bar {R}}$ is the mean resultant:
    ${\bar {R}}^{2}=|{\bar {z}}|^{2}=\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 ${\overline {\theta }}$ is the mean angle:
    ${\overline {\theta }}=\mathrm {Arg} ({\overline {z}}).\,$
Note that the product term in parentheses is just the distribution of the mean for a circular uniform distribution.
This means that the distribution of the mean direction $\mu$ of a von Mises distribution $VM(\mu ,\kappa )$ is a von Mises distribution $VM(\mu ,{\bar {R}}N\kappa )$, or, equivalently, $VM(\mu ,R\kappa )$.

## Entropy

By definition, the information entropy of the von Mises distribution is
    $H=-\int _{\Gamma }f(\theta ;\mu ,\kappa )\,\ln(f(\theta ;\mu ,\kappa ))\,d\theta \,$
where $\Gamma$ is any interval of length $2\pi$. The logarithm of the density of the Von Mises distribution is straightforward:
    $\ln(f(\theta ;\mu ,\kappa ))=-\ln(2\pi I_{0}(\kappa ))+\kappa \cos(\theta )\,$
The characteristic function representation for the Von Mises distribution is:
    $f(\theta ;\mu ,\kappa )={\frac {1}{2\pi }}\left(1+2\sum _{n=1}^{\infty }\phi _{n}\cos(n\theta )\right)$
where $\phi _{n}=I_{|n|}(\kappa )/I_{0}(\kappa )$. Substituting these expressions into the entropy integral, exchanging the order of integration and summation, and using the orthogonality of the cosines, the entropy may be written:
    $H=\ln(2\pi I_{0}(\kappa ))-\kappa \phi _{1}=\ln(2\pi I_{0}(\kappa ))-\kappa {\frac {I_{1}(\kappa )}{I_{0}(\kappa )}}$
For $\kappa =0$, the von Mises distribution becomes the circular uniform distribution and the entropy attains its maximum value of $\ln(2\pi )$.
Notice that the Von Mises distribution maximizes the entropy when the real and imaginary parts of the first circular moment are specified or, equivalently, the circular mean and circular variance are specified.