# How significant is the difference between averaging angles and averaging unit vectors?

I understand that numerically averaging angles (which I will call the $shortcut$ average for convenience) is in general going to produce a very different result than converting to cartesian unit coordinates, averaging those values, converting to polar coordinates, and then getting the argument (which I will call the $correct$ average). I will call the difference between these results the $error$.
However, my intuition tells me that the closer the angles are numerically, the closer the $shortcut$ average of those angles is to the $correct$ average. The extreme case being points on a line, where the 'angle' between them is proportional to their straight-line distance, and the $error$ is $0$.

I would like to know how significant the $error$ is between the $correct$ and $shortcut$ averages, depending on how numerically close the angles are, and, specifically, how significant the $error$ is when the angles are within a half turn of each other (but without crossing $0$).

## Motivation

As suggested by the way I've named the methods above, the $shortcut$ method is simpler to perform and seems (by inspection) to produce intuitive results in some cases (i.e. when the angles are close); however I do not have the intuition to find examples to determine if the values produced by this method are exactly correct, nearly correct, or actually very incorrect.
Additionally, if it is correct for values within a half turn from each other, I wonder how this can be explained rigorously.

## Appendix A : Shortcut method

Directly averaging the angles:

$\bar\phi={1 \over n}\sum_{i=1}^{n}\phi_i$

## Appendix B : Correct method

Converting to the corresponding point on the unit circle, finding the average point, then finding the angle of this point:

$\bar\phi=arg({1 \over n} \sum_{k=1}^{n}e^{i\phi_k})$

• Please provide at least one complete example of what you are talking about that illustrates the different approaches. Right now it's very unclear what the question is. I get the sense that you have a clear picture in your head but we can't see that. – mweiss May 3 '18 at 4:04
• What, for example, does it mean to "convert an angle to Cartesian coordinates"? An angle is a pair of rays (or the intersection of half-planes), not a point. What would you say are the "Cartesian coordinates" of a 30° angle placed in standard position? And what would averaging coordinates tell you? – mweiss May 3 '18 at 4:06
• @mweiss: I'm pretty sure the OP is asking about $\frac1n(\theta_1+\dots+\theta_n)$ versus $\arg(\exp i\theta_1+\dots+\exp i\theta_n)$. – user856 May 3 '18 at 4:11
• @Rahul Maybe? Nowhere does the OP say anything about complex numbers of unit norm. – mweiss May 3 '18 at 4:13
• @mweiss: True, I should have said I'm pretty sure I understand the question and it is equivalent to this. Basically, averaging angles vs. averaging unit vectors. You're right about the $1/n$, but it doesn't matter because of the outer arg so I left it out. – user856 May 3 '18 at 4:18

## 1 Answer

I assume that by "converting to Cartesian coordinates" you mean constructing the vector $(\cos\theta,\sin\theta)$, or equivalently the complex number $\exp i\theta,$ for an angle $\theta$. Then your question is equivalent to comparing the two angles $\theta_s = \langle\theta\rangle$ and $\theta_c = \arg\langle\exp i\theta\rangle$, where the angle brackets denotes the average over all angles $\theta$. To start with, let's get rid of the $\arg$ by converting to Cartesian coordinates once again, yielding $z_s=\exp i\langle\theta\rangle$ versus $z_c=\langle\exp i\theta\rangle$: How does the direction of the mean angle compare to the mean direction of the angles? Of course, we should remember to ignore the magnitudes of the vectors in this case, since it is only the direction that matters in the end.

Without loss of generality, we can shift all the angles so that their mean is zero. Then $z_s=\exp0=1$. One simple observation is that if the distribution of angles is symmetrical about the mean, i.e. for every $\theta$ there is also a $-\theta$, then $z_c$ is also purely real, and so their directions agree. Thus for a symmetrical distribution there is no difference between the two quantities.

For a general distribution, we can use the Taylor series of $\exp$, yielding \begin{align} z_c &= \left\langle 1+i\theta + \frac{i^2}{2!}\theta^2 + \frac{i^3}{3!}\theta^3 + \cdots\right\rangle \\ &= 1 + i\langle\theta\rangle - \frac{1}{2!}\langle\theta^2\rangle - \frac{i}{3!}\langle\theta^3\rangle + \cdots \\ &= \left(1 - \frac12\langle\theta^2\rangle + \cdots\right) + i\left(-\frac16\langle\theta^3\rangle + \cdots\right). \end{align} If the angles $\theta$ are small, the higher-order terms may be neglected, and we see that the directions of $z_c$ and $z_s$ differ by approximately an angle $\frac{\langle\theta^3\rangle/6}{1 - \langle\theta^2\rangle/2}$. This is related to the skewness of the distribution, $\gamma_1 = \langle\theta^3\rangle/\langle\theta^2\rangle^{3/2}$, which indeed measures the deviation from symmetry.

• What do you mean by "the angles are small"? Because, hypothetically, if all the angles are equal, then there is no difference between the methods. – Zoey Hewll May 3 '18 at 5:53
• Whereas I would presume that it would be difference between the angles, and not their individual values, that affect the error – Zoey Hewll May 3 '18 at 6:03
• I mean it in the same sense as one says "$f(x+h)$ is approximately $f(x)+hf'(x)$ if $h$ is small". If the angles are spread out over a wide range, then the formula above would not be a good estimate of the difference between the methods. And you're right, it's the differences between angles that counts, but that's consistent with what I said because I'm assuming that the angles are already shifted to zero mean. – user856 May 3 '18 at 6:07