日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 人工智能 > 循环神经网络 >内容正文

循环神经网络

二阶自回归过程matlab,时间序列分析:二阶自回归过程

發(fā)布時(shí)間:2023/12/3 循环神经网络 61 豆豆
生活随笔 收集整理的這篇文章主要介紹了 二阶自回归过程matlab,时间序列分析:二阶自回归过程 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

時(shí)間序列分析:二階自回歸過程

Author: nex3z

2019-07-13

1. 定義

對于二階自回歸過程 $AR(2)$

\begin{equation}

X_t = \phi_1 X_{t-1} + \phi_2 X_{t-2} + e_t \tag{1}

\end{equation}

假設(shè) $e_t$ 獨(dú)立于 $Y_{t-1}, Y_{t-2}, \cdots$。式 $(1)$ 也可以表示為

\begin{equation}

X_t – \phi_1 X_{t-1} – \phi_2 X_{t-2} = e_t

\end{equation}

\begin{equation}

\phi(B) X_t = e_{t} \tag{2}

\end{equation}

其中

\begin{equation}

\phi(B) = 1 – \phi_1 B – \phi_2 B^2 \tag{3}

\end{equation}

$AR(2)$ 的特征方程為 $\phi(B) = 0$,即

\begin{equation}

1 – \phi_1 B – \phi_2 B^2 = 0 \tag{4}

\end{equation}

上述特征方程是一個(gè)二次方程,總有兩個(gè)跟(含復(fù)根)。

2. $AR(2)$ 過程的平穩(wěn)性

可以證明,在 $e_t$ 獨(dú)立于 $Y_{t-1}, Y_{t-2}, \cdots$ 的條件下,當(dāng)且僅當(dāng) $AR$ 特征方程的根的絕對值(模)大于 $1$ 時(shí),方程 $(1)$ 有平穩(wěn)解。這一條件也可以表述為復(fù)平面上的根在單位圓外。這個(gè)結(jié)論可以不加任何改變地推廣到 $p$ 階的情況。

在式 $(1)$ 所示的 $AR(2)$ 過程中,容易找到二次特征方程 $(4)$ 的兩個(gè)根為

\begin{equation}

\frac{\phi_1 \pm \sqrt{\phi_1^2 + 4 \phi_2}}{-2\phi_2} \tag{5}

\end{equation}

為了滿足平穩(wěn)條件,要求式 $(5)$ 的絕對值大于 $1$。可以證明,為了平穩(wěn)性成立,當(dāng)且僅當(dāng)滿足一下三個(gè)條件

\begin{equation}

\phi_1 + \phi_2 < 1 \qquad \phi_1 + \phi_2 < 1 \qquad |\phi_2| < 1 \tag{6}

\end{equation}

稱式 $(6)$ 所示的條件為 $AR(2)$ 模型的平穩(wěn)條件。

3. $AR(2)$ 過程的自相關(guān)函數(shù)

假設(shè)式 $(1)$ 所描述的 $AR(2)$ 過程是平穩(wěn)的,且具有零均值,在式 $(1)$ 等號(hào)兩邊同乘以 $X_{t-k}$ 并求期望,得

\begin{equation}

\gamma_k = \phi_1 \gamma_{k-1} + \phi_2 \gamma_{k-2}, \qquad k = 1, 2, 3, \cdots \tag{7}

\end{equation}

在式 $(7)$ 的等號(hào)兩邊同除以 $\gamma_0$,得

\begin{equation}

\rho_k = \phi_1 \rho_{k-1} + \phi_2 \rho_{k-2}, \qquad k = 1, 2, 3, \cdots \tag{8}

\end{equation}

稱式 $(7)$ 或式 $(8)$ 為 Yule-Walker 方程。當(dāng) $k = 1$ 時(shí),有 $\rho_1 = \phi_1 \rho_0 + \phi_2 \rho_{-1}$,由 $\rho_0 = 1$,$\rho_{-1} = \rho_1$,得 $\rho_1 = \phi_1 + \phi_2 \rho_1$,進(jìn)而解得

\begin{equation}

\rho_1 = \frac{\phi_1}{1 – \phi_2} \tag{9}

\end{equation}

當(dāng) $k = 2$ 時(shí),有

\begin{equation}

\rho_2 = \phi_1 \rho_1 + \phi_2 \rho_0 = \frac{\phi_2(1 – \phi_2) + \phi_1^2}{1 – \phi_2} \tag{10}

\end{equation}

可見,通過式 $(8)$ 可以在已知 $\phi_1$ 和 $\phi_2$ 時(shí)計(jì)算出自相關(guān)值。

$\rho_k$ 的更一般的計(jì)算方法取決于特征方程 $1 – \phi_1 B – \phi_2 B^2 = 0$ 的根,用 $G_1, G_2$ 表示特征根的倒數(shù),有

\begin{equation}

G_1 = \frac{\phi_1 – \sqrt{\phi_1^2 + 4\phi_2}}{2}, \qquad G_2 = \frac{\phi_1 + \sqrt{\phi_1^2 + 4\phi_2}}{2}

\end{equation}

如果 $G_1 \neq G_2$ (即 $\phi_1^2 + 4 \phi_2^2 > 0$),可以證明有

\begin{equation}

\rho_k = \frac{(1 – G_2^2)G_1^{k+1} – (1 – G_1^2)G_2^{k+1}}{(G_2 – G_1)(1 + G_1G_2)}, \qquad k = 0, 1, 2, \cdots \tag{11}

\end{equation}

如果特征根時(shí)復(fù)數(shù)(即 $\phi_1^2 + 4 \phi_2^2 < 0$),則 $\rho_k$ 可以表示為

\begin{equation}

\rho_k = R^k \frac{\sin(\Theta k + \Phi)}{\sin(\Phi)}, \qquad k = 0, 1, 2, \cdots \tag{12}

\end{equation}

其中 $R = \sqrt{-\phi_2}$,$\Theta$ 和 $\Phi$ 可以由 $\cos(\Theta) = \phi_1 / (2\sqrt{-\phi_2})$,$\tan(\Phi) = (1 – \phi_2) / (1 + \phi_2)$ 解得。

如果特征根相等(即 $\phi_1^2 + 4 \phi_2^2 = 0$),則有

\begin{equation}

\rho_k = \bigg( 1 + \frac{1 + \phi_2}{1 – \phi_2} \bigg) \bigg( \frac{\phi_1}{2} \bigg)^k, \qquad k = 0, 1, 2, \cdots \tag{13}

\end{equation}

由式 $(11)$、$(12)$、$(13)$ 可以看到,$\rho_k$ 的可以有各種形狀,但始終隨滯后階數(shù) $k$ 的增加而指數(shù)遞減。當(dāng)特征方程有復(fù)數(shù)根時(shí),$\rho_k$ 表現(xiàn)為具有阻尼因子 $R$($0 \leq R \leq 1$)、頻率 $\Theta$ 和相位 $\Phi$ 的阻尼正弦波動(dòng)曲線。

當(dāng) $\theta_1 = 0.5, \theta_2 = 0.25$ 時(shí),有兩個(gè)相異的實(shí)特征根,ACF 圖像如圖 1。

ar

acf(ar)

圖 1

當(dāng) $\theta_1 = 1, \theta_2 = -0.25$ 時(shí),有兩個(gè)相同的實(shí)特征根,ACF 圖像如圖 2。

ar

acf(ar)

圖 2

當(dāng) $\theta_1 = 1.5, \theta_2 = -0.8$ 時(shí),有兩個(gè)負(fù)特征根,ACF 圖像如圖 3。

ar

acf(ar)

圖 3

4. $AR(2)$ 過程的方差

由式 $(1)$ 計(jì)算 $AR(2)$ 過程的方差

\begin{align}

\gamma_0 &= \mathrm{Var}(X_t) = \mathrm{Var}(\phi_1 X_{t-1} + \phi_2 X_{t-2} + e_t) \\

&= \mathrm{Var}(\phi_1 X_{t-1} + \phi_2 X_{t-2}) + \mathrm{Var}(e_t) \\

&= \mathrm{Var}(\phi_1 X_{t-1}) + \mathrm{Var}(\phi_2 X_{t-2}) + 2 \mathrm{Cov}(\phi_1 X_{t-1}, \phi_2 X_{t-2}) + \mathrm{Var}(e_t) \\

&= \phi_1^2 \gamma_0 + \phi_2^2 \gamma_0 + 2 \phi_1 \phi_2 \gamma_1 + \sigma_e^2 \\

&= (\phi_1^2 + \phi_2^2)\gamma_0 + 2 \phi_1 \phi_2 \gamma_1 + \sigma_e^2 \tag{14}

\end{align}

在式 $(7)$ 中令 $k = 1$,有 $\gamma_1 = \phi_1 \gamma_0 + \phi_2 \gamma_{-1}$,又由 $\gamma_{-1} = \gamma_{1}$,故有

\begin{equation}

\gamma_1 = \phi_1 \gamma_0 + \phi_2 \gamma_1 \tag{15}

\end{equation}

結(jié)合式 $(14)$、$(15)$,解得

\begin{align}

\gamma_0 &= \frac{(1 – \phi_2)\sigma_e^2}{(1 – \phi_2)(1 – \phi_1^2 – \phi_2^2) – 2\phi_2\phi_1^2} \\

&= \frac{1 – \phi_2}{1 + \phi_2} \cdot \frac{\sigma_e^2}{(1 – \phi_2)^2 – \phi_1^2} \tag{16}

\end{align}

總結(jié)

以上是生活随笔為你收集整理的二阶自回归过程matlab,时间序列分析:二阶自回归过程的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。