首页 > 其他分享 >Time Series Analysis (Best MSE Predictor & Best Linear Predictor)

Time Series Analysis (Best MSE Predictor & Best Linear Predictor)

时间:2023-02-08 23:00:11浏览次数:43  
标签:mathbb partial Linear big align mu Big Predictor Best

Time Series Analysis

Best MSE (Mean Square Error) Predictor

对于所有可能的预测函数 \(f(X_{n})\),找到一个使 \(\mathbb{E}\big[\big(X_{n} - f(X_{n})\big)^{2} \big]\) 最小的 \(f\) 的 predictor。这样的 predictor 假设记为 \(m(X_{n})\), 称作 best MSE predictor,i.e.,

\[m(X_{n}) = \mathop{\arg\min}\limits_{f} \mathbb{E}\big[ \big( X_{n+h} - f(X_{n}) \big)^{2} \big] \]

我们知道:\(\mathop{\arg\min}\limits_{f} \mathbb{E}\big[ \big( X_{n+h} - f(X_{n}) \big)^{2} \big]\) 的解即为:

\[\mathbb{E}\big[ X_{n+h} ~ \big| ~ X_{n} \big] \]




证明:

基于 \(X_{n}\) 求 \(\mathbb{E}\big[ \big( X_{n+h} - f(X_{n}) \big)^{2} \big]\) 的最小值,实际上:

\[\mathop{\arg\min}\limits_{f} \mathbb{E}\big[ \big( X_{n+h} - f(X_{n}) \big)^{2} \big] \iff \mathop{\arg\min}\limits_{f} \mathbb{E}\big[ \big( X_{n+h} - f(X_{n}) \big)^{2} ~ \big| ~ X_{n} \big] \]


  • 私以为更严谨的写法是 \(\mathop{\text{argmin}}\limits_{f} ~ \mathbb{E}\Big[\Big(X_{n+h} - f\big( X_{n}\big)\Big)^{2} ~ | ~ \mathcal{F}_{n}\Big]\),其中 \(\left\{ \mathcal{F}_{t}\right\}_{t\geq 0}\) 为 \(\left\{ X_{t} \right\}_{t\geq 0}\) 相关的 natural filtration,but whatever。

等式右侧之部分:

\[\begin{align*} \mathbb{E}\big[ \big( X_{n+h} - f(X_{n}) \big)^{2} ~ \big| ~ X_{n} \big] & = \mathbb{E}[X_{n+h}^{2} ~ | ~ X_{n}] - 2f(X_{n})\mathbb{E}[X_{n+h} ~ | ~ X_{n}] + f^{2}(X_{n}) \\ \end{align*} \]

其中由于:

\[\begin{align*} Var(X_{n+h} ~ | ~ X_{n}) & = \mathbb{E}\Big[ \big( X_{n+h} - \mathbb{E}\big[ X_{n+h}^{2} ~ | ~ X_{n} \big] \big)^{2} ~ \Big| ~ X_{n} \Big] \\ & = \mathbb{E}\big[ X_{n+h}^{2} ~ \big| ~ X_{n} \big] - 2\mathbb{E}^{2}\big[ X_{n+h}^{2} ~ \big| ~ X_{n} \big] + \mathbb{E}^{2}\big[ X_{n+h}^{2} ~ \big| ~ X_{n} \big] \\ & = \mathbb{E}\big[ X_{n+h}^{2} ~ \big| ~ X_{n} \big] - \mathbb{E}^{2}\big[ X_{n+h}^{2} ~ \big| ~ X_{n} \big] \end{align*} \]

which gives that:

\[\implies Var(X_{n+h} ~ | ~ X_{n}) = \mathbb{E}\big[ X_{n+h}^{2} ~ \big| ~ X_{n} \big] - \mathbb{E}^{2}\big[ X_{n+h} ~ \big| ~ X_{n} \big] \]

因此,

\[\begin{align*} \mathbb{E}\big[ \big( X_{n+h} - f(X_{n}) \big)^{2} ~ \big| ~ X_{n} \big] & = Var(X_{n+h} ~ | ~ X_{n}) + \mathbb{E}^{2}\big[ X_{n+h} ~ \big| ~ X_{n}\big] - 2f(X_{n})\mathbb{E}[X_{n+h} ~ | ~ X_{n}] + f^{2}(X_{n}) \\ & = Var(X_{n+h} ~ | ~ X_{n}) + \Big( \mathbb{E}\big[ X_{n+h} ~ \big| ~ X_{n}\big] - f(X_{n}) \Big)^{2} \end{align*} \]

方差 \(Var(X_{n+h} ~ | ~ X_{n})\) 为定值,那么 optimal solution \(m(X_{n})\) 显而易见:

\[m(X_{n}) = \mathbb{E}\big[ X_{n+h} ~ \big| ~ X_{n} \big] \]




此时 \(\left\{ X_{t} \right\}\) 为一个 Stationary Gaussian Time Series, i.e.,

\[\begin{pmatrix} X_{n+h}\\ X_{n} \end{pmatrix} \sim N \begin{pmatrix} \begin{pmatrix} \mu \\ \mu \end{pmatrix}, ~ \begin{pmatrix} \gamma(0) & \gamma(h) \\ \gamma(h) & \gamma(0) \end{pmatrix} \end{pmatrix} \]

那么我们有:

\[X_{n+h} ~ | ~ X_{n} \sim N\Big( \mu + \rho(h)\big(X_{n} - \mu\big), ~ \gamma(0)\big(1 - \rho^{2}(h)\big) \Big) \]

其中 \(\rho(h)\) 为 \(\left\{ X_{t} \right\}\) 的 ACF,因此,

\[\mathbb{E}\big[ X_{n+h} ~ \big| ~ X_{n} \big] = m(X_{n}) = \mu + \rho(h) \big( X_{n} - \mu \big) \]

注意:

若 \(\left\{ X_{t} \right\}\) 是一个 Gaussian time series,则一定能计算 best MSE predictor。而若 \(\left\{ X_{t} \right\}\) 并非 Gaussian time series,则计算通常十分复杂。

因此,我们通常不找 best MSE predictor,而寻找 best linear predictor。




Best Linear Predictor (BLP)

在 BLP 假设下,我们寻找一个形如 \(f(X_{n}) \propto aX_{n} + b\) 的 predictor。

则目标为:

\[\text{minimize: } ~ S(a,b) = \mathbb{E} \big[ \big( X_{n+h} - aX_{n} -b \big)^{2} \big] \]




推导:

分别对 \(a, b\) 求偏微分:

\[\begin{align*} \frac{\partial}{\partial b} S(a, b) & = \frac{\partial}{\partial b} \mathbb{E} \big[ \big( X_{n+h} - aX_{n} -b \big)^{2} \big] \\ & = -2 \mathbb{E} \big[ X_{n+h} - aX_{n} - b \big] \\ \end{align*} \]

令:

\[\frac{\partial}{\partial b} S(a, b) = 0 \]

则:

\[\begin{align*} -2 \cdot & \mathbb{E} \big[ X_{n+h} - aX_{n} - b \big] = 0 \\ \implies & \qquad \mathbb{E}[X_{n+h}] - a\mathbb{E}[X_{n}] - b = 0\\ \implies & \qquad \mu - a\mu - b = 0 \\ \implies & \qquad b^{\star} = (1 - a^{\star}) \mu \end{align*} \]

回代并 take partial derivative on \(a\):

\[\begin{align*} \frac{\partial}{\partial a} S(a, b) & = \frac{\partial}{\partial a} \mathbb{E} \big[ \big( X_{n+h} - aX_{n} - (1 - a)\mu \big)^{2} \big] \\ & = \frac{\partial}{\partial a} \mathbb{E} \Big[ \Big( \big(X_{n+h} - \mu \big) - \big( X_{n} - \mu \big) a \Big)^{2} \Big] \\ & = \mathbb{E} \Big[ - \big( X_{n} - \mu \big) \Big( \big(X_{n+h} - \mu \big) - \big( X_{n} - \mu \big) a \Big)\Big] \\ \end{align*} \]

令:

\[\frac{\partial}{\partial a} S(a, b) = 0 \]

则:

\[\begin{align*} & \mathbb{E} \Big[ - \big( X_{n} - \mu \big) \Big( \big(X_{n+h} - \mu \big) - \big( X_{n} - \mu \big) a \Big)\Big] = 0 \\ \implies & \qquad \mathbb{E} \Big[\big( X_{n} - \mu \big) \Big( \big(X_{n+h} - \mu \big) - \big( X_{n} - \mu \big) a \Big)\Big] = 0 \\ \implies & \qquad \mathbb{E} \Big[\big( X_{n} - \mu \big) \big(X_{n+h} - \mu \big) - a \big( X_{n} - \mu \big) \big( X_{n} - \mu \big) \Big] = 0 \\ \implies & \qquad \mathbb{E} \Big[\big( X_{n} - \mu \big) \big(X_{n+h} - \mu \big) \Big] = a \cdot \mathbb{E} \Big[\big( X_{n} - \mu \big) \big( X_{n} - \mu \big) \Big] \\ \implies & \qquad \mathbb{E} \Big[\big( X_{n} - \mathbb{E}[X_{n}] \big) \big(X_{n+h} - \mathbb{E}[X_{n+h}] \big) \Big] = a \cdot \mathbb{E} \Big[\big( X_{n} - \mathbb{E}[X_{n}] \big)^{2} \Big] \\ \implies & \qquad \text{Cov}(X_{n}, X_{n+h}) = a \cdot \text{Var}(X_{n}) \\ \implies & \qquad a^{\star} = \frac{\gamma(h)}{\gamma(0)} = \rho(h) \end{align*} \]

综上,time series \(\left\{ X_{n} \right\}\) 的 BLP 为:

\[f(X_{n}) = l(X_{n}) = \mu + \rho(h) \big( X_{n} - \mu \big) \]

且 BLP 相关的 MSE 为:

\[\begin{align*} \text{MSE} & = \mathbb{E}\big[ \big( X_{n+h} - l(X_{n}) \big)^{2} \big] \\ & = \mathbb{E} \Big[ \Big( X_{n+h} - \mu - \rho(h) \big( X_{n} - \mu \big) \Big)^{2} \Big] \\ & = \rho(0) \cdot \big( 1 - \rho^{2}(h) \big) \end{align*} \]

标签:mathbb,partial,Linear,big,align,mu,Big,Predictor,Best
From: https://www.cnblogs.com/chetianjian/p/17103664.html

相关文章

  • 附录E示例-LinearPlacement_2
    示例概述意图此场景演示了IfcLinearPlacement与IfcAxi2PlacementLinear和IfcPointByDistanceExpression的组合使用。 先决条件此场景基于以下其他场景:-ProjectSetup_......
  • 附录E示例-LinearPlacement_1
    示例概述意图此场景是沿路线曲线进行局部和线性放置的示例。IfcLinerPlacement定义了依赖于引用空间曲线(通常是IfcAlignmentCurve)的空间点。欧几里德坐标可以根据给定的......
  • 个人翻译Introduction to Linear Algebra, 5th Edition 10.1节(仅用于交流学习,非盈利)
    本书的翻译仅为交流学习!才疏学浅,不当的地方还望指正。请勿于其它用途!PDF文件 链接一:  https://pan.baidu.com/s/1n-Lb_Z5kFEpLC2Z3G292rQ提取码:3rzc 链接二:https......
  • Android RecyclerView实现ViewPager效果,用LinearSnapHelper
    文章目录​​LinearSnapHelper效果​​LinearSnapHelper效果SnapHelper是RecyclerView功能的一种拓展,使RecyclerView滑动行为类似ViewPager,无论怎么滑动最终停留在某页正中......
  • ifc4x3 附录E示例-LinearPlacement_2
    ifc4x3 附录E示例-LinearPlacement_2示例概述意图此场景演示了IfcLinearPlacement与IfcAxi2PlacementLinear和IfcPointByDistanceExpression的组合使用。 先决条件......
  • ifc4x3 附录E示例-LinearPlacement_1
    ifc4x3附录E示例-LinearPlacement_1示例概述意图此场景是沿路线曲线进行局部和线性放置的示例。IfcLinerPlacement定义了依赖于引用空间曲线(通常是IfcAlignmentCurve)的......
  • hdu-4883- (Best Coder) TIANKENG’s restaurant
    TIANKENG’srestaurantTimeLimit:2000/1000MS(Java/Others)    MemoryLimit:131072/65536K(Java/Others)TotalSubmission(s):1622    AcceptedSubmi......
  • Quartz.Net 官方教程 Best Practices
    最佳实践JobDataMap建议只存储基本数据(含String),避免序列化问题作业执行期间,JobDetail和Trgger的底层共用一个JobDataMap实例,因此Trigger的数据会覆盖Job中相同key......
  • [LeetCode] 1626. Best Team With No Conflicts
    Youarethemanagerofabasketballteam.Fortheupcomingtournament,youwanttochoosetheteamwiththehighestoverallscore.Thescoreoftheteamisthe......
  • BEST BUY 百思买DROP SHIP EDI 注册指南
    BestBuy百思买是全球最大的家用电器和电子产品的零售和分销及服务集团。BestBuy企业集团包括BestBuy零售、音乐之苑集团、未来商场公司、MagnoliaHi-Fi、以及热线......