logo

Circular Mean 📂Probability Distribution

Circular Mean

Introduction1

Let $\theta \in [0, 2\pi)$ be a point on the unit circle $S^{1}$. Because $\theta$ is periodic, treating it simply as a scalar and computing the arithmetic mean does not yield the correct value. One might think to account for periodicity by taking the modulo $2\pi$, but calculation shows this is not sufficient. For example, suppose three angle measurements $350^{\circ}$, $355^{\circ}$, $10^{\circ}$ are given, and let the angular range be $[0^{\circ}, 360^{\circ})$. Since these three values are clustered near $0^{\circ}$, intuitively their mean should also be near there, and because it is $350^{\circ} + 10^{\circ} = 0^{\circ}$ one might expect the mean to be $355^{\circ}$. However, if you take the modulo and compute the arithmetic mean, you obtain the following result.

$$ \bar{\theta} = \dfrac{350^{\circ} + 355^{\circ} + 10^{\circ} \pmod{360^{\circ}}}{3} = \dfrac{715^{\circ} \pmod{360^{\circ}}}{3} = \dfrac{355^{\circ}}{3} \approx 118^{\circ} $$

In a simpler example, when averaging $180^{\circ}$ and $190^{\circ}$ one would expect to obtain $185^{\circ}$, but instead one gets a value $5^{\circ}$ that is completely contrary to that intuition, as shown below.

$$ \bar{\theta} = \dfrac{180^{\circ} + 190^{\circ} \pmod{360^{\circ}}}{2} = \dfrac{370^{\circ}\pmod{360^{\circ}}}{2} = \dfrac{10^{\circ}}{2} = 5^{\circ} $$

There is also the problem that the value depends on how the angular range is chosen, i.e., on where the branch is placed. If the angular range is taken as $[0^{\circ}, 360^{\circ})$, the arithmetic mean of $20^{\circ}$ and $190^{\circ}$ is $210^{\circ}/2 = 105^{\circ}$. But if the branch is placed at $(-180^{\circ}, 180^{\circ}]$, the arithmetic mean becomes $(20^{\circ} + 190^{\circ})/2 = (20^{\circ} - 170^{\circ})/2 = -75^{\circ}$, so the values themselves lack consistency.

Therefore the mean of circular data should be defined to reflect these characteristics. Let $n$ angle data $\theta_{1}, \dots, \theta_{n}$ be given. Mapping these angles to points on the unit circle in the two-dimensional plane yields respectively $\theta_{i} \mapsto (\cos\theta_{i}, \sin\theta_{i})$. The direction indicated by the arithmetic mean of these two-dimensional vectors is called the circular mean.

Definition

The circular mean of $n$ angles $\theta_{1}, \dots, \theta_{n}$ is defined as follows.

$$ \bar{\theta} = \begin{cases} \tan^{-1} \left( \dfrac{\frac{1}{n}\sum\limits_{i=1}^{n} \sin\theta_{i}}{\frac{1}{n}\sum\limits_{i=1}^{n} \cos\theta_{i}} \right) & ,\text{if } \sum\limits_{i=1}^{n} \cos\theta_{i} \ge 0\\[4em] \tan^{-1} \left( \dfrac{\frac{1}{n}\sum\limits_{i=1}^{n} \sin\theta_{i}}{\frac{1}{n}\sum\limits_{i=1}^{n} \cos\theta_{i}} \right) + \pi & ,\text{if } \sum\limits_{i=1}^{n} \cos\theta_{i} \lt 0 \end{cases} \tag{1} $$

Using atan2 notation, it is written as follows.

$$ \begin{align*} \bar{\theta} &= \operatorname{atan2} \left( \dfrac{1}{n}\sum_{i=1}^{n} \sin\theta_{i}, \dfrac{1}{n}\sum_{i=1}^{n} \cos\theta_{i} \right) \\ &= \operatorname{atan2} \left( \sum_{i=1}^{n} \sin\theta_{i}, \sum_{i=1}^{n} \cos\theta_{i} \right) \end{align*} $$

Explanation

The reason the value in $(1)$ depends on $\sum \cos\theta_{i}$ is that the original range of $\tan$ is limited to $[-\pi/2, \pi/2]$. To correctly represent values in the second and third quadrants, in the cases below we add $\pi$.

Below is a figure showing data near $0^{\circ}$ and its circular mean (left), and data near $90^{\circ}$ and its circular mean (right).


  1. Kanti V. Mardia and Peter E. Jupp. Directional Statistics, p13-15. ↩︎