Every measure so far asks how much the intervals vary. The nonlinear measures ask how the variation is organised: whether a long run of beats repeats its short runs ( sample entropy Sample entropy How unpredictable the heartbeat series is: minus the log of the chance that runs of beats that match also match one beat longer. Near 0 is a repeating pattern; 2 or more is close to random. More about Sample entropy ) and whether its fluctuations look the same at every scale ( detrended fluctuation analysis DFA α1 The short-term scaling exponent of detrended fluctuation analysis. Near 1 the beats have memory at every scale; near 0.5 they behave like noise. α2 is the same slope over longer stretches. More about DFA α1 ). They see something the others cannot, order, and this lesson works both out on the teaching recording before weighing what they have added in practice.
The shuffle test
Take the teaching recording’s 341 intervals and shuffle them into a random order. The histogram is unchanged, so the mean is unchanged and SDNN SDNN The standard deviation of all NN intervals in a recording, in milliseconds. It measures overall variability, and its value depends strongly on how long the recording lasts. More about SDNN is unchanged: 28.7 ms before, 28.7 ms after. Everything built on neighbours moves. RMSSD RMSSD Root mean square of successive differences: an HRV metric built from how much each heartbeat interval differs from the next, in milliseconds. It mainly reflects vagal activity. More about RMSSD goes from 33.4 ms to 39.6 ms, because the smooth breathing swing has been broken into random jumps. Sample entropy goes from 1.67 to 2.22: the series has become less predictable.
That is the whole case for the nonlinear measures in one experiment. Variability has an amount and a structure. SDNN and the band powers measure the amount. Entropy and DFA measure the structure. You can try a hand-sized version below: retype the ten beats in any other order and watch what RMSSD does, knowing the mean and SDNN cannot move.
RMSSD step by step
Ten beats, every number shown
RMSSD of these 10 intervals is 26.9 ms.
Step 5 of 5
Step 1 of 5 Start with the intervals
Beat 1 880 ms Beat 2 826 ms Beat 3 812 ms Beat 4 823 ms Beat 5 848 ms Beat 6 877 ms Beat 7 880 ms Beat 8 866 ms Beat 9 828 ms Beat 10 815 ms 10 intervals between 11 beats, in milliseconds.
Step 2 of 5 Subtract each interval from the next
Beat 2 − beat 1 −54 ms Beat 3 − beat 2 −14 ms Beat 4 − beat 3 +11 ms Beat 5 − beat 4 +25 ms Beat 6 − beat 5 +29 ms Beat 7 − beat 6 +3 ms Beat 8 − beat 7 −14 ms Beat 9 − beat 8 −38 ms Beat 10 − beat 9 −13 ms Plus means the heart slowed down for a beat; minus means it sped up.
Step 3 of 5 Square each difference
Difference 1 2916 Difference 2 196 Difference 3 121 Difference 4 625 Difference 5 841 Difference 6 9 Difference 7 196 Difference 8 1444 Difference 9 169 Sum 6517 Squaring makes every value positive and gives big changes more weight.
Step 4 of 5 Average the squares
6517 ÷ 9 724.11 Step 5 of 5 Take the square root
√724.11 26.9 ms RMSSD 26.9 ms
With JavaScript on, the steps show one at a time and the beats can be changed.
A row of ten editable heartbeat intervals in milliseconds, then the calculation of RMSSD as numbered steps: start with the intervals; subtract each interval from the next; square each difference; average the squares; take the square root. The final step reads RMSSD 26.9 ms. Back and Next buttons move between the steps.
Sample entropy: how predictable is the next beat?
Sample entropy asks a plain question. Take every run of consecutive intervals (Kubios and most papers use ). Call two runs a match when every pair of corresponding intervals differs by less than a tolerance , usually 0.2 times the standard deviation of the series, which on the recording is 5.7 ms. Count the matching pairs of runs, . Now extend each run by one beat, to , and count how many of those pairs still match, . Sample entropy is
Read it as: minus the log of the chance that two runs which have matched for two beats go on matching for a third. If the series repeats itself, most matches continue, is near 1 and SampEn is near 0. If the next beat is anyone’s guess, few matches continue and SampEn climbs above 2. The recording’s SampEn is 1.67; shuffled, 2.22.
Richman and Moorman (2000) defined it to fix a flaw in its predecessor, approximate entropy Approximate entropy The older cousin of sample entropy, with no unit: a regularity measure that counts each run of beats as matching itself, which biases it towards low values on short recordings. More about Approximate entropy (ApEn), which Pincus (1991) introduced: ApEn counts each run as matching itself, which biases it towards regularity, most of all on short series, and makes it inconsistent as the tolerance changes. SampEn excludes self-matches. Their abstract reports that SampEn “agreed with theory much more closely than ApEn over a broad range of conditions”. On the recording ApEn is 1.02, lower than SampEn, as the bias predicts. Kubios reports both with and SD by default and computes them on the detrended series (Kubios HRV User’s Guide, 2021).
Two cautions. The entropies compare every run with every other, so short recordings give unstable values. Pincus (1991) suggested ApEn needs about 1000 values; Shaffer and Ginsberg (2017) note that SampEn can be computed from fewer than 200, but in the ultra-short study they review, SampEn needed 3 minutes to track the 5-minute value. This site’s calculator waits for 200 beats. And scales with the standard deviation, so a change in SDNN changes the yardstick: a series can score the same entropy at a different amount of variability, which is the point, and also a trap when comparing people.
How predictable is the next beat?
Five minutes of the teaching recording
- SampEn
- 1.67
- ApEn
- 1.02
- Tolerance r
- 5.7 ms
- m matches
- 13
- m+1 matches
- 1
Rested, m = 2, r = 0.20 × SD = 5.7 ms. The highlighted run of 2 beats matches 13 other runs within 5.7 ms; 1 of them still matches when both runs are one beat longer. Counted over every run in the recording, sample entropy is 1.67: the breathing rhythm makes the next beat partly predictable.
The controls work when JavaScript is on.
A line chart of 64 heartbeat intervals in order. A highlighted box marks a template run of m beats with a tolerance band of plus or minus r milliseconds around each of its beats; lighter boxes mark other runs of m beats that match the template within the band, and darker boxes those that still match when both runs are one beat longer. Readouts give sample entropy, approximate entropy, the tolerance in milliseconds, and the two match counts, followed by a sentence explaining them. Two sliders set m (1 to 4 beats) and r (0.1 to 0.6 times the standard deviation); three buttons choose a periodic series, the rested recording or random beats.
Detrended fluctuation analysis: does the pattern repeat at every scale?
Peng and colleagues (1995) introduced DFA to test whether heartbeat fluctuations have long-range correlations, the property that a run of long intervals now makes a run of long intervals more likely hundreds of beats later. The method:
- Subtract the mean from every interval and add the results up as you go, giving a running total . A random series gives a random walk; a correlated one gives something smoother.
- Cut into boxes of beats. Fit a straight line in each box and subtract it; this is the detrending Detrending Removing the slow drift from a series of beat intervals before a spectrum is calculated, so the drift does not pile up as false power in the lowest frequencies. More about Detrending .
- Measure the root-mean-square of what is left, .
- Repeat for many box sizes and plot against . The slope is .
Read it as: how much the running total wanders away from its local trend, in boxes of beats, and how fast that wandering grows as the boxes grow. Peng’s team found the slope changes at about 16 beats, so two slopes are reported: α1 over short boxes and α2 over longer ones. The box ranges vary. This site’s library uses 4 to 16 and 16 to 64 beats, as do Quigley and colleagues (2024) and Rogers and colleagues (2021); Kubios HRV 3.5 defaults to 4 to 12 and 13 to 64 (Kubios HRV User’s Guide, 2021); and the ESC and EHRA position paper notes that many clinical studies took α1 over 4 to about 11 beats.
The benchmarks are exact. White noise, intervals independent of each other, gives α = 0.5. A random walk, each interval the last plus a random step, gives 1.5. Between them, at α = 1.0, lies 1/f noise, the scale-free pattern in which short and long fluctuations are balanced, and that is where a healthy resting heart usually sits (Peng and colleagues, 1995). In Peng’s data, severe heart failure broke this long-range pattern down.
The recording gives α1 = 0.49 and α2 = 0.65. That α1 is a confession. The teaching recording is three sine waves plus white noise; the sines repeat at fixed periods and the noise is independent beat to beat, so there is no fractal structure for DFA to find, and the short-range slope lands near the white-noise value. A real five-minute resting recording from a healthy adult usually gives α1 near 1. This is one more thing the nonlinear measures can see that SDNN cannot: the recording is synthetic, and α1 says so.
Lengths matter more here than anywhere else. α2 needs boxes of 64 beats and several of them, so Quigley and colleagues (2024) put the minimum for fractal measures at 20 minutes; this site’s calculator reports α2 only from 20 minutes and refuses it below 256 beats. α1 is cheaper: in the ultra-short study Shaffer and Ginsberg (2017) review, 2 minutes of beats gave an α1 that tracked the 5-minute value, and a 2-minute window is what makes the exercise application possible.
Does the rhythm remember?
Five minutes of the teaching recording
- α1 (4–16 beats)
- 0.49
- α2 (16–64 beats)
- 0.65
The rested recording is synthetic: a clean breathing wave every four beats with random noise between beats, so over 4 to 16 beats it looks almost like noise (α1 0.49), and the slower waves give 16 to 64 beats some memory (α2 0.65). Real recordings at rest usually give an α1 of about 1 or higher.
The controls work when JavaScript is on.
A log–log chart of fluctuation against box size from 4 to 64 beats, with dots for each box size and two fitted lines: one over 4 to 16 beats for α1, one over 16 to 64 beats for α2. Readouts give α1 and α2, followed by a sentence explaining them. Four buttons choose the rested recording, white noise, 1/f noise or the recording with ectopic beats; a slider mixes white noise into the chosen series.
What they have added in practice
During exercise. As effort rises, the beat series loses its fractal order and α1 falls from about 1.0 towards 0.5 and below. Rogers and colleagues (2021) proposed α1 = 0.75, the midpoint, as a marker of the first ventilatory threshold, the top of easy aerobic effort. In 15 men on an incremental treadmill test, with α1 computed over a rolling 2-minute window after Kubios automatic correction (0 to 3% artifacts Artifact An error in a heartbeat recording, such as a missed, extra or mistimed beat, often caused by movement or poor sensor contact. Artifacts can badly distort HRV numbers. More about Artifact ), the heart rate at α1 = 0.75 matched the gas-exchange threshold with a mean difference of about 2 beats a minute and limits of agreement from −12 to +8 beats a minute. That is the basis of the “DFA α1” readouts in some training apps. The study is small, male and treadmill-based, and its authors say so; two of the 17 volunteers were excluded because frequent ectopic beats Ectopic beat A heartbeat that starts outside the heart's normal pacemaker and usually comes early. Ectopic beats are common, but they distort HRV unless removed or corrected. More about Ectopic beat made their α1 curves uninterpretable.
After a heart attack. The ESC and EHRA position paper (Sassi and colleagues, 2015) reviews cohorts in which a low α1, with cutoffs such as below 0.65 or 0.75, predicted death after myocardial infarction, and notes that α1 correlates strongly with the Poincaré ratio SD1/SD2 SD1 and SD2 Two measures of the spread of dots in a Poincaré plot, in milliseconds. SD1 is the width and tracks short-term variability, like RMSSD; SD2 is the length and tracks overall variability. More about SD1 and SD2 (r = −0.92 in one group of older adults). In heart failure its advantage over clinical prediction was, in their words, “at best modest”. For entropy the evidence was thinner: ApEn and SampEn fell during sympathetic Sympathetic nervous system The "fight or flight" branch of the autonomic nervous system. It speeds up the heart and makes it pump harder, but it acts too slowly to drive beat-to-beat HRV. More about Sympathetic nervous system activation on a tilt table, ApEn fell before episodes of atrial fibrillation, and SampEn predicted sepsis in premature infants.
The verdict. The position paper’s conclusion is that the new methods have improved the technical understanding of HRV but have had “rather limited” success as clinical tools, that they do not substitute for the traditional measures, and that traditional time- and frequency-domain analysis remains “the methods of choice” for assessing autonomic physiology. It recommends using them alongside the 1996 measures, not instead, and withholding them from clinical risk studies until prospective comparisons are done. Shaffer and Ginsberg (2017) add a caution from the other direction: higher nonlinear HRV has predicted mortality after infarction in some cohorts, so a higher value is not automatically healthier.
Reading a nonlinear number on a device
Ask three questions. Which measure, with which settings: , , the box sizes, detrended or not? How long was the recording: α2 and the entropies from a 1-minute reading are not meaningful, whatever the app shows. And how clean: one ectopic beat spoils a DFA fit far more than it spoils SDNN, which is why Rogers excluded participants with frequent ectopy rather than correcting it.
Lesson 20 turns from computing numbers to reading the studies and device tests that use them.