Detrended fluctuation analysis

In stochastic processes, chaos theory and time series analysis, detrended fluctuation analysis (DFA) is a method for determining the statistical self-affinity of a signal.

It is useful for analysing time series that appear to be long-memory processes (diverging correlation time, e.g. power-law decaying autocorrelation function) or 1/f noise.

The obtained exponent is similar to the Hurst exponent, except that DFA may also be applied to signals whose underlying statistics (such as mean and variance) or dynamics are non-stationary (changing with time).

It is related to measures based upon spectral techniques such as autocorrelation and Fourier transform.

Peng et al. introduced DFA in 1994 in a paper that has been cited over 3,000 times as of 2022[1] and represents an extension of the (ordinary) fluctuation analysis (FA), which is affected by non-stationarities.

Systematic studies of the advantages and limitations of the DFA method were performed by PCh Ivanov et al. in a series of papers focusing on the effects of different types of nonstationarities in real-world signals: (1) types of trends;[2] (2) random outliers/spikes, noisy segments, signals composed of parts with different correlation;[3] (3) nonlinear filters;[4] (4) missing data;[5] (5) signal coarse-graining procedures [6] and comparing DFA performance with moving average techniques [7] (cumulative citations > 4,000).

Datasets generated to test DFA are available on PhysioNet.

This is the cumulative sum, or profile, of the original time series.

white noise is a standard random walk.

, and the sequence is roughly distributed evenly in log-scale:

Within each segment, compute the least squares straight-line fit (the local trend).

on the log-log plot indicates a statistical self-affinity of form

is a generalization of the Hurst exponent, with the precise value giving information about the series self-correlations: Because the expected displacement in an uncorrelated random walk of length N grows like

would correspond to uncorrelated white noise.

When the exponent is between 0 and 1, the result is fractional Gaussian noise.

Though the DFA algorithm always produces a positive number

Self-similarity requires the log-log graph to be sufficiently linear over a wide range of

Furthermore, a combination of techniques including maximum likelihood estimation (MLE), rather than least-squares has been shown to better approximate the scaling, or power-law, exponent.

[13] Also, there are many scaling exponent-like quantities that can be measured for a self-similar time series, including the divider dimension and Hurst exponent.

The standard DFA algorithm given above removes a linear trend in each segment.

If we remove a degree-n polynomial trend in each segment, it is called DFAn, or higher order DFA.

(visible as short sections of "flat plateaus").

In this regard, DFA1 removes the mean from segments of the time series

For example, DFA1 removes linear trends from segments of the time series

before quantifying the fluctuation, DFA1 removes parabolic trends from

The Hurst R/S analysis removes constant trends in the original sequence and thus, in its detrending it is equivalent to DFA1.

[15][16][17] The DFA method has been applied to many systems, e.g. DNA sequences;[18][19] heartbeat dynamics in sleep and wake,[20]  sleep stages,[21][22] rest and exercise,[23] and across circadian phases;[24][25] locomotor gate and wrist dynamics, [26][27][28][29] neuronal oscillations,[17] speech pathology detection,[30] and animal behavior pattern analysis.

In addition the power spectrum decays as

The relation of DFA to the power spectrum method has been well studied.

[16] In this context, FBM is the cumulative sum or the integral of FGN, thus, the exponents of their power spectra differ by 2.

DFA on a Brownian motion process, with increasing values of .