Statistics & probability

Von Mises Fisher distribution fit calculator for three dimensional directions

Fit a von Mises–Fisher distribution to three-dimensional directions on the unit sphere.

Your numbers

Each row has x,y,z coordinates of a nonzero direction; rows are normalized.

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

Fit a von Mises–Fisher distribution to three-dimensional directions on the unit sphere. The page separates the mean direction from concentration and explicitly normalizes nonzero input vectors so their lengths do not act as unrequested observation weights.

THE FORMULAf(x)=κ exp(κμ·x)/(4π sinh κ); μ=R/||R||; coth κ−1/κ=R̄; ||x||=||μ||=1.

A worked example

The 24 default direction rows fit concentration κ≈4.245434 and mean resultant length R̄≈0.764864. One input row is doubled in length to demonstrate normalization: it supplies the same direction, not twice the statistical weight.

Good to know

10–300 finite nonzero3D vectors,each normalized; unit-sphere von Mises–Fisher fit with κ≤500. Reject unresolved zero resultant,near-identical directions and excessive concentration. No mixtures,axial antipodal identification,higher-dimensional sphere fit or confidence cone; vector lengths are not weights.

A direction lives on the sphere, not in ordinary coordinate space

Three-dimensional directional data record orientation regardless of vector length. Every nonzero row is divided by its Euclidean norm before fitting, placing the observation on the unit sphere and keeping the intended sampling unit unchanged.

This convention means a row multiplied by ten contributes the same direction as before. If length should represent confidence, count or importance, an explicitly weighted model is required. The page does not infer such weights from an arbitrary coordinate magnitude.

Mean direction and concentration describe different spherical featuresκ = 4.2454R̄ = 0.7649Normalize direction rowsProjected unit sphere
Scroll across to see the full diagram.
The 24 default direction rows fit concentration κ≈4.245434 and mean resultant length R̄≈0.764864. One input row is doubled in length to demonstrate normalization: it supplies the same direction, not twice the statistical weight.

Compare this with the Circular linear correlation calculator from paired angles and measurements. A circular angle-linear correlation is not a directional likelihood fit on the sphere.

Directional and axial observations have different meanings

The von Mises–Fisher model distinguishes a direction from its opposite. A vector toward the north and one toward the south can cancel in the ordinary resultant even though both might describe the same undirected axis in another application.

Axial data require an antipodally symmetric model rather than silently flipping vectors until they align. Preserve the measurement convention in the input and interpretation. A weak resultant can indicate diffuse or multimodal directions, not simply a numerical problem.

The normalized resultant determines the fitted orientation

Averaging the unit vectors gives the sample resultant vector. Its direction provides the fitted mean direction when its length is nonzero, while its length R-bar lies between zero and one and summarizes directional concentration.

A near-zero resultant makes the mean direction unresolved. The implementation rejects that case rather than returning a random coordinate axis. This does not claim the underlying observations have no structure; opposing clusters can also produce a small mean resultant.

Concentration solves a one-dimensional moment equation

On the two-dimensional sphere embedded in three coordinates, the likelihood equation is coth(kappa) minus one over kappa equals R-bar. The implementation brackets the positive solution and uses bisection, with a small-kappa series to avoid cancellation.

The normalization uses a logarithmic hyperbolic-sine expression for numerical stability. Its reported moment residual checks the equation actually solved, rather than comparing a fitted concentration to an unrelated planar circular concentration formula.

The default checks that magnitudes are not weights

The example includes 24 directional observations with fitted kappa about 4.2454 and R-bar about 0.7649. One row is deliberately twice its unit length, and normalization removes that purely radial scaling.

The normalized mean direction and concentration can be compared independently with a unit-sphere distribution implementation. Averaging the unnormalized rows would give the stretched row additional influence and therefore solve a different weighted or spatial problem.

Nearly identical directions approach an infinite concentration

As all normalized observations become identical, R-bar approaches one and the likelihood concentration grows without a finite upper limit. A finite numerical cap is not a scientifically estimated maximum concentration.

The page reports an error when the supported concentration bound is exceeded or the boundary is unresolved. It likewise rejects zero vectors because their direction is undefined. These failures retain the distinction between absent information, limiting models and a completed interior estimate.

Do not turn a fitted direction into a certainty cone

The result contains a point estimate of mean orientation and concentration under a single-component model. It does not calculate a confidence cone, test rotational symmetry or choose between several directional clusters.

Use a directional plot and the measurement design to assess whether one spherical mode is reasonable. Independent vectors, appropriate orientation conventions and a defensible sampling model remain necessary; a small moment residual confirms numerical arithmetic rather than those scientific assumptions.

A few questions, answered

Are vector lengths used as weights?

No. Every nonzero row is normalized, so only its direction contributes.

What if north and south represent the same axis?

That is axial data; this directional model treats opposite vectors as different observations.

Why reject identical directions?

Their maximum-likelihood concentration is unbounded rather than a finite resolved estimate.

Is kappa an angle?

No. Kappa is a nonnegative concentration parameter; larger values mean tighter directional concentration.

Find your calculator

Start typing to explore the library.