# Change detection

Yearly volume of the Nile river at Aswan, an example of time series data commonly used in change detection. Dotted line denotes a detected change point.[1]

In statistical analysis, change detection or change point detection tries to identify times when the probability distribution of a stochastic process or time series changes. In general the problem concerns both detecting whether or not a change has occurred, or whether several changes might have occurred, and identifying the times of any such changes.

Specific applications, like step detection and edge detection, may be concerned with changes in the mean, variance, correlation, or spectral density of the process. More generally change detection also includes the detection of anomalous behavior: anomaly detection.

## Introduction

A time series measures the progression of one or more quantities over time. For instance, the figure above shows the level of water in the Nile river between 1870 and 1970. Change point detection is concerned with identifying whether, and if so when, the behavior of the series changes significantly. In the Nile river example, the volume of water changes significantly after a dam was built in the river. Importantly, anomalous observations that differ from the ongoing behavior of the time series are not generally considered change points as long as the series returns to its previous behavior afterwards.

Mathematically, we can describe a time series as an ordered sequence of observations ${\displaystyle (x_{1},x_{2},\ldots )}$. We can write the joint distribution of a subset ${\displaystyle x_{a:b}=(x_{a},x_{a+1},\ldots ,x_{b})}$ of the time series as ${\displaystyle p(x_{a:b})}$. If the goal is to determine whether a change point occurred at a time ${\displaystyle \tau }$ in a finite time series of length ${\displaystyle T}$, then we really ask whether ${\displaystyle p(x_{1:\tau })}$ equals ${\displaystyle p(x_{\tau +1:T})}$. This problem can be generalized to the case of more than one change point.

The problem of change point detection can be narrowed down further into more specific problems. In offline change point detection it is assumed that a sequence of length ${\displaystyle T}$ is available and the goal is to identify whether any change point(s) occurred in the series. This is an example of post hoc analysis and is often approached using hypothesis testing methods. By contrast, online change point detection is concerned with detecting change points in an incoming data stream.

## Algorithms

### Online change detection

Using the sequential analysis ("online") approach, any change test must make a trade-off between these common metrics:

In a Bayes change-detection problem, a prior distribution is available for the change time.

Online change detection is also done using streaming algorithms.

### Offline change detection

Basseville (1993, Section 2.6) discusses offline change-in-mean detection with hypothesis testing based on the works of Page[2] and Picard[3] and maximum-likelihood estimation of the change time, related to two-phase regression. Other approaches employ clustering based on maximum likelihood estimation,[citation needed], use optimization to infer the number and times of changes,[4] or via spectral analysis.[5]

"Offline" approaches cannot be used on streaming data because they need to compare to statistics of the complete time series, and cannot react to changes in real-time but often provide a more accurate estimation of the change time and magnitude.

## Applications of change detection

Change detection tests are often used in manufacturing (quality control), intrusion detection, spam filtering, website tracking, and medical diagnostics.

### Linguistic change detection

Linguistic change detection refers to the ability to detect word-level changes across multiple presentations of the same sentence. Researchers have found that the amount of semantic overlap (i.e., relatedness) between the changed word and the new word influences the ease with which such a detection is made (Sturt, Sanford, Stewart, & Dawydiak, 2004). Additional research has found that focussing one's attention to the word that will be changed during the initial reading of the original sentence can improve detection. This was shown using italicized text to focus attention, whereby the word that will be changing is italicized in the original sentence (Sanford, Sanford, Molle, & Emmott, 2006), as well as using clefting constructions such as "It was the tree that needed water." (Kennette, Wurm, & Van Havermaet, 2010). These change-detection phenomena appear to be robust, even occurring cross-linguistically when bilinguals read the original sentence in their native language and the changed sentence in their second language (Kennette, Wurm & Van Havermaet, 2010). Recently, researchers have detected word-level changes in semantics across time by computationally analyzing temporal corpora (for example:the word "gay" has acquired a new meaning over time) using change point detection.[6]