Session 5 — Random walks, correlated and biased random walks, Lévy walks
University of Rome Tor Vergata
2026-10-06
Internal state Motion capacity Navigation capacity External factors Movement path
Random walks are the simplest possible answers to how an animal moves and where it is heading. Their value is not realism — it is that they tell you what to expect if nothing else were going on.
Today’s practical builds a simulator from scratch. The same simulated animal becomes the ground truth you test estimators against in Sessions 6 and 7.
A random walk is a null model. When the animal departs from it, the departure is the biology: memory, attraction, avoidance, a home range.
Same number of steps. Red triangle: start. Cross: the goal of the biased walk.
Linear MSD means the typical distance from the start grows only as \(\sqrt{t}\). A random walker four times as long gets only twice as far.
Circles: the root of the expected MSD. Ten times more steps, only \(\sqrt{10} \approx 3.2\) times further.
A correlated random walk (CRW) draws each new heading close to the last:
\[\phi_t = \phi_{t-1} + \theta_t, \qquad \theta_t \sim \text{von Mises}(0, \kappa)\]
Every random walk in this session, and every SSF and HMM later, is built from one distribution of each kind.
Short lags: persistence makes a CRW ballistic (MSD ∝ t²). Long lags: it forgets its direction and becomes diffusive (MSD ∝ t). The crossover is the scale of the animal’s directional memory.
You plot MSD against lag on log–log axes for a real track. The slope is ~1.8 at lags up to 3 hours, then ~1.0 up to 10 days, then flattens to ~0. What does each regime suggest?
Slope near 2: ballistic, persistent movement — the animal keeps its heading for a few hours. Slope near 1: diffusive, a correlated random walk has forgotten its direction. Slope near 0: MSD stops growing because the animal cannot get any further from where it was — a home range.
That last regime is what an unbiased random walk can never produce, and it is the starting point of Session 6. One caution: very short lags can also look flat because GPS error sets a floor on the smallest measurable displacement.
Add a preferred direction — towards a den, a water hole, a breeding ground:
Weak bias is invisible over a few steps and decisive over many. That is why orientation mechanisms are so hard to detect in short tracks and so obvious in migrations.
A weak pull towards the east (bias weight 0.1). For the first 170 steps the random spread is larger than the progress; after that, drift wins for good.
A BCRW whose goal is its own home produces something new: the animal wanders, drifts back, wanders again. It never escapes.
In the practical this central-place walker becomes our ground-truth animal: we know its true home range, so in Session 6 we can check which estimator gets it right.
No memory, no map, no boundary — only a weak pull towards home. Dashed: the true 95% range, about 800 km², which Session 6 tries to recover.
A homing pigeon is simulated as a BCRW with a weak bias towards its loft. Over the first 10 steps its track is indistinguishable from an unbiased CRW. Over 500 steps it heads unmistakably home. Why?
The bias adds a small, consistent component to every step: after \(n\) steps the drift has accumulated in proportion to \(n\). The random component partly cancels itself out, growing only as \(\sqrt{n}\). Eventually the drift must dominate.
Detecting orientation in real animals is hard for exactly this reason: over a short track, even a genuine bias is swamped by noise.
The honest position: a power-law fit is not evidence of a Lévy strategy. Different mechanisms produce indistinguishable step-length distributions.
Grey: one exponential. Gold: a true power law. Red: two exponential modes, no power law anywhere — yet heavy-tailed enough that a power law beats a single exponential by thousands of AIC units.
You fit an exponential and a power law to 2,000 step lengths by maximum likelihood. The power law wins by more than 2,000 AIC units. What have you shown?
In the practical you will generate exactly this result from a mixture of two exponential distributions — a short-step mode and a long-step mode, and no power law anywhere. The power law wins decisively anyway.
A fit tells you about the shape of a distribution. It cannot tell you which process generated it. To argue for a Lévy strategy you would need to rule out composite walks — for instance by showing that the long steps do not belong to a distinct behavioural state (Session 8).
The null must match the animal in everything except the mechanism. A null with the wrong step lengths is a straw man, and rejecting it proves nothing.
Grey-green: 300 CRWs with the buffalo’s own steps and turns. Red line: the buffalo. Only the longer track is clearly more confined than its null.
You test whether a buffalo is range-resident by comparing its radius of gyration with 300 CRWs built from its own steps and turns. For a 36-day track it sits at the 73rd percentile; for a 157-day track of another buffalo, the 1st. What is the most important lesson?
These are real results for the Kruger buffalo. Over a month, a resident and a random walker cover similar ground: the resident has not yet had time to hit the edges of its range. Only over months does the random walker keep spreading while the resident stays put.
More simulations only sharpen the null distribution; they do not add information about the animal. This is the tracking duration versus occupation timescale problem — and exactly what the variogram in Session 6 diagnoses.
library(ctmm) and library(adehabitatHR) both load