## 2 Materials and Methods
### Methods
#### 2.2.1 Random Noise  
The stochastic nature of random noise, which is generated by a normal distribution, is restricted because it only depends on its mean value and variance. To address this issue, GND [24; 25] was used as the random noise in this study because the distribution of the original brainwave data was similar to that of GND. Specifically, the amplitudes of the frequency components are widely used to classify motor imagery brainwaves. Thus, the time series brainwave data were transferred to the frequency domain. Figure 1a,b show that the distributions of some frequencies had a blunt shape. This distribution was created using GNDv1. Additionally, the probability distributions (PDFs) of the amplitudes of some frequencies are similar to a skewed normal distribution, as shown in Figure 1c,d. This distribution was created using GNDv2. Considering these observations, GNDv1 and GNDv2 were chosen to produce random noise in this study. A random noise \(x\) following a specific PDF \(p_{x}\) can be generated using its cumulative distribution function (CDF) \(c_{x}\)[26] as follows. First, a random variable \(y\) is generated, which is equally distributed between 0 and 1. Then, \(x\) can be calculated as \(x=c_{x}^{-1}(y)\). Thus, the inverse function of the CDF for the GND is required to generate random noise following a GND. The PDF of GNDv1 is defined as:  
\[p_{v1}(x)=\frac{\beta}{2\alpha\Gamma(1/\beta)}\exp(-\left(\frac{|x-\mu|}{ \alpha}\right)^{\beta}), \tag{1}\]  
where \(\beta\) is a shape parameter that changes the kurtosis of the PDF; \(\mu\) is the mean; \(\sigma\) is the standard deviation; \(\alpha\) is a scale parameter defined as \(\sqrt{\Gamma(\frac{1}{\beta})/\Gamma(\frac{3}{\beta})}\times|\sigma|\), where \(\Gamma\) is the gamma function. This distribution is the same as the normal distribution when \(\beta\) = 2, as shown in Figure 2a. When \(\beta\) < 2, \(p_{v1}\) is sharper than the PDF of the normal distribution, and vice versa. Figure 1: Distribution of amplitudes for (**a**) 24 Hz, (**b**) 29.7 Hz, (**c**) 19.3 Hz, and (**d**) 27.7 Hz. The amplitude was normalized by the signal power. Figure 2: (**a**) Probability and (**b**) cumulative distributions for GNDv1 with zero mean and unit standard deviation. A function \(c_{\rm v1}\), which is the CDF of GNDv1, can be obtained by integrating \(p_{\rm v1}\) as follows:  
\[c_{\rm v1}(x)=\frac{1}{2}+\frac{\text{sgn}(x-\mu)}{2}\times g(|x-\mu|^{\beta}, \frac{1}{\beta},\alpha^{\beta}), \tag{2}\]  
where \(g(h,a,b)\) is defined as \(\frac{1}{\mu\Gamma(a)}\int_{0}^{h}s^{a-1}\exp\left(-\frac{s}{b}\right)ds\) and sgn denotes the sign function. Then, the inverse function of \(c_{\rm v1}\) can be calculated as:  
\[c_{\rm v1}^{-1}(y)=\mu+\text{sgn}(c_{\rm v1}(y)-0.5)\{g^{-1}\bigg{(}2|c_{\rm v 1}(y)-0.5|,\frac{1}{\beta},\alpha^{\beta}\bigg{)}\}^{\frac{1}{\beta}}. \tag{3}\]  
This inverse function is used to generate random noise following GNDv1. The random noise following GNDv2 is determined using the shape parameter \(\kappa\). Its PDF is skewed to the right when \(\kappa\) is positive, and vice versa. Specifically, the PDF of GNDv2 can be represented as:  
\[p_{\rm v2}(x)=\frac{1}{\sigma\sqrt{2\pi}\{\alpha-\kappa(x-\zeta)\}}\exp \left(-\frac{1}{2}\bigg{(}\frac{z(x)-\mu}{\sigma}\bigg{)}^{2}\right), \tag{4}\]  
where \(z\) is defined as \(-\frac{1}{\kappa}\log\left(1-\frac{\kappa(x-\zeta)}{\alpha}\right)\) when \(\kappa\
eq 0\) and as \(\frac{x-\zeta}{\alpha}\) when \(\kappa=0\). Then, the CDF of GNDv2 can be calculated as:  
\[c_{\rm v2}(x)=\frac{1}{2}[1+\text{erf}(\frac{z(x)-\mu}{\sigma\sqrt{2}})], \tag{5}\]  
where \(\text{erf}(x)\) is the error function defined as \(\frac{2}{\sqrt{\pi}}\int_{0}^{x}e^{-t^{2}}dt\).