AI Glossary / Statistics and probability / Intermediate

Approximate entropy

Definition

Approximate entropy (ApEn) is a statistic that describes the regularity of a finite sequence by comparing the frequency of similar patterns with the frequency of similar patterns one observation longer. Its value depends on pattern length, matching tolerance and data length. It is a measure of sequential irregularity under specified settings, not a universal score of intelligence, health or complexity.

What it means

Two signals can have the same average and variability while arranging their observations differently over time. ApEn looks for repeating local patterns and asks how consistently those patterns continue. Relatively predictable continuation generally produces a lower value under comparable conditions. Less consistent continuation generally produces a higher value. Noise can increase apparent irregularity, so a larger number does not automatically indicate a richer or better-functioning system. Meaningful comparisons require attention to how the observations were measured and processed.

How it works

Choose a pattern length m and a nonnegative tolerance r. Form overlapping vectors of m successive observations. Two vectors match when their largest coordinate difference is within r under the chosen convention. For each vector, calculate the fraction of all available vectors that match it, including itself. Average the natural logarithms of these fractions to obtain Phi(m). Repeat with vectors of length m + 1. The usual finite-sample statistic is ApEn = Phi(m) - Phi(m + 1). Including self-matches prevents zero matching fractions but introduces finite-sample effects. Record the exact implementation, including boundary rules and whether r is absolute or scaled by a measure such as standard deviation.

Three practical examples

  • Sensor monitoring: compare regularity in equal-length vibration windows collected at a consistent sampling rate, while separately investigating changes in sensor noise.
  • Physiological research: study patterns in measured heartbeat intervals with a documented protocol, without treating ApEn alone as a clinical diagnosis.
  • AI feature engineering: include a regularity feature in a time-series model and test whether it adds predictive information beyond simpler variability measures on held-out data.

Think of it this way

Think of listening to repeated musical phrases and noticing whether the next note usually follows the same pattern. ApEn measures a numerical version of local continuation consistency. It does not judge whether the music is meaningful, and random static can sound less predictable than a sophisticated composition.

Worked example

Use the deliberately tiny sequence 0, 0, 1, 1, 0, with m = 1 and r = 0.1. Matching means equality here because the two values differ by one. There are five single-value templates. Each zero matches three templates, and each one matches two. Therefore Phi(1) = (3/5) ln(3/5) + (2/5) ln(2/5), approximately -0.673012. The four length-two templates are 00, 01, 11 and 10. Each matches only itself, giving Phi(2) = ln(1/4), approximately -1.386294. ApEn is therefore about 0.713283 using natural logarithms. For five identical zeros, every template matches every other template at both lengths; both logarithmic averages are zero and ApEn is zero. These calculations demonstrate the convention, not a reliable way to compare real systems using five observations. The distinct numbers of templates at the two lengths matter.

Illustrative case study

Fictional case: Baymill Maintenance adds ApEn to a machine-monitoring dashboard. A new sensor initially produces higher values, leading analysts to suspect mechanical deterioration. They discover that the replacement sensor uses a different filtering setting. The team standardizes acquisition, compares equal-length windows and checks the feature against independently labeled inspection outcomes. Engineers retain conventional vibration measures alongside ApEn. No maintenance decision is triggered solely by the entropy value. This fictional case illustrates how measurement changes can mimic behavioral changes; it makes no claim of demonstrated fault-detection performance.

Common misconceptions and mistakes

ApEn is not identical to sample entropy: the treatment of self-matches and the way matches are aggregated differ. It is not simply Shannon entropy of the distribution of individual amplitudes, because ordering enters through patterns. Values obtained with different m, r, window lengths or preprocessing should not be casually ranked. Short records and self-matching can distort comparisons, and finite-sample values need not obey every intuition associated with theoretical entropy. Detrending or normalizing can also remove information that matters to the task. A high value is neither proof of chaos nor evidence that a model is producing useful novelty.

Business use

Businesses can use ApEn as one descriptive feature for monitored processes, provided its interpretation is validated for the application. Establish a reproducible windowing procedure, handle missing observations explicitly and document any resampling. Evaluate sensitivity to parameters before choosing operational thresholds. When used in a predictive model, keep preprocessing fitted within the training workflow and assess performance on genuinely later or independent observations. Explain the feature as a measure of pattern regularity rather than a general reliability score.

People also ask

Is a higher value always better?

No. Increased noise or disrupted control can also increase irregularity.

Why does the algorithm allow a pattern to match itself?

This is part of the original ApEn construction and keeps matching fractions positive, but it affects finite-sample behavior.

Can values from different sampling rates be compared directly?

Usually not without considering how sampling changes the patterns and timescales being measured.

Check your understanding

Q: Why is the worked example's Phi(2) based on four templates rather than five?

Answer: A: A five-observation sequence contains only four complete overlapping pairs. Counting a fifth pair would invent an additional observation or impose an unstated wraparound convention.

Related terms

  • Time series
  • sample entropy
  • multiscale entropy
  • embedding dimension
  • matching tolerance
  • signal preprocessing
  • autocorrelation and noise
  • calculation choices and alternative explanations for changing regularity

Learn next

reproduce the toy calculation with explicit template lists. Then compare a repeated sequence and a shuffled version using equal record lengths. Vary m and r systematically, and investigate sample entropy before deciding which regularity feature suits an applied problem.

More in Statistics and probability

  • Antithetic variates - Antithetic variates are a Monte Carlo variance-reduction technique that pairs simulated outputs with deliberately related counterparts.
  • Appearance model - An appearance model is a representation of how an object, region or scene looks in images and how that visual evidence can vary.
  • Approximate Bayesian computation - Approximate Bayesian computation (ABC) is a family of methods for learning about model parameters by comparing simulated data with observations when...
  • Arc standard - Arc standard, usually written arc-standard, is a transition system for building dependency parses of sentences.
  • Area sampling - Area sampling is survey sampling in which geographical areas serve as sampling units at one or more stages.
  • Area sampling frame - An area sampling frame is an organized representation of geographical sampling units from which a survey sample can be selected.

Sources

Sources: Pincus, “Approximate entropy as a measure of system complexity”: https://pmc.ncbi.nlm.nih.gov/articles/PMC51218/ ; Richman and Moorman, “Physiological time-series analysis using approximate entropy and sample entropy”: https://journals.physiology.org/doi/10.1152/ajpheart.2000.278.6.H2039 ; PhysioNet, sample entropy implementation and methodological references: https://physionet.org/content/sampen/1.0.0/ .

Previous: Approximate Bayesian computation Next: Approximate inference

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer