Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

時系列データの変換

定常過程への変換

分析しやすいデータ:定常過程

定常過程の場合、期待値や自己共分散が時間を通じて一定なので、例えば「1月の平均気温」は1月の各観測値の平均をとれば求められる。

ARIMAモデルは定常過程との相性がよいため、モデルを使った分析もしやすい。

最も基礎的な(弱)定常過程は、ホワイトノイズを用いて

yt=μ+εt,εt W.N. (σ2)y_t=\mu+\varepsilon_t, \quad \varepsilon_t \sim \text { W.N. }\left(\sigma^2\right)

としたもの(E(yt)=μE(y_t) = \mu

Source
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd

n = 100
np.random.seed(0)
mu = np.random.normal(size=n)
noise = np.random.normal(size=n)
y = mu + noise


fig, axes = plt.subplots(figsize=[8,2], ncols=2)
axes[0].plot(range(n), y)
axes[0].set(title="stationary process")

pd.plotting.autocorrelation_plot(y, ax=axes[1])
_ = axes[1].set(title="autocorrelation")
<Figure size 800x200 with 2 Axes>

単位根過程と和分過程

非定常なデータのひとつである 単位根過程 は、差分をとることで定常過程になる。

d1d-1階差分をとっても非定常だがdd階差分をとると定常になる系列は dd次和分過程 と呼ばれ、I(d)I(d)と表す。