Statistics & probability

Von Mises distribution fit calculator from angle observations

Estimate the mean direction and concentration of a von Mises distribution from angular observations in radians.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Estimate the mean direction and concentration of a von Mises distribution from angular observations in radians. Angles are combined through sine and cosine components, avoiding the wraparound error of an ordinary arithmetic mean. The result includes the mean resultant length, concentration parameter and negative log likelihood. A zero resultant has no resolved mean direction, which is reported explicitly.

THE FORMULAR=|mean exp(iθ)|; I1(κ)/I0(κ)=R; μ=atan2(mean sin θ,mean cos θ).

A worked example

Angles −60°,−30°,0°,30°,60° have mean direction zero and resultant length (2+√3)/5. Concentration is the positive solution of I1(κ)/I0(κ)=R. The fitted density is periodic; angles on opposite sides of the ±180° seam remain close on the circle.

Good to know

5–300 angles; degrees converted to radians. κ≤200. A vanishing resultant has no identified mean direction, and near-identical observations may exceed the concentration limit. One-component circular model; no multimodal fit.

Why linear averaging fails at the seam

Directions close to zero and two pi describe nearly the same orientation, although their ordinary average can point the other way. Averaging unit vectors respects the circular geometry.

The angle of their resultant gives the circular mean, while its length measures alignment. Negative angles and angles beyond a full turn describe equivalent directions after wrapping. These are directional observations: an undirected axis, where an angle and its opposite are identical, needs an axial transformation before fitting.

Angular data combine as unit vectors around a circleMean direction: 0R = (2+√3)/5Fit I1(κ)/I0(κ) = R
Angles −60°,−30°,0°,30°,60° have mean direction zero and resultant length (2+√3)/5. Concentration is the positive solution of I1(κ)/I0(κ)=R. The fitted density is periodic; angles on opposite sides of the ±180° seam remain close on the circle. Static schematic; numerical labels define the example.

Fits a probability distribution and concentration from an arbitrary bounded angle sample, beyond the existing three-angle mean. The Truncated normal distribution fit calculator from bounded samples offers a complementary calculation under its own stated assumptions.

From resultant length to concentration

The fitted concentration kappa solves a ratio of modified Bessel functions equal to the mean resultant length. Kappa zero gives a uniform circle.

Larger kappa places more mass near the fitted direction, but kappa is not a variance measured in radians squared. At very high concentration a local normal approximation can be useful, yet it does not turn the circular distribution into a globally linear one. This calculator caps the resolved concentration rather than claiming precision for nearly identical directions.

Worked example and mathematical rule

Angles −60°,−30°,0°,30°,60° have mean direction zero and resultant length (2+√3)/5. Concentration is the positive solution of I1(κ)/I0(κ)=R. The fitted density is periodic; angles on opposite sides of the ±180° seam remain close on the circle.

R=|mean exp(iθ)|; I1(κ)/I0(κ)=R; μ=atan2(mean sin θ,mean cos θ).

The undefined-direction case

When sine and cosine sums cancel, the data have no preferred first-order direction. The fit then has kappa zero and an undefined mean, not an arbitrarily chosen zero-radian direction.

Opposite clusters can create exactly this behavior even though the observations are far from uniformly spread. A single von Mises distribution cannot represent every multimodal circular sample. Plotting the raw angles can reveal structure hidden by a small resultant length.

Interpreting a finite sample

Maximum likelihood concentration can be biased for small samples, and this implementation does not apply a small-sample correction or produce a confidence region. Sampling design matters: many repeated readings from one rotating instrument are not necessarily independent observations.

The likelihood also assumes the same directional distribution for all rows. If observations combine different seasons, locations or operating regimes, a mixture or regression model may be more informative than a single mean direction.

Choosing units and orientation

Convert degrees to radians before entering the data. Decide whether angles increase clockwise or counterclockwise and use that convention consistently.

A rotation of every observation should rotate the fitted mean by the same amount while preserving kappa and resultant length. Reflection should reverse the direction without changing concentration. These checks are useful for finding unit conversion or compass-bearing mistakes before using the fit to describe navigation, phase or periodic timing measurements.

What the density actually predicts

A continuous direction has probability zero at one exact angle; the density height is not the probability of that exact reading. Probabilities apply to angular intervals and must be integrated with wraparound handled correctly.

The fitted mean can lie outside the arithmetic range of the entered angle numbers because that range ignores circular equivalence. Treat the displayed angle as a direction modulo two pi. For a multimodal sample, report that limitation rather than describing the fitted mean as a representative observed orientation.

A few questions, answered

Are the inputs degrees?

No. Enter radians, or convert degrees by multiplying by pi divided by 180.

Why can the mean direction be undefined?

Opposing unit vectors can cancel, leaving no first-order preferred direction.

Is kappa the reciprocal variance?

Not in general. That is only an approximate large-concentration relationship on a local angular scale.

Can this fit two directional peaks?

It fits one von Mises component; multimodal samples need a richer model.

Find your calculator

Start typing to explore the library.