In mathematics and statistics, a circular mean or angular mean is a mean designed for angles and similar cyclic quantities, such as times of day, and fractional parts of real numbers.
For example, the arithmetic mean of 0° and 360° is 180°, which is misleading because 360° equals 0° modulo a full cycle.
[1] As another example, the "average time" between 11 PM and 1 AM is either midnight or noon, depending on whether the two times are part of a single night or part of a single calendar day.
This computation produces a different result than the arithmetic mean, with the difference being greater when the angles are widely distributed.
Moreover, with the arithmetic mean the circular variance is only defined ±180°.
Convert that point back to polar coordinates.
If the angles are uniformly distributed on the circle, then the resulting radius will be 0, and there is no circular mean.
(In fact, it is impossible to define a continuous mean operation on the circle.)
In other words, the radius measures the concentration of the angles.
a common formula of the mean using the atan2 variant of the arctangent function is An equivalent definition can be formulated using complex numbers: In order to match the above derivation using arithmetic means of points, the sums would have to be divided by
This may be more succinctly stated by realizing that directional data are in fact vectors of unit length.
Thus the sample mean resultant vector can be represented as: Similar calculations are also used to define the circular variance.
Intuitively, calculating the mean would involve adding these three angles together and dividing by 3, in this case indeed resulting in a correct mean angle of 20 degrees.
: In this python code we use day hours to find circular average of them: A series of N independent unit vectors
The maximum likelihood estimates of the mean direction
is simply the normalized arithmetic mean, a sufficient statistic:[2] A weighted spherical mean can be defined based on spherical linear interpolation.