iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🔥

Introduction to Time Series Analysis: Part 2

に公開

Overview

In the previous post, I explained the preprocessing of time series data. Time series data that has undergone appropriate preprocessing has very easy-to-analyze properties: stationarity, normality, and linearity.

In this post, I will explain the main quantities in stationary time series. This is an essential technique for more accurately understanding the characteristics of stationary time series data. I will mainly discuss univariate cases (single time series data), but I also plan to touch on multivariate cases.

https://zenn.dev/akitek/articles/f74753c2e95ce4

Stationary Time Series

Let's look into the stationarity of time series.
First, regardless of whether stationarity exists, let's define the following three statistics. Here, if the time series data is y_n (where n is the time, N is the total number of data points, and {y_1, y_2, \dots, y_N}), then:

  1. Mean: \mu_n = E[y_n]
  2. Variance: Var(y_n) = E[(y_n - \mu_n)^2]
  3. Covariance: Con(y_n, y_m) = E[(y_n - \mu_n)(y_m - \mu_m)]

Now, stationarity means "the probability structure (properties) does not change over time," and it is divided into strict stationarity and weak stationarity depending on the rigor of the conditions.

Strict Stationarity and Weak Stationarity

Strict stationarity occurs when the probability distribution underlying the time series data does not change over time. For any set of time points {y_{n_1}, y_{n_2}, \dots, y_{n_m}} and any time difference (shift amount) k, the joint distribution is always the same.

p(y_{n_1}, y_{n_2}, \dots, y_{n_m}) = p(y_{n_1 + k}, y_{n_2 + k}, \dots, y_{n_m + k})

In practice, it is difficult to verify this strict stationarity, and since such strong conditions are often not required, we frequently consider the following weak stationarity.

Weak stationarity means that the mean, variance, and covariance do not change over time (invariance up to the second-order moment). In other words, for any time difference (shift amount) k \in {0, \pm 1, \pm 2, \dots}:

\begin{align} E(y_n) &= E(y_{n+k}) \\ Var(y_n) &= Var(y_{n+k}) \\ Cov(y_n, y_m) &= Con(y_{n+k}, y_{m+k}) \ \end{align}

Clearly, strict stationarity is a more rigorous condition than weak stationarity. Therefore, if a process is strictly stationary and its mean, variance, and covariance exist, it also satisfies weak stationarity. The reverse is not necessarily true.

:::

Autocovariance function of weakly stationary time series

To re-organize the properties of weak stationarity:

  1. The mean E[y_n] does not depend on time n; that is, it can be written as E[y_n] = \mu.
  2. The covariance Cov(y_n, y_m) depends only on the time difference k. That is, Cov(y_n, y_{n-k}) = E[(y_n - E[y_n])(y_{n-k} - E[y_{n-k}])] =E[(y_n - \mu)(y_{n-k} - \mu)] = C_k

In particular, the following properties of the autocovariance C_k hold: 1) it is an even function, 2) its maximum is C_0, meaning |C_k| \leq C_0, and 3) it is positive semi-definite. Since these are important properties, let's look at them one by one.


Autocovariance function is an even function

An even function is a function with the property f(x) = f(-x); for example, \cos(x) is one instance.
Here, it states that C_{-k} = C_{k}.

Proof:

\begin{align} C_k &= Cov(y_n, y_{n-k}) \\ C_{-k} &= Cov(y_n, y_{n+k}) \\ &= Cov(y_{n+k}, y_{n}) \\ &= Cov(y_{n}, y_{n-k}) = C_{-k} \\ \end{align}

In equation (6), we used the fact that "covariance is invariant even if the elements are swapped," and in equation (7), we used the fact that "from weak stationarity, shifting by the same amount is not a problem."


|C_k| \leq C_0

We use the general fact that E(a^2)E(b^2) \geq E(ab)^2 holds.

Derivation for enthusiasts

For any \lambda, E(\lambda a + b)^2 \geq 0 holds.
Breaking this down further:

E(\lambda a + b)^2 \\ = \lambda^2E(a^2) + 2\lambda E(ab) + E(b^2) \\ = E(a^2)\Big( \lambda - \frac{E(ab)}{E(b^2)} \Big)^2 + E(b^2) - \Big( \frac{E(ab)}{E(a^2)} \Big)^2

Now, if we fix the values of a, b and regard the above expression as a function of \lambda, since E(a^2) \geq 0, it is a quadratic function that is convex (opens upward) with respect to \lambda. The minimum value occurs when \lambda = \frac{E(ab)}{E(b^2)}. For E(\lambda a + b)^2 \geq 0 to hold for any \lambda, it is necessary that the minimum value satisfies E(b^2) - \Big( \frac{E(ab)}{E(a^2)} \Big)^2 \geq 0, which leads to the result.

Here, by setting a = y_n - \mu, b = y_{n-k} - \mu:

\begin{align} E(a^2) &= E(y_n - \mu)^2 = C_0 \\ E(b^2) &= E(y_{n-k} - \mu)^2 = C_0 \\ E(ab) &= E[(y_n - \mu)(y_{n-k} - \mu)] = C_h \\ \end{align}

From this, we get C_0C_0 \geq C_h \rightarrow C_0 \geq |C_k|.


Positive semi-definite

Positive semi-definiteness means that the following holds:

\sum_{i=1}^{m}\sum_{j=1}^{m}\alpha_i \alpha_j C_{i-j} \geq 0 \\

Due to this property, a convenient solution method called the Yule-Walker equations can be used.

Derivation:

\begin{align} E\Big( \sum_{i=1}^{m}\alpha_i y_{n-i}\Big)^2 &= \sum_{i=1}^{m}\sum_{j=1}^{m}\alpha_i \alpha_jE[y_{n-i}y_{n-j}] \\ &= \sum_{i=1}^{m}\sum_{j=1}^{m}\alpha_i \alpha_j C_{i-j} \geq 0 \\ \end{align}

The transition from equation (11) to (12) is based on the replacement with the autocovariance C_{i-j}, which depends on the lag i-j = (n - j) - (n - i) due to weak stationarity.


Autocorrelation function of weakly stationary time series

Related to autocovariance, another quantity is the autocorrelation function.
This is defined as follows:

R_k \equiv Cor(y_n, y_{n-k}) = \frac{Cov(y_n, y_{n-k})}{\sqrt{Var(y_n)Var(y_{n-k})}}

However, in the case of a stationary time series, it can be rewritten very simply.

\begin{align} R_k &= \frac{Cov(y_n, y_{n-k})} { \sqrt{Var(y_n)Var(y_{n-k})} } \\ &= \frac{Cov(y_n, y_{n-k})} { \sqrt{Cov(y_n,y_n)Cov(y_{n-k},y_{n-k}) }} \\ &= \frac{C_k}{\sqrt{C_0C_0}} \\ &= \frac{C_k}{C_0} \end{align}

In other words, if the autocovariance function C_k is known, the autocorrelation function R_k can also be calculated.

How to find various estimators

We obtain the mean, autocovariance function, and autocorrelation function from the time series data y_n.

  • Sample mean
\hat{\mu} = \frac{1}{N}\sum_{n=1}^{N} y_n
  • Sample autocovariance function
\hat{C}_k = \frac{1}{N}\sum_{n=k+1}^{N} (y_n - \hat{\mu})(y_{n-k} - \hat{\mu})
  • Sample autocorrelation function
\hat{R}_k = \frac{\hat{C}_k}{\hat{C}_0}

Note that the sample autocovariance function calculates the sum of autocovariances with data from lag k over the period n = k + 1, ..., N, divided by the total number of data points N. While it looks like an average, the denominator would be N-k if it were a true average.

In fact, this \hat{C}_k is not an unbiased estimator... but it appears that N is used as is in time series analysis (according to the lecture on "Time Series Analysis").

Proof that it is not an unbiased estimator
E[\hat{C}_k] = E\Big[ \frac{1}{N}\sum_{n=k+1}^{N} y_n y_{n-k} \Big] = \frac{1}{N} E[\sum_{n=k+1}^{N} y_n y_{n-k}] = \frac{N-k}{N}C_k

If the denominator is N, the expected value of the estimator \hat{C}_k is affected by the lag k and the number of data points N, so it is not an unbiased estimator. Conversely, if the denominator were N-k, the denominator and numerator terms would cancel out, making it an unbiased estimator.

For now, let's establish the properties of the estimators:

\begin{align} E[\hat{C}_k] &= \frac{N-k}{N}C_k \\ Var(\hat{C}_k) &\sim \frac{1}{N}\sum_{j = -\infty}^{\infty} (C_j^2 + C_{j-k}C_{j+k}) \\ Var(\hat{R}_k) &\sim \frac{1}{N}\sum_{j = -\infty}^{\infty} ( R_j^2 + R_{j-k}R_{j+k} - 4R_j R_k R_{j-k} + 2R_j^2 R_k^2) \end{align}

White Noise

Now that we understand how to obtain the estimators for the mean, autocovariance, and autocorrelation, I will explain white noise, which is an extremely important type of time series data in time series analysis.

White noise has the properties that the expected value (mean) E[y_n] = 0 and the autocovariance C_k = 0 for time lags k > 0. In other words, it is a time series where data at a given point in time fluctuates uncorrelated with data at any other point in time. The following is an example of white noise.

plot(as.ts(rnorm(1000))) # White noise (generating 1000 random numbers from a standard normal distribution)

To define it more rigorously, it can be expressed as follows:

\begin{equation} C_k = \begin{cases} \sigma^2 & k = 0 \\ 0 & k \neq 0 \end{cases} \end{equation}

Due to these properties of autocovariance, the autocorrelation function, which is found as a ratio of autocovariances, is:

\begin{equation} R_k = \begin{cases} 1 & k = 0 \\ 0 & k \neq 0 \end{cases} \end{equation}

Now, since white noise is naturally a weakly stationary time series, we can calculate the estimators for the mean, autocovariance, and autocorrelation as described above. If we calculate these specifically for the case of white noise:

\begin{align} \hat{C}_0 &\sim N(C_0, \frac{2\sigma^4}{N}) \\ \hat{C}_k &\sim N(0, \frac{\sigma^4}{N}) \\ \hat{R}_k &\sim N(0, \frac{1}{N}) \\ \end{align}
Derivation for enthusiasts

First, the expected value of the estimator \hat{C}_k is, from \hat{C}_k = \frac{1}{N}\sum_{i=k+1}^{N} y_i y_{i-k}:

\begin{align} E[\hat{C}_k] &= \frac{N-k}{N}C_k = 0 \\ E[\hat{C}_0] &= \frac{N}{N}C_0 = C_0 (= \sigma^2)\\ \end{align}

And since the variance of the estimator \hat{C}_k can be written generally as Var(\hat{C}_k) = \frac{1}{N^2}\sum_{i = k+1}^{N} \sum_{j = k+1}^{N} (C_{i-j}^2 + C_{i-j-k}C_{i-j+k}):

\begin{align} Var(\hat{C}_0) & = \frac{1}{N^2}\sum_{i = 1}^{N}\sum_{j = 1}^{N}(C_{i-j}^2 + C_{i-j}^2) = \frac{2}{N^2} N C_0^2 = \frac{2\sigma^2}{N} \\ Var(\hat{C}_k) &= \frac{1}{N^2}\sum_{i = k+1}^{N}\sum_{j = k+1}^{N}(C_{i-j}^2 + 0) = \frac{N-k}{N^2} C_0^2 \cong \frac{\sigma^4}{N} \\ \end{align}

Regarding equation (28), when k \neq 0, since either (i - j - k) or (i - j + k) will always have a non-zero value, it follows that C_{i-j-k}C_{i-j+k} = 0.

The variance of the autocorrelation function estimator for white noise follows a normal distribution N(0, \frac{1}{N}).[1]

Conversely, if the time series data being handled is white noise, the autocorrelation function should fall within \pm 1/\sqrt{N}. This property can be used for a simple evaluation of whiteness.

For example, the following plot shows the autocorrelation coefficients for the white noise data mentioned earlier, with \pm 1/\sqrt{N} determined by the data size N displayed as a reference.

wn <- as.ts(rnorm(1000))
wn <- unicor(wn, plot = FALSE) # Simultaneously find mean, autocovariance, and autocorrelation for univariate data

# Autocorrelation function of white noise:
plot(wn$acov, ylim = c(-1,1), col = 1, type = "l")
par(new = T)
# Plot of 1/√N (red)
plot(wn$acov.err, ylim = c(-1,1), col = 2, type = "l", ann = F)
par(new = T)
plot(-wn$acov.err, ylim = c(-1,1), col = 2, type = "l", ann = F)

In this figure, the horizontal axis represents the time lag k, and the vertical axis represents the estimator of the autocorrelation function \hat{C}_k. It can be seen that the values mostly fall within the region defined by the red reference lines (\pm 1/\sqrt{N}).[2]

Next, if we do the same with Sunspot data:

data(Sunspot)
unicor(Sunspot)

First, looking at the autocorrelation function alone, there is a very clear periodicity, and it can be seen that the decay is slow. In other words, it reveals a property where there are lags (periods) where the correlation becomes very strong, and the influence remains large even at points in time that are somewhat distant.

Furthermore, it is clear that the values hardly fall within the region of the red reference lines (\pm 1/\sqrt{N}). Thus, it can be confirmed by this simple method that this data is not pure white noise.[3]

Visualization of Periodicity

Next, we will represent the data in spectral representation using the autocovariance function. In spectral representation, by converting time series data from the time axis to the frequency axis, it is possible to reveal periodic movements contained in the time series data, regardless of time.

...That said, some might say they don't quite get it (I am one of those not used to spectral representation myself).

Therefore, while acknowledging that it might lack some precision, I would like to rephrase it in words that are easier to understand.

In other words, time series data that fluctuates over time is considered to be actually realized by synthesizing multiple periodic functions (waves; like cosine or sine waves). Spectral representation can be said to be the task of decomposing the multiple waves that make up the time series data based on the magnitude of these periods.

By using spectral representation, it becomes possible to analyze what kind of periodic waves are included and at what magnitude.

Spectral Representation

Now, this (power) spectrum can actually be obtained through the Fourier transform of the previously mentioned autocovariance function C_k. That is, using f as the frequency:

p(f) = \sum_{k = -\infty}^{\infty} C_k e^{-2\pi ikf}, -\frac{1}{2} \leq f \leq \frac{1}{2}

It can be expressed as follows. In a univariate stationary time series, since the autocovariance C_k is an even function:

\begin{align} p(f) &= \sum_{k = -\infty}^{\infty} C_k e^{-2\pi ikf} \\ &= C_0 + \sum_{k = 1}^{\infty} C_k (e^{-2\pi ikf} + e^{2\pi ikf}) \\ &= C_0 + \sum_{k = 1}^{\infty} C_k (\cos{2\pi kf}-i\sin{2\pi kf} + \cos{2\pi kf}+i\sin{2\pi kf}) \\ &= C_0 + 2\sum_{k = 1}^{\infty} C_k \cos{2\pi kf} \end{align}

It can be rewritten as follows. As can be seen from the equation, this power spectrum is an even function.[4]

Also, it is possible to transform the power spectrum back into the autocovariance C_k using the inverse Fourier transform.

\begin{align} C_k &= \int_{-\frac{1}{2}}^{\frac{1}{2}} p(f)e^{2\pi ikf}df \\ &= \int_{-\frac{1}{2}}^{\frac{1}{2}} p(f)\cos(2\pi kf)df \end{align}
Inverse Fourier transform derivation for enthusiasts
\begin{align} C_k &= \int_{-\frac{1}{2}}^{\frac{1}{2}} p(f)e^{2\pi ikf}df \\ &= \int_{-\frac{1}{2}}^{\frac{1}{2}} p(f)(\cos(2\pi kf) + i\sin(2\pi kf) )df \\ &= \int_{-\frac{1}{2}}^{\frac{1}{2}} p(f)(\cos(2\pi kf) + i\sin(2\pi kf) )df \\ &= \int_{-\frac{1}{2}}^{\frac{1}{2}} p(f)\cos(2\pi kf)df + \int_{-\frac{1}{2}}^{\frac{1}{2}} p(f) i\sin(2\pi kf)df \\ &= \int_{-\frac{1}{2}}^{\frac{1}{2}} p(f)\cos(2\pi kf)df + \int_{0}^{\frac{1}{2}} p(f) i\sin(2\pi kf)df + \int_{-\frac{1}{2}}^{0} p(f) i\sin(2\pi kf)df\\ &= \int_{-\frac{1}{2}}^{\frac{1}{2}} p(f)\cos(2\pi kf)df + \int_{0}^{\frac{1}{2}} p(f) i\sin(2\pi kf)df - \int_{\frac{1}{2}}^{0} p(-f) i\sin(-2\pi kf)df\\ &= \int_{-\frac{1}{2}}^{\frac{1}{2}} p(f)\cos(2\pi kf)df + \int_{0}^{\frac{1}{2}} p(f) i\sin(2\pi kf)df + \int_{0}^{\frac{1}{2}} - p(f) i\sin(2\pi kf)df\\ &= \int_{-\frac{1}{2}}^{\frac{1}{2}} p(f)\cos(2\pi kf)df \end{align}

Periodogram

It was found that the power spectrum p(f) can be obtained by the Fourier transform of the autocovariance C_k.
In actual practice:

  1. First, train a time series model on the data to obtain \hat{C}_k, an estimator of autocovariance.
  2. Fourier transform \hat{C}_k to obtain \hat{p}(f), an estimator of the power spectrum.

Since time series data is finite, the resulting estimator of the autocovariance is also finite. Therefore, the estimator of the power spectrum \hat{p}(f) is obtained discretely.

A plot of this power spectrum estimator \hat{p}(f) with the frequency f on the horizontal axis is called a periodogram. By looking at the periodogram, you can understand what frequency components (periodic waves) are included.

data(WHARD) # WHARD data in the TSSS package
period(WHARD, window = 0) # Create a periodogram: window = 0 means no smoothing (described later)

The above shows a periodogram created for the WHARD data (monthly wholesale sales data for certain hardware). It can be seen that the spectrum increases at regular intervals. In fact, since there are points that increase every 12 intervals, it appears to have a 12-month periodicity.

By looking at the power spectrum or periodogram, you can analyze what kind of periodic waves are included and at what intensity, so it is a good idea to create one when analyzing time series data.

Properties of the Periodogram

Here, I'll mention that as a property of the periodogram, it is an unbiased estimator, but not a consistent estimator.

\begin{align} \lim_{n \rightarrow \infty}E[\hat{p}(f)] &= p(f) \text{ (asymptotically unbiased)}\\ \lim_{n \rightarrow \infty}\hat{p}(f) &\neq p(f) \text{ (not a consistent estimator)}\\ \end{align}

What this means is that while the expected value approaches the true spectral density function p(f) as the number of data points increases, it does not converge to the exact shape of p(f). In fact, the spectral density values follow a chi-squared distribution, and the distribution does not change with the data size.

As an example, I created periodograms for time series data generated from white noise, increasing the data size to 200, 800, and 3,200 points.

r <- rnorm(3200) # Generate random numbers
spec.pgram(as.ts(r[1:200]), log = "yes")
spec.pgram(as.ts(r[1:800]), log = "yes")
spec.pgram(as.ts(r[1:3200]), log = "yes")

Looking at the figure, as the data size increases, the mean of the spectrum approaches 1, but the variance does not particularly improve.[6]

To create a better periodogram, there is a technique where the entire data is divided into sub-intervals, periodograms are obtained for the data in each interval, and finally, they are averaged. Using this, you can reduce the variance of the spectrum by a factor of l (the number of sub-intervals) compared to when you create a periodogram using the entire data.

\hat{p}_j = \frac{1}{l} \sum_{k=1}^{l}p_j^{(k)}

Using this, I compared the case where 3,200 white noise data points are 1) used in full (3,200 points), 2) split into 2 segments of 1,600 points each, 3) split into 4 segments of 800 points each, and 4) split into 16 segments of 200 points each.
(The R code was borrowed from this site.)

As you can see from the figure, the variance decreases as the number of divisions increases.

Additionally, smoothing of the periodogram can also be performed. This is based on the assumption that spectra should naturally be smooth.

Although I will omit the details, in R, you can create a smoothed periodogram using the window option of the period function in the TSSS package.

Multivariate Time Series

Finally, I will briefly explain the case of multivariate time series. In time series analysis, multivariate (m-variable) refers to m time series data points measured at the same time across multiple observation points (sensors).

y_n = \begin{pmatrix} y_n(1) \\ y_n(2) \\ \vdots \\ y_n(m) \\ \end{pmatrix} y_n \in R^{m}, n = 1, \dots, N

As an example, we will handle the HAKUSAN data in the TSSS package (recording the yaw rate, rolling, pitching, and rudder angle of a ship every second; 4 variables).

data(HAKUSAN)
plot(HAKUSAN[,1])

The figure shows the 4-variable time series data plotted together on the same time axis.

Let's extend the autocovariance and autocorrelation functions obtained for the univariate case to define the cross-covariance and cross-correlation functions between two time series datasets.

Cross-covariance Function of Stationary Time Series

\begin{align} C_k(i,j) &= Cov(y_n(i), y_{n-k}(j)) \\ &= E[(y_n(i) - \mu_i)(y_{n-k}(j)-\mu_j)] \end{align}

The above equation defines the cross-covariance function between the i-th and j-th time series at a time difference k. In other words, it compares data in one time series with data in another time series at a lag of k.

Then, we define the cross-covariance function matrix calculated between all m time series as follows. Here, if i = j, it represents the autocovariance function of the i-th time series.

C_k = \begin{pmatrix} C_k(1,1) & \cdots & C_k(1,m) \\ \vdots & \ddots & \vdots \\ C_k(m,1) & \cdots & C_k(m,m) \end{pmatrix}

Note that in the multivariate case, the cross-covariance function is not an even function. Generally, it can be written as:

C_{-k} = C_k^{\top}
Proof
\begin{align} C_{-k}(i,j) &= Cov(y_n(i), y_{n+k}(j)) \\ &= Cov(y_{n+k}(j), y_n(i)) \\ &= Cov(y_n (j), y_{n-k}(i)) \\ &= C_k(j,i) \end{align}

Regarding equations (31) and (32), the invariance of the result when swapping covariance elements is used. In equations (33) and (34), the fact that results are invariant for shifts that maintain the time difference k in a stationary time series is used.

Cross-correlation Function of Stationary Time Series

R_k(i,j) = \frac{C_k(i,j)}{\sqrt{C_0(i,i)C_0(j,j)} }

The above equation defines the cross-correlation function between the i-th and j-th time series at a time difference k.

As with the cross-covariance function, the cross-correlation function matrix calculated between all m time series is defined below. If i = j, it represents the autocorrelation function of the i-th time series.

R_k = \begin{pmatrix} R_k(1,1) & \cdots & R_k(1,m) \\ \vdots & \ddots & \vdots \\ R_k(m,1) & \cdots & R_k(m,m) \end{pmatrix}

Calculating the cross-correlation function for the HAKUSAN data yields the following (the crscor function in the TSSS package is convenient):

data(HAKUSAN)
y <- as.matrix(HAKUSAN[, 1:4])
crscor(y)

Visualizing this shows that the cross-correlation coefficients between time series datasets strengthen or weaken at certain time differences k (or multiples thereof). For example, the cross-correlation between rolling and rudder angle is consistently strong. It also reveals time delays (indicating which variable leads and influences the others).

Component Decomposition

All of them fluctuate irregularly, but there is a possibility that some kind of interaction is occurring between the time series datasets. For example, fluctuations in the yaw rate might be affecting fluctuations in rolling... and interestingly, the reverse could also be true.

In the multivariate case, each individual time series is generated as a result of complex interactions between the datasets, so it is necessary to decompose the components appropriately. While I plan to provide a detailed explanation in a future post on "Estimation of Time Series Models," I will only show the results of component decomposition here.

# Multivariate cross-spectrum (TSSS package)
data(HAKUSAN)
yy <- as.matrix(HAKUSAN[, 1:4])
nc <- dim(yy)[1]
n <- seq(1, nc, by =2)
y <- yy[n, ]
z <- marfit(y, lag = 20)
marspc(z$arcoef, v = z$v, col = c(1,2,3,4,5))

The figure above shows the power decomposition and power contribution rates for the HAKUSAN data, calculated from the power spectra of each component (yaw rate, rolling, pitching, and rudder angle of the ship).

By looking at the power spectrum in a univariate case, we could determine which frequency component waves appeared strongly. However, in the multivariate case, a particular frequency component in one time series is not composed solely of that data itself. In fact, it includes influences from other components (time series data).

Therefore, through power decomposition and power contribution rates, it is possible to understand to what extent the spectrum of a certain time series is influenced by itself or by other time series data.

In the figure, for example, from the power spectrum of the rudder angle (D), it can be seen that the rudder angle (D) data mainly contains waves with a frequency of 0.13-0.14. However, looking at the power contribution rate on the right, the influence of the yaw rate (A) also increases. In other words, the power decomposition reveals that the yaw rate (A) has a significant contribution to the rudder angle (D) data.

Summary

In this post, I organized the properties of (weakly) stationary time series data. If the autocovariance function C_k can be calculated from the time series data, the autocorrelation function R_k and the periodogram can be obtained.

Next, I will finally introduce time series models and touch on parameter estimation and model selection.

Miscellaneous Notes

This time, the discussion became somewhat theoretical. Since I'm not originally strong with theory or formulas, there might be mistakes, but I would appreciate it if you could point them out kindly.
However, I feel that learning from the theory helps me grasp the key points of time series analysis.
(Writing formulas in Markdown is quite a task, though 💦)

References

https://chaosmemo.com/entry/2022/07/11/232004

Borrowed the code for the averaging process of the periodogram.

https://ocw.u-tokyo.ac.jp/course_11477/

A lecture on time series analysis by Professor Kitagawa. I referred to the explanation content extensively this time as well.

https://www.asakura.co.jp/detail.php?book_code=12247&srsltid=AfmBOoq4qLoIG3p4c67Xiy-ptZ7Z_bxJ4X6lwItROeO2O_nQjrpTOvJ5

A collection of practical application examples of time series analysis edited by Professors Akaike and Kitagawa. It provides many insights into the techniques of time series analysis and the interpretation of results in practical applications. I hope to introduce this book someday.

https://jasp.ism.ac.jp/ism/TSSS/

TSSS, the package providing the R code and datasets used in this post.

https://mathlandscape.com/cauchy-distrib/

For those who want to know the properties of the Cauchy distribution.

脚注
  1. Theoretically, R_k = 0 for white noise, but because some noise is included in the estimation, the variance is not zero. ↩︎

  2. Since the number of data points is 1000 here, the red reference lines are drawn at approximately \pm 0.03. ↩︎

  3. Many time series analysis software packages and libraries plot these decision lines together for whiteness evaluation. ↩︎

  4. Since C_k and \cos(x) are even functions, and p(f) is a linear combination of them. ↩︎

  5. If drawn as a graph, it's like drawing a horizontal line where p(f) = C_0. ↩︎

  6. Since the spectrum of white noise is constant at \sigma^2 = 1 (as it is a standard normal distribution here) regardless of frequency. ↩︎

Discussion