Talk:Circular mean

Circular mean quirkiness and other random thoughts
There are some weird quirks to this calculation of mean that probably ought to be noted.


 * 1) if the radius calculated from all unit vectors is zero, the is no circular mean (noted)
 * 2) perhaps some notability of the certainty of the angle retrieved as it relates to the radius.... or if there's multi-modal distributions and they average out to have a radius near zero,  the resulting calculated circular mean  could be all over the place and not anywhere near the "true" angle one would hope to recover from statistics (although we could be dead certain that the "true radius" estimated by the sum of all those vectors would be quite small).  The concept of computational stability is involved here as well, although I wouldn't know what article to link to for further guidance.
 * 3) Just for my curiosities sake: Is there a physical analog to this mean? What is it? I can't think of one off the top of my head but I'm certain it exists. (actually, I do have some ideas considering an ideal disk or sphere that I think work, but I'm working now and can't really work on the idea further...  I guess this is Original Research, anyways, so unless noted in a book somewhere, probably not include-able.  But it also relates to idea number 2.)

Oh yes, I know.. balancing a wheel on the tire, except the concept there is to not have a circular average(! having one would be a bad thing!!)

I'm not sure if any of the above makes sense but hopefully it does. Root4(one) 21:36, 19 November 2007 (UTC)

Some other random thoughts/notes:

- For the physical analog, as you mentioned, it can be seen as the angle defined by the center of mass of the wheel.

- The method could be generalized to a weighted mean (in order to unbalance the wheel :)

- A tricky question: what does "reasonable mean" means? knowing that
 * - the arithmetic mean can be calculated by taking the angle minimizing the variance of the angles, and you then obtain a slightly different mean than this reasonable mean
 * - if you restrict the angles to [-90° 90°], and compare it with the ordinary arithmetic mean (which then makes sense, doesn't it?), the 2 means are again slightly different

The "reasonable" (or "slightly") should maybe be detailed for more accuracy, but I didn't manage to get anything consistent myself... Kiwux (talk) 14:18, 9 April 2008 (UTC)

This article is misleading
Statements like ""the arithmetic mean of 0° and 360° is 180°, although 0° would be clearly the better choice" are very misleading.

Consider the case of a process in which the resulting angle is the sum of many small angular displacements about a mean which we can assume is 0 degrees. As the number of displacements N grows larger and the angular displacements &delta; grow smaller (with N&delta; remaining finite) the distribution tends towards a normal distribution of angles about 0 degrees where the range of angles is from negative infinity to positive infinity. The problem is that we cannot measure the "true" angle $$\theta$$, we can only measure the "measured angle" $$\theta_m$$ which is constrained to lie inside, lets say, 0 to $$2\pi$$. A measured angle of 358 degrees could result from a small number of displacements in the negative direction (true angle=-2 degrees), or it could result from a large number of displacements in the positive direction (true angle=358 degrees) or even a very large number of displacements in the positive direction (true angle = 360+358=718 degrees) etc. etc. To say that for two measured angles of 2 and 358 degrees, 0 degrees is a better estimator of the mean of the underlying distribution rather than 2+358=180 is unjustified. It could happen that the distribution had a mean of 180 degrees. Because the two measurements are bunched around 0 degrees, its more likely that the mean will be some multiple of 360 degrees, but not for certain, and you cannot say its simply zero either. The average of the true angles is simply unknown, and the average of the measured angles is misleading, no matter how you do it.

This is why $$z=e^{i\theta_m}=e^{i\theta}$$ is used as the working variable. It is unambiguous, despite the ambiguity in the true angle. It's what we actually measure. When we calculate the average z value, we obtain Ave(z)=cos(2 degrees), and thats a valid estimate for $$e^{i\mu}$$ where $$\mu$$ is the mean. But when we calulate arg(Ave(z)) we do not get zero. We re-introduce the uncertainty. arg(Ave(z))=2n$$\pi$$ where n is some unknown integer. In other words, an estimate for the mean being 360 degrees (true value) is just as valid as an estimate of 0 degrees.

I don't have any references for this, but I really believe that the article is glossing over the true nature of the problem in favor of some hand-waving and incorrect arguments. Does anyone agree, and are there any references that can be found for this? PAR (talk) 19:08, 1 January 2010 (UTC)


 * If you have "true" angles, and -2° is distinct from 358°, then you haven't really got a circular topology, so the sort of mean described by this article is not appropriate (I suppose). --catslash (talk) 13:55, 19 January 2011 (UTC)

Don't mistake the angle for the actual point
PAR, the case is question is a a set of points on the rim of a circle, not a set of angle measurements. A point can be assigned the angle of 1, 361, or -719, but these angles all refer to the same point. If you map those points in some way to a distribution on R1, the average of that distribution might not correspond to what you would naturally call the average on the circle. The article was a little more relaxed and non-rigorous than you are trying to make it. James M, 07:00ish, 5 June 2010 (UTC)


 * Is there anything in what I wrote that gives the impression I am confusing the two? I agree with your last sentence. Is there anything wrong with that? PAR (talk) 19:34, 6 June 2010 (UTC)

However the article had a serious error
The Cartesian average of the points would NOT be on the circle's rim, except in the trivial case of every point coinciding. The average converted to polar coordinates would have a radius of less than one. That angle with the radius set to one would give a point on the circle's rim. That error probably added to the confusion. James M, 07:16, 5 June 2010 (UTC)

Problem with the definition
I think the definition should be discussed more. I must say, I never found a proper discussion on this problem of mean averaging.

For example, given the formula in this article, the mean of 0°, 10° and 180° would be .... 10°, which is quite counter-intuitive. I would rather have a mean of 85°.

Also, isn't it a problem that the mean of a distribution would not be in the domain of this distribution? The argument of the euclidean distance works only if the circle is a meaningful representation of the circular quantities and the distance from one point to any other is a meaningful measure for the circular quantity considered.

I usually use this definition for the discrete average of circular quantities:

$$ \hat{\theta} = \mathop{\rm arg\,min}_{\tilde{\theta} \in D} \sum_{i=1}^{N} d^2(\theta_i, \tilde{\theta}) $$

with $$d(x,y)$$ the cyclic distance (i.e. $$d(350,10) = 20, d^2(350,10) = 400$$), and D the cyclic domain.

For some reason, \mathop doesn't behave as usual for subscripts ... but that's the idea.

This definition has the advantage to behaves exactly as the usual average when all the data is confined in an area where the circularity has no impact (i.e. if the spread of the data is less than half the total size of the domain). However, it is difficult to find this argmin.

What do you think?

--PierreBarbierDeReuille (talk) 14:52, 16 December 2010 (UTC)

It's not that hard to find this argmin. Take the normal mean, and it's one of the $$n$$ that are off by $$2 \pi k / n$$ from this. (proof sketch: clustered data, continuity (+ handwave at edge), and moving one point all the way around gives the same input but moves this mean by 1/nth of a rotation.)

Time is O($$n^2$$) rather than O(n), but this may be sufficient. 96.25.192.36 (talk) 08:49, 5 February 2013 (UTC)


 * You have to ask, what is the point of taking a mean? Its because it is an estimator of one of the parameters of the underlying population, and that population has a distribution which YOU assume. For example, in linear statistics, you assume a normal distribution with unknown mean and variance, and then you have a sample and you want to know the best estimate of the mean of the normal population. Thats just the sum of the sample values divided by the number of samples. If you assume a different distribution, then maybe thats not the way to go. Its the same with circular statistics - you assume that some underlying population gave you the sample, and you want to estimate the parameters of that population using that sample. Usually one assumes a von Mises distribution, or a wrapped normal distribution, and then the mean taken in the prescribed way will be an estimator of the mean of the von Mises or wrapped normal distribution. Approach it this way and the mean as described makes more sense. PAR (talk) 07:28, 6 February 2013 (UTC)

Don't need to divide by n
Isn't $$\operatorname{atan2}\left(\frac{1}{n}\cdot\sum_{j=1}^n \sin\alpha_j, \frac{1}{n}\cdot\sum_{j=1}^n \cos\alpha_j\right) $$ the same as $$\operatorname{atan2}\left(\sum_{j=1}^n \sin\alpha_j, \sum_{j=1}^n \cos\alpha_j\right) $$? And $$\arg\left(\frac{1}{n}\cdot\sum_{j=1}^n \exp(i\cdot\alpha_j)\right) $$ the same as $$\arg\left(\sum_{j=1}^n \exp(i\cdot\alpha_j)\right) $$? Multiplying or dividing by a positive real number should not affect the angle. --208.80.119.68 (talk) 17:43, 10 July 2012 (UTC)
 * I was thinking just the same thing. --Amble (talk) 02:42, 22 July 2015 (UTC)
 * You are right, the scaling in the formulas as they stand is unnecessary. I guess I wrote it this way because I explained above the relation to the arithmetic mean of points on the circle and the meaning of the distance from the origin. I have rewritten the formulas and added a remark on the omitted scaling. HenningThielemann (talk) 17:38, 13 February 2016 (UTC)

N-dimensional version, and quaternion version
Since the properties of this mean, listed under "Properties", are valid for more than 2 dimensions, there must be a generalization of this to a higher number of dimensions. Is there a general form (maybe using spherical harmonics)? Or do the trig functions have to be figured out separately for each number of dimensions?

In particular, it would be helpful to list the equivalent for 3 dimensions, i.e. given a set of unit vectors in 3 dimensions, how do you find the mean vector that satisfies the listed properties?

More generally, can this be extended to the quaternion double-cover of SO(3), so that the average of a set of unit quaternions can easily be calculated? Most solutions for averaging quaternions involve finding the SVD or eigendecomposition -- but I have to believe there's an analog to the mean of circular quantities for quaternions. In fact there are already separate cosine and sine weightings in the definition $$q = [\mathrm{cos} (a / 2), \mathrm{sin}(a/2) [x, y, z]]$$ that would almost suggest that componentwise averaging would work -- although the unit vectors $$[x, y, z]$$ cannot be directly averaged (and the double cover of SO(3) remains a problem, since $$q$$ and $$-q$$ represent the same rotation).