ArticleslgStudy

science

Approximate entropy

Approximate entropy is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Approximate entropy rather than just read about it. In short: In statistics, an approximate entropy (ApEn) is a technique used to quantify the amount of regularity and the unpredictability of fluctuations over time-series data. For example, consider two series of data: Series A: (0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, ...), which alternates 0 and 1.

Approximate entropy — main illustration
Approximate entropy — illustration

Key takeaways

  • Approximate entropy belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Approximate entropy to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Approximate entropy from memory before moving on to harder problems.

Reference excerpt

In statistics, an approximate entropy (ApEn) is a technique used to quantify the amount of regularity and the unpredictability of fluctuations over time-series data. For example, consider two series of data:

Series A: (0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, ...), which alternates 0 and 1. Series B: (0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, ...), which have either a value of 0 or 1, chosen randomly, each with probability 1/2. Moment statistics, such as mean and variance, will not distinguish between these two series. Nor will rank order statistics distinguish between these series. Yet series A is perfectly regular: knowing a term has the value of 1 enables one to predict with certainty that the next term will have the value of 0. In contrast, series B is randomly valued: knowing a term has the value of 1 gives no insight into what value the next term will have. Regularity was originally measured by exact regularity statistics, which has mainly centered on various entropy measures. However, accurate entropy calculation requires vast amounts of data, and the results will be greatly influenced by system noise, therefore it is not practical to apply these methods to experimental data. ApEn was first proposed (under a different name) by Aviad Cohen and Itamar Procaccia, as an approximate algorithm to compute an exact regularity statistic, Kolmogorov–Sinai entropy, and later popularized by Steve M. Pincus. ApEn was initially used to analyze chaotic dynamics and medical data, such as heart rate, and later spread its applications in finance, physiology, human factors engineering, and climate sciences.

Algorithm A comprehensive step-by-step tutorial with an explanation of the theoretical foundations of Approximate Entropy is available. The algorithm is:

Step 1 Assume a time series of data u(1),u(2),…,u(N). These are N raw data values from measurements equally spaced in time. Step 2 Let m∈ℤ+ be a positive integer, with m≤N, which represents the length of a run of data (essentially a window).Let r∈ℝ+ be a positive real number, which specifies a filtering level.Let n=N−m+1. Step 3 Define 𝐱(i)=[u(i),u(i+1),…,u(i+m−1)] for each i where 1≤i≤n. In other words, 𝐱(i) is an m-dimensional vector that contains the run of data starting with u(i).Define the distance between two vectors 𝐱(i) and 𝐱(j) as the maximum of the distances between their respective components, given by d[𝐱(i),𝐱(j)]=maxk(|𝐱(i)k−𝐱(j)k|)=maxk(|u(i+k−1)−u(j+k−1)|) for 1≤k≤m. Step 4 Define a count Cim as Cim(r)=(number of j such that d[𝐱(i),𝐱(j)]≤r)n for each i where 1≤i,j≤n. Note that since j takes on all values between 1 and n, the match will be counted when j=i (i.e. when the test subsequence, 𝐱(j), is matched against itself, 𝐱(i)). Step 5 Define ϕm(r)=1n∑i=1nlog⁡(Cim(r)) where log is the natural logarithm, and for a fixed m, r, and n as set in Step 2. Step 6 Define approximate entropy (ApEn) as ApEn(m,r,N)(u)=ϕm(r)−ϕm+1(r) Parameter selection Typically, choose m=2 or m=3, whereas r depends greatly on the application. An implementation on Physionet, which is based on Pincus, use d[𝐱(i),𝐱(j)]<r instead of d[𝐱(i),𝐱(j)]≤r in Step 4. While a concern for artificially constructed examples, it is usually not a concern in practice.

Example

Consider a sequence of N=51 samples of heart rate equally spaced in time:

SN={85,80,89,85,80,89,…} Note the sequence is periodic with a period of 3. Let's choose m=2 and r=3 (the values of m and r can be varied without affecting the result). Form a sequence of vectors:

𝐱(1)=[u(1) u(2)]=[85 80]𝐱(2)=[u(2) u(3)]=[80 89]𝐱(3)=[u(3) u(4)]=[89 85]𝐱(4)=[u(4) u(5)]=[85 80] ⋮ Distance is calculated repeatedly as follows. In the first calculation,

d[𝐱(1),𝐱(1)]=maxk|𝐱(1)k−𝐱(1)k|=0 which is less than r. In the second calculation, note that |u(2)−u(3)|>|u(1)−u(2)|, so

d[𝐱(1),𝐱(2)]=maxk|𝐱(1)k−𝐱(2)k|=|u(2)−u(3)|=9 which is greater than r. Similarly,

d[𝐱(1),𝐱(3)]=|u(2)−u(4)|=5>rd[𝐱(1),𝐱(4)]=|u(1)−u(4)|=|u(2)−u(5)|=0<r⋮d[𝐱(1),𝐱(j)]=⋯⋮ The result is a total of 17 terms 𝐱(j) such that d[𝐱(1),𝐱(j)]≤r. These include 𝐱(1),𝐱(4),𝐱(7),…,𝐱(49). In these cases, Cim(r) is

C12(3)=1750 C22(3)=1750 C32(3)=1650 C42(3)=1750 ⋯ Note in Step 4, 1≤i≤n for 𝐱(i). So the terms 𝐱(j) such that d[𝐱(3),𝐱(j)]≤r include 𝐱(3),𝐱(6),𝐱(9),…,𝐱(48), and the total number is 16. At the end of these calculations, we have

ϕ2(3)=150∑i=150log⁡(Ci2(3))≈−1.0982 Then we repeat the above steps for m=3. First form a sequence of vectors:

𝐱(1)=[u(1) u(2) u(3)]=[85 80 89]𝐱(2)=[u(2) u(3) u(4)]=[80 89 85]𝐱(3)=[u(3) u(4) u(5)]=[89 85 80]𝐱(4)=[u(4) u(5) u(6)]=[85 80 89] ⋮ By calculating distances between vector 𝐱(i),𝐱(j),1≤i≤49, we find the vectors satisfying the filtering level have the following characteristic:

d[𝐱(i),𝐱(i+3)]=0<r Therefore,

C13(3)=1749 C23(3)=1649 C33(3)=1649 C43(3)=1749 ⋯ At the end of these calculations, we have

ϕ3(3)=149∑i=149log⁡(Ci3(3))≈−1.0982 Finally,

ApEn=ϕ2(3)−ϕ3(3)≈0.000010997 The value is very small, so it implies the sequence is regular and predictable, which is consistent with the observation.

Python implementation

MATLAB implementation Fast Approximate Entropy from MatLab Central approximateEntropy

Interpretation The presence of repetitive patterns of fluctuation in a time series renders it more predictable than a time series in which such patterns are absent. ApEn reflects the likelihood that similar patterns of observations will not be followed by additional similar observations. A time series containing many repetitive patterns has a relatively small ApEn; a less predictable process has a higher ApEn. In forecasting, approximate entropy has also been discussed as a diagnostic of the predictability or forecastability of time series.

Advantages The advantages of ApEn include:

Lower computational demand. ApEn can be designed to work for small data samples (N<50 points) and can be applied in real time. Less effect from noise. If data is noisy, the ApEn measure can be compared to the noise level in the data to determine what quality of true information may be present in the data.

Limitations The ApEn algorithm counts each sequence as matching itself to avoid the occurrence of log⁡(0) in the calculations. This step might introduce bias in ApEn, which causes ApEn to have two poor properties in practice:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Approximate entropy

Start with the simplest possible case. Write down what Approximate entropy claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Approximate entropy before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Approximate entropy ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Approximate entropy

In research
Approximate entropy appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Approximate entropy in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Approximate entropy is common in secondary-school and first-year university syllabi. It links to neighbouring topics Entropy and information, Time series, so understanding it makes those chapters shorter.
In everyday life
Look for Approximate entropy outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Approximate entropy” →

How to study Approximate entropy in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Approximate entropy means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Approximate entropy out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Approximate entropy in simple terms?

In statistics, an approximate entropy (ApEn) is a technique used to quantify the amount of regularity and the unpredictability of fluctuations over time-series data. For example, consider two series of data: Series A: (0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, ...), which alternates 0 and 1.

Why does Approximate entropy matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Approximate entropy?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Approximate entropy.

Tags

  • Entropy and information
  • Time series

Keep exploring