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 for example in learning convolutional neural networks on graphs, denoising, and inpainting.
Introduction and related work
A T vector-valued time series f X ( t n ) g , 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. One of the difﬁculties is that there are many possible violations to the assumption of strict stationarity. There are two paradigms for analyzing time series: the time domain and the frequency domain.
In the time domain, one considers the observed data x (t) 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 time series f x ( t n ) g 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.
As a motivation, let’s take for example the idea of 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].
The second order cumulant spectrum [5] is
[Equation]
which is deﬁned for the square f(cid:0) f 0 (cid:20) f 1 (cid:20) f 0 ; (cid:0) f 0 (cid:20) f 2 (cid:20) f 0 g , where f 0 = 1 = (2 (cid:28) ) .
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 f x ( t m ) g is constant and its autocovariance c x ( t m ) depends only on the difference ( t n + m (cid:0) t n ) , c x ( t m ) =
c x ( t n + m (cid:0) 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 theoretical properties of the second order cumulant spectrum and test development in Section 2, and we evaluate the test empirical size and power on synthetic data in Section 3.
The test is demonstrated in 4 using gamma ray decay data and we 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(cid:0) f 0 (cid:20) f 1 (cid:20) f 0 ; (cid:0) f 0 (cid:20) f 2 (cid:20) f 0 g , where f 0 = 1 = (2 (cid:28) ) 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 f 0 < f 1 (cid:20) f 0 ; (cid:0) f 1 < f 2 (cid:20) f 1 g .
From [5], if the time series f x ( t ) g is strictly stationary then the second order cumulant spectrum for a pair of frequencies in the principal domain ( f 1 ; f 2 ) , K ( f 1 ; f 2 ) is equal to K ( f 1 ; f 2 ) = E [ X ( f 1 ) X ( f 2 )]
= { 2 S ( f 1 ) + O (1) if f 1 + f 2 = 0 mod
O (1) otherwise, (2) where X ( f i ) denote the discrete Fourier transform.
In Equation 2, K ( f 1 ; (cid:0) f 1 ) = (cid:14) ( f 1 ) S ( f 1 ) , where (cid:14) ( f 1 ) is the Dirac delta function, and S ( f 1 ) =
∑ 1 m = (cid:0)1 c x ( t m ) exp ( (cid:0) i 2 (cid:25)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 f x ( t n ) g 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
∑ Pp =1 K p ( f 1 ; f 2 ) : For computational simplicity, we express the fundamental frequencies as f = k= L , with 0 < k 1 (cid:20)
L= 2 , (cid:0) k 1 (cid:20) k 2 (cid:20) 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 (cid:0) 1 ) , E [ ^ S ( f k ) ]
=
S ( f k ) + O ( L (cid:0) 1 ) .
Similarly, under strict stationarity, from [5], E [ ^ K ( k 1 ; k 2 ) ]
= K ( k 1 ; k 2 ) + O (
L (cid:0) 1 ) : Furthermore, the variance of ^ K , considering P frames, is equal to P (cid:0) 1 S ( k 1 ) S ( k 2 ) as ( L; P ! 1 ) from [5].
We deﬁne the normalized second order cumulant spectrum as ^(cid:0)
( k 1 ; k 2 ) = ^ K ( k 1 ;k 2 ) √ 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 P .
Then the estimate for (cid:0) , ^(cid:0) simpliﬁes to p P ^ K .
We now construct the complex valued Cum2 test statistic quantity Y as
Y ( k 1 ; k 2 ) =
p 2 P [ ^(cid:0) ( k 1 ; k 2 ) (cid:0) (cid:0) ( k 1 ; k 2 ) ] . Assuming P ! 1 , 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 ! 1 ) 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 ℜ ( Y ( k 1 ; k 2 )) and ℑ ( Y ( k 1 ; k 2 )) follow a standard normal distribution.
Let F emp ( x ) denote the empirical cumulative distribution of ℜ ( Y ) , and ℑ ( 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 kand k 2 the window averaged second order cumulant spectrum as E [ GFTX k 1 (cid:3) 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 ) = (cid:21)y ( t ) + u ( t ) to include a unit root component y ( t ) =
∑ tj =1 v ( j ) and a white noise stationary component u ( t ) .
The test rejects the null of strict stationarity withpower 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 ) =
(cid:27) t u ( t ) , where u ( t ) is white noise and with variance (cid:27) 2 t that is one under null of stationarity and follows a piecewise linear trend under alternative, such that (cid:27) 2 t = {+(cid:27) 
+} + ( (cid:27) 12 (cid:0) (cid:27) 02 ) ( t (cid:0) m ) (1 (cid:0) m ) (cid:0) 1 for t (cid:21) m and (cid:27) 02 for t < m , with {+(cid:27) 
+} = 1 and (cid:27) 1 = c(cid:27) 0 .
Table 1 illustrates the power of the test to detect piecewise linear trend in second moment (increase if c = 4 and decrease if c = 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 = f 250 ; 1000 ; 5000 g , 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 was collected using a 137 Cs 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,508 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 Cum2 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( (cid:0) it p
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:0)
it p (cid:21) ) ) 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 (cid:21) l ̸ = 0 and E [ GFTX k 1 (cid:3) GFTX (cid:3) k 2 ] = 0 for (cid:21) k 1 ̸ = (cid:21) 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 .