Key takeaway

Average directions with a declared circular method and retain its resultant strength. A numeric angle alone can hide wraparound mistakes or an undefined mean.

Treat a full turn as a return to the same direction

A receiving dashboard averages two directions, 350° and 10°, and displays 180°. The addition and division are correct for ordinary numbers. Their interpretation is wrong for the stipulated directional question: both observations lie close to the zero-degree direction, on opposite sides of the display boundary. More decimal places cannot repair the chosen aggregation.

SciPy defines a circular mean through the argument of the average unit vector. Its circmean interface also makes the full-turn range explicit; its default is expressed in radians. Before computing, name the angular origin, rotation direction, full-turn range and weighting. The following examples use equal-weight directions over one 360° turn, with zero equivalent to 360°.

Supporting referencesSciPy: circmean

Work the wraparound pair through components

In this hypothetical fixture, let C be the average cosine of the two angles and S the average sine, converting degrees to radians for the trigonometric functions. For 350° and 10°, the sine components cancel and C = cos(10°), approximately 0.984808. The angle atan2(S,C), wrapped into the declared turn, is 0°. An implementation may display the equivalent boundary as 360° because of finite arithmetic.

The mean resultant length R = √(C² + S²) is approximately 0.984808. SciPy’s circular-variance definition is 1−R, giving approximately 0.015192 for this pair. The author recomputed the components locally. This is an invented mathematical example, rather than a measurement of a wind sensor, vessel, asset or available archive.

Synthetic pairOrdinary meanCircular resultResultant length R
350°, 10°180°0° / equivalent 360°≈ 0.984808
0°, 180°90°Undefined in exact arithmetic0
90°, 270°180°Undefined in exact arithmetic0
Supporting referencesSciPy: circmeanSciPy: circvar

Opposing observations do not identify an average direction

The hypothetical pair 0° and 180° has cancelling unit vectors: C=0 and S=0 in exact arithmetic. Its resultant has no direction. A computed atan2 call can still return an angle because machine arithmetic leaves a minute residual. The displayed number should not be promoted into a meaningful mean merely because the function completed without an exception.

SciPy explicitly says its circmean output is implementation-defined when the mean resultant vector is zero. Circular variance is 1 in that exact opposing case. Retaining R or the chosen dispersion measure makes this failure visible. For nearly cancelling observations, the team needs a justified numerical and domain policy for reporting an unstable or indeterminate summary; no universal cutoff is supplied here.

Supporting referencesSciPy: circmeanSciPy: circvar

Choose what receives equal weight

The illustration weights observations equally. That is a declared estimand, not a default truth about the source process. A direction recorded every second and one recorded only when equipment changes heading represent different observation mechanisms. If the intended summary is time-weighted, preserve interval exposure and define the weighting before summarizing. Repeating a row to simulate a longer interval should remain an explicit transformation.

A magnitude-weighted vector and an equal-length unit-vector average can answer different questions even for the same direction values. Establish whether the task concerns frequency of observed headings, time spent at headings or a vector quantity with its own magnitude. Do not silently substitute one. This article demonstrates the equal-weight angular method only; it does not validate a particular sensor’s reporting convention.

Also identify whether the quantity is directional over 360° or an orientation with a different symmetry. Two ends of an undirected axis may be equivalent for a domain task even though opposite travel directions are not. The responsible domain reviewer must settle that meaning before the analyst chooses an angular transform.

Accept the summary together with its diagnostic

The completed fixture accepts 0° as the wraparound pair’s mean and marks the opposing pairs indeterminate. Its receiving record retains the original angles, declared angular convention, eligible observations, weights, missing-value handling, C, S, R and displayed mean. Include both pairs in a synthetic round-trip test so a receiving change cannot accidentally restore an arithmetic average.

A circular-variance value is not degrees squared, an instrument calibration result or a confidence interval. Keep those claims separate. The useful next decision is whether the receiving summary expresses the intended direction quantity and exposes cancellation. If the archive lacks its angular convention or observation weights, resolve that gap before treating a polished directional chart as evidence.

Supporting referencesSciPy: circvar

Tools for this decision

Data inventory builder →Diligence question builder →