Averaging times of day
A Socratic walk-through of averaging times of day — reasoned out one step at a time, not lectured.
The question we started with
THE QUESTION #Why does the ordinary average give a nonsense answer when the numbers are clock times or compass bearings?
Two people arrive at a building: one at 23:00, one at 01:00. Average arrival time, please.
The arithmetic is not in dispute. Twenty-three plus one is twenty-four, halved is twelve, so the answer is noon — the one hour of the day when neither of them was anywhere near the place, and the hour furthest from both. Something has gone wrong that is not a rounding error, and it is worth being precise about what.
Reasoning it through
REASONING #The first instinct is that this is a wraparound nuisance: the data straddled midnight, so shift the origin, average, and shift back. Re-zero the clock at 18:00 and the two arrivals become 5 and 7 hours; their mean is 6, which maps back to midnight. Correct answer.
But look at what just happened. The same two observations produced noon under one origin and midnight under another. So the arithmetic mean of clock times is not a function of the data at all. It is a function of the data and an arbitrary convention about where the day starts.
That is the sharp version of the complaint, and it is stronger than "inaccurate". Midnight is not a fact about time; it is a bookkeeping choice, like the prime meridian. A statistic that changes its answer when you re-letter the axis is telling you about your labelling scheme.
Can we state the requirement that failed? Try this: if every observation is rotated by the same amount — everyone arrives an hour later, every bearing is read from a compass turned ten degrees — the summary should rotate by exactly that amount and change in no other way. Call it rotation-equivariance. The arithmetic mean satisfies the analogous shift rule on a line, which is why it works on temperatures and heights. On a circle it fails, because the line's endpoints are glued together and the mean has no way to know it.
So what does satisfy it? Notice what a time of day actually is: not a magnitude but a direction. Twenty-four hours is one full turn, so each observation is an angle, and each angle is a point on a circle of radius one. Nothing distinguishes one point on that circle as larger.
Now the move. Replace each observation by the unit vector pointing at its angle — for time t in hours, the angle is 2*pi t*/24, giving the pair (cos, sin). Vectors live in an ordinary plane, where averaging is well defined: average the horizontal components and the vertical ones, then read the direction of the result back off as an angle.
Try it on 23:00 and 01:00. Both sit just to one side of straight up, one leaning slightly left and one slightly right. Their horizontal parts cancel; their vertical parts add. The average vector points straight up: midnight. And it does so under any origin, because rotating every input vector rotates the sum by the same amount. Equivariance is not patched in, it is built into the geometry.
Then something falls out that has no counterpart on a line. The average vector has a length as well as a direction, between zero and one, usually written R. When observations cluster tightly they nearly all pull the same way and R approaches one. When they scatter, they cancel and R shrinks. So R is a concentration measure — and one minus R is used as the circular variance.
Now push the awkward case. Average 06:00 and 18:00. Those vectors point in exactly opposite directions and sum to nothing: a vector of zero length, with no direction whatsoever. The mean time is not hard to compute here, it does not exist. Every hour of the day is equally the answer, which is to say none is.
That is the real payoff. Linear data always has a mean, however useless. Circular data can genuinely fail to have one, and the vector method reports that failure through R rather than manufacturing a number. The naive average never can — it returns noon for 06:00 and 18:00 too, looking just as respectable as any other answer it prints.
The analogy
THE ANALOGY #Picture a bicycle wheel lying flat, and stick a small weight on the rim at each observed time — a weight at the 23:00 mark, another at 01:00. Now find the balance point of the whole wheel. It does not lie on the rim; it sits somewhere inside, and the direction from the hub out to it is the mean time. How far it sits from the hub tells you how much the observations agree. If the weights are spread evenly around, the balance point is the hub, and there is no direction to report.
the balance point is a genuine point in the plane while a time of day must live on the rim, so projecting back out to the rim throws away exactly the part that told you whether the answer meant anything — which is why a mean direction quoted without its resultant length is half a result.
Clarifying the model
THE MODEL #The shift-the-origin trick from earlier is not wrong. If the data occupies a modest arc, you can cut the circle at the empty part, unwrap to a line, average, and wrap back — and you will agree with the vector method. The vector method is the principled version of that trick: it never asks you to choose the cut, and it does not break when the data covers most of the circle, where no good cut exists. That is also the honest boundary of the exercise — with a bimodal distribution, a morning peak and an evening peak, a single mean direction is a poor summary however computed, and the low R is the signal to stop summarising and describe the shape instead.
The other correction is scope. This is not a quirk of clocks. It applies to any scale that closes on itself: compass bearings, wind directions, phase angles, longitude, day-of-year seasonality, hue. The navigational case bites hardest — headings of 350 and 10 degrees average arithmetically to 180, the reciprocal course, precisely backwards. The consequences propagate too: standard deviation, correlation and regression all need circular definitions, and the von Mises distribution rather than the normal is the natural bell-shaped model on a circle.
A picture of it
THE PICTURE #How to readeach column is a pair of observed times. Bars are the arithmetic mean, which answers noon for every midnight-straddling pair however close together they are; the line is the vector mean, which answers midnight, and agrees with the bar on the fourth pair, where nothing crosses the wrap point.
What became clearer
WHAT CLEARED #The failure is not that the arithmetic mean is imprecise on a circle — it is that the arithmetic mean is not defined on a circle at all, because it silently depends on where you decided the numbers start. Treating each observation as a direction and averaging the vectors restores the property that was lost, and hands back a second number, the resultant length, that says whether an average direction was ever a sensible thing to ask for.
Where to go next
ONWARD #- The circular median, and why it is defined by minimising arc distance rather than by sorting.
- The Rayleigh test: deciding whether an observed R is larger than chance would produce.
- Data on a sphere rather than a circle — geological orientations, or points on the Earth.
Key terms
TERMS #| Term | What it means |
|---|---|
| Circular data | measurements on a scale that closes on itself, where the largest value is adjacent to the smallest — times, bearings, phases, angles. |
| Vector mean (mean direction) | the direction of the average of the unit vectors representing each observation; the circular replacement for the arithmetic mean. |
| Resultant length (R) | the length of that average vector, from 0 to 1; a measure of how concentrated the observations are. Circular variance is one minus R. |
| Rotation-equivariance | the requirement that rotating all observations by a fixed amount rotates the summary by that same amount and does nothing else. |
| von Mises distribution | the circular analogue of the normal distribution. |
Every term the collection defines is gathered in the glossary.