A Second Order Cumulant Spectrum Test That a Stochastic Process is Strictly Stationary and a Step Toward a Test for Graph Signal Strict Stationarity
Abstract
This article develops a statistical test for the null hypothesis of strict stationarity of a discrete time stochastic process in the frequency domain.
When the null hypothesis is true, the second order cumulant spectrum is zero at all the discrete Fourier frequency pairs in the principal domain.
The test uses a window averaged sample estimate of the second order cumulant spectrum to build a test statistic with an asymptotic complex standard normal distribution.
We derive the test statistic, study the properties of the test and demonstrate its application using 137Cs gamma ray decay data.
Future areas of research include testing for strict stationarity of graph signals, with applications in learning convolutional neural networks on graphs, denoising, and inpainting.
Introduction and related work
A stochastic process { x ( t ) } , t = 0 ..T , is called strictly stationary when the entire family of its ﬁnite dimensional distribution presents invariance under a common translation in the time structure [1].
The concept of stationarity of a time series plays a signiﬁcant role in time series analysis and its applications, and is an assumption for building time series forecasting models and drawing the correct inferences (for example ﬁnancial returns prediction, demand forecasting, human activity prediction).
One can obtain meaningful sample statistics of the time series (mean, variances, correlations with other variables) that can be useful descriptors of future behavior only if the time series is approximately stationary.
There are two paradigms for analyzing time series: the time domain and the frequency domain.
In the time domain, one considers the observed data directly and typically makes conjectures about its moments.
In the frequency domain, one decomposes the time series into underlying frequencies and makes conjectures about spectra and cumulant spectra.
This paper operates in the frequency domain and presents a novel statistical time series method based on the second order cumulant spectrum to test the hypothesis that an observed discrete stochastic process { x ( t n ) } , t n = nτ , with sampling rate τ , is strictly stationary.
The classical idea of time series stationarity has been extended to the graph signal processing (GSP) domain and we aim to extend our test to GSP as well.
One potential application is for learning convolutional neural networks (CNN) in high-dimensional irregular domains such as social networks, brain connectomes, log data on telecommunication networks, gene data on biological regulatory networks, or word embeddings represented by graphs as in [2].
The intention is to generalize CNNs ability to learn local, stationary and compositional features from low-dimensional regular grids, where image, video and speech are represented, to irregular structures represented by graphs [2].
The major bottleneck of generalizing CNNs to graphs is the deﬁnition of localized graph ﬁlters which can be learnt [2].
Graph signal processing domain can lend mathematical tools such as spectral graph theory to handle the challenge.
Certain local properties such as smoothness and local stationarity are tied to effective learning on graphs.
The domain of graph signal processing generally provides tools for modeling data deﬁned on irregular grids [3].
As another example of graph stationarity application, [4] leverage the idea of stationary graph signals to derive Wiener-type estimation procedures of noisy and partially observed signals that can be used for denoising and inpainting.
They show how stationarity improves over classical graph models and Gaussian MAP estimators [4].
We develop a test for strict stationarity based on the second order cumulant spectrum
[Equation]
deﬁned for the Fourier frequencies {− f 0 ≤ f 1 ≤ f 0 , − f 0 ≤ f 2 ≤ f 0 } , where f 0 = 1 / (2 τ ) .
For simpliﬁcation we will refer to the test employing the cumulant spectrum as Cum2 for the remainder of this article.
The Cum2 test is different from tests for structural change of a linear time series model, such as CUSUM charts ([6] gives a review).
The Cum2 test is able to detect changes due to several types of violations of the null hypothesis of strict stationarity.
Tests of a unit root with or without drift against an alternative hypothesis of trend stationarity, can be found, for example, in [7] and [8].
In [9] the authors derived a test of second order stationarity based on the correlation of discrete Fourier transforms.
A time series is called second-order stationary, weakly stationary or stationary in the wide-sense [1] if E { x ( t m ) } is constant and its autocovariance c x ( t m ) depends only on the difference ( t n + m − t n ) , c x ( t m ) =
c x ( t n + m − t n ) .
A strictly stationary series with ﬁnite second order moments is second-order stationary [1].
Hence our test is more general than the test proposed in [9].
Furthermore, our test has different power from Hinich-Wild [10] test of strict stationarity using the signal coherence method.
The Hinich-Wild test has power against the alternative of a randomly modulated periodic process.
Our test has more general power and is not limited to such an alternative.
Cum2 is also different from the spectral correlation detection in test in [11].
Since the space of non strictly stationary processes is vast it is difﬁcult to specify the full range of alternatives.
We present the test development in Section 2, evaluate the test empirical size and power on synthetic data in Section 3, demonstrate its application in Section 4 and conclude in Section 5.
The Cum2 test for strict stationarity
In Equation 1 the cumulant spectrum K is deﬁned for frequency values in the square {− f 0 ≤ f 1 ≤ f 0 , − f 0 ≤ f 2 ≤ f 0 } , where f 0 = 1 / (2 τ ) is the Nyquist frequency.
Because of Fourier frequencies symmetries [12], we focus the study of the second order cumulant spectrum for the set of fundamental frequencies in the principal domain only, namely the triangle { 0 < f 1 ≤ f 0 , − f 1 < f 2 ≤ f 1 } .
From [5], if the time series { x ( t ) } is strictly stationary then the second order cumulant spectrum for a pair of frequencies in the principal domain
[Equation]
where X ( f i ) denote the discrete Fourier transform.
In Equation 2, K ( f 1 , − f 1 ) = δ ( f 1 ) S ( f 1 ) , where δ ( f 1 ) is the Dirac delta function, and S ( f 1 ) =
(cid:80) ∞ m = −∞ c x ( t m ) exp ( − i 2 πf 1 t m ) is the spectrum at frequency f 1 and c x ( t m ) is the autocovariance of the process.
In Equation 2, X ( f i ) are the discrete Fourier transforms at fundamental frequencies in the principal domain.
In summary, if a time series is strictly stationary, then its second order cumulant spectrum K ( f 1 , f 2 )
=
for all frequency pairs ( f 1 , f 2 ) in the principal domain [5].
We now use the properties of the second order cumulant spectrum to construct the test for the null hypothesis that a stochastic process { x ( t n ) } is strictly stationary.
We assume that the time series has been demeaned, detrended, prewhitened and trimmed, as is typical in frequency domain applications.
The test uses frame averaged cumulant spectra at fundamental frequency pairs and has an asymptotic complex normal distribution.
To get frame averaged estimates for the cumulant spectrum K ( f 1 , f 2 ) and for the spectrum S ( f ) , where ( f 1 , f 2 ) are frequencies in the principal domain, we use the windowing trick: partition the time series into frames of equal length, calculate the cumulant spectrum and the spectrum for each frame and then get averages of spectral quantities of interest.
A time series of length T is partitioned into P =
[ T/L ] complete non overlapping frames of length L .
We omit the last frame if it has less than L observations.
Then the frame averaged cumulant spectrum estimate is ˆ K ( f 1 , f 2 )
= 1 P (cid:80) Pp =1 K p ( f 1 , f 2 ) .
For computational simplicity, we express the fundamental frequencies as f = k/L , with 0 < k 1 ≤
L/ 2 , − k 1 ≤ k 2 ≤ k 1 .
We similarly estimate the window averaged spectrum, ˆ S ( f k ) .
From the theory in [5] and [1], if L and P are sufﬁciently large, the expected value of the frame averaged spectrum is equal to its theoretical value up to O
( L − 1 ) , E (cid:104) ˆ S
f k ) (cid:105) =
S ( f k ) + O (cid:0) L − 1 (cid:1) .
Similarly, under strict stationarity, from [5], E (cid:104) ˆ K ( k 1 , k 2 ) (cid:105) =
K ( k 1 , k 2 ) + O (cid:0) L − 1 (cid:1) .
Furthermore, the variance of ˆ K , considering P frames, is equal to P − 1 S ( k 1 ) S ( k 2 ) as ( L, P → ∞ ) from [5].
We deﬁne the normalized second order cumulant spectrum as ˆΓ ( k 1 , k 2 )
=
ˆ K ( k 1 ,k 2 ) (cid:113)
S ( f k 1 ) S ( f k 2 ) .
This normalization is similar to the normalization of the bispectrum to yield the skewness function.
We make a further simplifying assumption used in [13] that the time series has been prewhitened, hence the theoretical spectrum S is assumed constant across frequencies and, without loss of generality, equal to one.
With this assumption, the standard error of ˆ K becomes 1 / √ P .
Then the estimate for Γ , ˆΓ simpliﬁes to √ P ˆ K .
We now construct the complex valued Cum2 test statistic quantity Y as
Y ( k 1 , k 2 ) = √ 2 P (cid:104) ˆΓ ( k 1 , k 2 ) − Γ ( k 1 , k 2 ) (cid:105) .
Assuming P → ∞ , from the central limit theorem, the real and imaginary parts of Y ( k 1 , k 2 ) are asymptotically independent Gaussian variates with zero means and unit variances as ( L, P → ∞ ) if the process is strictly stationary.
The KolmogorovSmirnov (KS) one sample test is a straightforward way to test the null hypothesis that the random variables (cid:60) ( Y ( k 1 , k 2 )) and (cid:61) ( Y ( k 1 , k 2 )) follow a standard normal distribution.
Let F emp ( x ) denote the empirical cumulative distribution of (cid:60) ( Y ) , and (cid:61) ( Y ) respectively.
We calculate F emp ( x ) as the fraction of values that are less than a given value x in the unit interval.
In our case the vector x represent the real and imaginary parts for the Cum2 test statistic and the cumulative distribution of interest is that of a standard normal variable.
We are working to extend the Cum2 theory to graph signal processing.
In [14], Girault et.
al introduce the concept of local estimate of the graph power spectrum and its use as an estimate for the global spectrum.
We draw the analogy to the window averaged estimate of the spectrum used as a building block in Cum2 test.
In [14] a window on the graph is deﬁned as a L-hop neighborhood, with a span L .
Let’s consider P graph windows of span L and deﬁne for Laplacian eigenvalues k 1 and kthe window averaged second order cumulant spectrum as E [ GFTX k 1 ∗ GFTX k 2 ] where GFTX k are the graph Fourier transform (GFT) components under the isometric translation operator from [15] for eigenvalues k .
Then a GFT Cum2 test statistic may be deﬁned as a normalized graph window averaged cumulant spectrum.
The formal deﬁnitions of graph higher order cumulants, test statistic, windowing technique, test properties and asymptotic distribution are still to be formulated but we believe this to be a step toward a formal test statistic for graph stationarity, which, to our best knowledge, does not exist just yet.
Empirical evaluation of the Cum2 test size and power
Next we evaluate the size and power of the test on synthetic data as the percentage samples out of 10,000 generated samples where the test rejects stationarity.
We expect to see empirical test size close to the ground truth test size and large power.
An R package [16] to implement Cum2 and calculate a p value is available in supplementary materials.
We ﬁrst generate strictly stationary data (white noise) in order to evaluate the empirical size of Cum2.
At 5 percent ground truth size of test, the empirical size of test for different sample sizes T are 0.062 for T = 250 , 0.063 for T = 1000 and 0.059 for T = 5000 .
Next we evaluate the empirical power of the test.
There are many alternatives of non stationarity that can be speciﬁed for Cum2.
We restrict our attention to alternatives of unit root and varying second moment.
We ﬁrst generate data x ( t ) = λy ( t ) + u ( t ) to include a unit root component y ( t )
= (cid:80) tj =1 v ( j ) and a white noise stationary component u ( t ) .
The test rejects the null of strict stationarity with power of 0.080 for T = 250 , 0.420 for T = 1000 and 0.997 for T =respectively.
We then generate synthetic data with a varying second moment, x ( t ) =
σ t u ( t ) , where u ( t ) is white noise and σ 2 t is the variance. The variance is one under the null of stationarity and follows a piecewise linear trend under alternative, such that σ 2 t = [-(cid:27) 
-]σ 02 + (cid:0) σ 12 − σ 02 (cid:1) ( t − m ) (1 − m ) − 1 for t ≥ m and σ 02 for t < m , with [-(cid:27) 
-]σ 0 = 1 and σ 1 = dσ 0 .
Table 1 illustrates the power of the test to detect piecewise linear trend in second moment (increase if d = 4 and decrease if d = 0 . 25 ) that starts at different points in the sample (half way if m = 0 . 5 and late if m = 0 .
9 ), for different sample sizes, T = { 250 , 1000 , 5000 } , and at ﬁve percent ground truth size of the test.
[Table]
Gamma ray decay application
We applied the test to a dataset of measurements of 137Cs gamma ray decay.
The data were collected using a 137Cs source and a NaI detector in a Pb shielding enclosure to minimize the background contribution.
The NaI detector produces a light pulse which is proportional to the amount of energy that the gamma ray deposits in the detector.
For each light pulse the total light output is measured using a photomultiplier and a multichannel analyzer which bins the outputs into discrete bins depending on the light output.
The time between consecutive events was computed, resulting in a series of 999, inter-arrival times.
The laws of physics predict that the pulse sequence is a stationary Poisson process and thus the inter-arrival time sequence is a stationary random process.
The Cum2 test p-value is 0.26 for a frame length of L = 200 , failing to reject the null hypothesis that the process is strictly stationary, as expected.
Conclusion
In this article we used the frame averaged estimates of the second order cumulant spectrum calculated for pairs of Fourier frequencies in the principal domain to build a statistical test of the null hypothesis that a stochastic process is strictly stationary.
We based the test development on the property that the second order cumulant spectrum of a time series in the frequency domain is zero under strict stationarity.
We studied the empirical size and power of the test and demonstrated its performance in an application to gamma ray decay data.
Future paths of research include the extension of the Cum theory to develop a test for strict stationarity of a graph signal with applications in learning CNNs on graphs, denoising, inpainting, weather prediction, and social networks.
We relate to the theory developed in [15].
In the graph signal processing domain, we deﬁne a graph signal X measured at a sequence of vertices in V , where G =
( V, E ) is a a weighted undirected graph.
Girault [15] introduces an isometric graph translation operator T G = exp( − it √ La ) where La is the graph
Laplacian matrix.
Then a stochastic graph signal is strictly stationary if X is equivalent in distribution to T tG X for all t .
The graph Fourier transform GFTX = X (exp (cid:16) − it √ λ (cid:17) ) is then deﬁned as a projection of X on the eigenvectors of the Laplacian La .
Girault [15] introduces the concept of graph wide sense stationarity, equivalent to classical signal processing wide sense (second order) stationarity, if E [ GFTX l ] = 0 for λ l (cid:54) = 0 and E [ GFTX k 1 ∗ GFTX ∗ k 2 ] = 0 for λ k 1 (cid:54) =
λ k 2 .
No formal test statistic is deﬁned.
We propose extending Cum2 test to graph stationarity testing.
Supplementary materials Sensitivity analysis
We include a sensitivity analysis of the Cum2 test to see how the sample size and frame length L affect the empirical test size.
We generated white noise and evaluated Cum2 empirical size under different sample size and frame length scenarios.
Simulation results in Table 2 show that it is best to have sample sizes above 500, at least 50 frames and a frame length of at least 10.
A rule of thumb is to set L and P equal to the square root of sample size T .
[Table]
An R package implementing the test can be installed from https://github.com/D-Roberts/ statiotest .