# Use of Covariance Analysis in Electroencephalogram Reveals Abnormalities in Parkinson's Disease
## 3 Mathematical Background for Cross Wavelet Analysis
### Cross Wavelet Transform  
Cross Wavelet Transform (XWT) was used to analyze the covariance of two time series. It measures and exposes time-frequency areas with high common powers [26; 41; 42; 43]. Given two time series, \(X\) and \(Y\), with their respective CWT, \(W_{n}^{X}\)(s) and \(W_{n}^{Y}\)(s), the XWT can be expressed as  
\[W_{n}^{XY}(s)=W_{n}^{X}(s)W_{n}^{Y*}(s) \tag{4}\]  
where \(W_{n}^{Y*}(s)\) is the conjugate complex of \(W_{n}^{Y}(s)\)[26]. In the XWT, power is defined as  
\[\left|W_{n}^{XY}(s)\right|^{2} \tag{5}\]  
The phase angle for the XWT describes the phase relationship between \(X\) and \(Y\) in the time-frequency space [26]. The phase in the XWT is determined by  
\[\Phi\ (t,s)=tan^{-1}\left[\frac{Im\big{\{}W_{n}^{XY}(t,s)\big{\}}}{Re\big{\{}W_{ n}^{XY}(t,s)\big{\}}}\right] \tag{6}\]  
where \(Im\) and \(Re\) represent the imaginary and real segments of the cross-wavelet spectrum, respectively. Confidence levels for the XWT are derived from the square root of the product of two chi-square distributions [44].  
Using the spectral information obtained previously with the CWT, multiple XWT were applied to pairs of members within each group (PD patients <60 and >60; CL <60 and >60) to eliminate individual features. The pairs for each XWT were performed taking into consideration a symmetric square matrix per group, where all the possible combinations between the members could be identified. Only the member combinations above the main diagonal were analyzed since the combinations under the diagonal are mirror images and the results obtained are the same. For each combination of members identified, 21 XWT were applied, corresponding to each electroencephalographic channel. Figure 3A shows the CWT arrays from the members of the CL <60 group. Figure 3B shows examples of the square matrices for the crossings from the Fp1 and O2 channels for the same group. Figure 3C shows the cross-wavelet spectra from channels Fp1 and O2 for the crossings of the CL <60 group.  
Figure 2: Continuous wavelet spectrum from Fp1 channel of CL03 <60.  
Figure 4 shows one example of the cross-wavelet spectrum from the Cz channel of the crossing between CL01 and CL03 <60. On the spectrum, the crossed original time series (one in black, one in brown) are shown at the top of the figure. The central panel shows the PWS, where the black arrows represent the wavelet phase over time and frequency. The left panel shows the GWs.  
Figure 3: Schematic representation from the crossing process for the XWT analyses. Example for the CL <60 group. (**A**) CWT arrays for each member of the group: CL01, CL02 and CL03. (**B**) Symmetric square matrix with the possible crossings for this group inside the black square. One matrix for each electroencephalographic channel. (**C**) Cross wavelet spectra from the crossings above the main diagonal from the Fp1 and O2 channels.  
Interestingly, CL subjects identified as 04 (CL04) <60 (48 years old) and as 07 (CL07) >60 (71 years old) showed notably different intrinsic features in their individual continuous wavelet profiles compared to the other members of their respective CL group. They were omitted from the XWT analysis and analyzed independently at the end of this study.  
According to the above-mentioned data, the final number of members of each group was CL <60 (\(n\) = 3), CL >60 (\(n\) = 4), PD <60 (\(n\) = 2) and PD >60 (\(n\) = 5). Thus, due to the possible combinations for each group showed by their square matrices, 3 possible crossings per channel were performed for CL <60, 6 crossings for CL >60, 1 crossing for PD patients <60, and 10 for PD patients >60.