当前位置:网站首页>介紹一下實現建模中可能用到的時間序列預測之線性二次移動平均,Excel的簡單操作
介紹一下實現建模中可能用到的時間序列預測之線性二次移動平均,Excel的簡單操作
2022-06-26 11:12:00 【嚴同學正在努力】
一、線性移動平均法是什麼?
二次移動平均法是對時間序列平均值再進行第二次移動平均,利用第一次移動平均值和第二次移動平均值構成時間序列的最後一個數據為依據建立線性模型進行預測。
1 .主要特點
移動平均對原序列有修勻或平滑的作用,使得原序列的上下波動被削弱了,而且平均的時距項數N越大,對數列的修勻作用越强。
移動平均的項數不宜過大。
2.不足
- 加大移動平均法的期數(即加大n值)會使平滑波動效果更好,但會使預測值對數據實際變動更不敏感;
- 移動平均法要由大量的過去數據的記錄;
3.計算公式
S t 1 = Y t + Y y − 1 + . . . . + Y t − n + 1 n S_t^1=\dfrac{Y_t+Y_y-_1+....+Y_t-_n+_1}{n} St1=nYt+Yy−1+....+Yt−n+1
S t 2 = S t 1 + S t − 1 1 + . . . . . S t − n + 1 1 n S_t^2=\dfrac{S_t^1+S_t-_1^1+.....S_t-_n+_1^1}{n} St2=nSt1+St−11+.....St−n+11
F t + T = a t + b t T F_t+_T=a_t+b_tT Ft+T=at+btT
a t = 2 S t 1 − S t 2 a_t=2S_t^1-S_t^2 at=2St1−St2
b t = 2 n − 1 ( S t 1 − S t 2 ) b_t=\dfrac{2}{n-1}(S_t^1-S_t^2) bt=n−12(St1−St2)
其中 :
S t 1 S_t^1 St1是第一次平均移動的值
S t 2 S_t^2 St2是第二次平均移動的值
二、操作步驟
1. 准備數據
我們引入年份-供水量數據,如圖2.1所示,
2. 進行第一次移動平均
具體操作如圖2.2所示。PS:注意輸出區域的比特置。
得出的結果如圖2.3所示
3. 在第一次移動平均的基礎上進行二次移動平均
如圖2.4所示操作,間隔仍然選擇3,
得出的結果如圖2.5所示
4. 代入公式進行預測
前面我們有公式:
F t + T = a t + b t T F_t+_T=a_t+b_tT Ft+T=at+btT
a t = 2 S t 1 − S t 2 a_t=2S_t^1-S_t^2 at=2St1−St2
b t = 2 n − 1 ( S t 1 − S t 2 ) b_t=\dfrac{2}{n-1}(S_t^1-S_t^2) bt=n−12(St1−St2)
假設我們要預測2022年的供水量,那麼就可以把數據代入公式
a t = 2 ∗ 19274.33 − 18669.67 a_t=2*19274.33-18669.67 at=2∗19274.33−18669.67
b t = 2 3 − 1 ( 19274.33 − 18669.67 ) b_t=\dfrac{2}{3-1}(19274.33-18669.67) bt=3−12(19274.33−18669.67)
F ( 2000 + 20 ) = 2 ∗ 19274.33 − 18669.67 + 2 3 − 1 ( 19274.33 − 18669.67 ) F_(2000+20)=2*19274.33-18669.67+\dfrac{2}{3-1}(19274.33-18669.67) F(2000+20)=2∗19274.33−18669.67+3−12(19274.33−18669.67)
求得F=20483.65
三 總結
以上就是今天要講的內容,本文僅僅簡單介紹了二次移動平均法在Excel的簡單操作,而Excel提供了大量能使我們快速便捷地處理數據的函數和方法。
边栏推荐
- 在Oracle中update大量数据会不会导致undo空间爆掉
- Wangeditor uploading local video modification
- 指南针软件买股票进行交易安全吗?怎么开户买股票
- Openresty overview
- loggie 编码以及换行符测试
- matlab 编程实例: 如何统计元胞数组中元素的数量
- Using reflection to export entity data to excel
- That is to say, "live broadcast" is launched! One stop live broadcast service with full link upgrade
- Easyx----- C language implementation 2048
- MySQL performance monitoring and SQL statements
猜你喜欢

Grain Mall - distributed Foundation

滑动窗口

Implementing MySQL master-slave replication in docker

Easyx-----c语言实现2048

Fabric. JS upper dash, middle dash (strikethrough), underline

Machine learning SVM - Experimental Report
![[deep learning theory] (6) recurrent neural network RNN](/img/33/e270b08e7748a6e740eb618ed10c9a.gif)
[deep learning theory] (6) recurrent neural network RNN

Nuxt. JS - learning notes

9、 Beautify tables, forms, and hyperlinks

Sqli-labs靶场1-5
随机推荐
MySQL Performance Monitoring and SQL statements
SVN 安装配置
FastRCNN
FastRCNN
QT connection MySQL data query failed
Implementing MySQL master-slave replication in docker
Fabric. JS upper dash, middle dash (strikethrough), underline
Uncaught reflectionexception: class view does not exist
Laravel admin hidden button, and set button display, default sequence, form form form non modifiable value
[deep learning theory] (6) recurrent neural network RNN
Consumer microservice Governance Center stepping on the pit
Fabric.js 上划线、中划线(删除线)、下划线
Redis的最佳实践?看完不心动,算我输!!
Easyx----- C language implementation 2048
April 13, 2021 interview with beaver family
Laravel-admin 登录添加图形验证码
matlab 编程实例: 如何统计元胞数组中元素的数量
Easyx-----c语言实现2048
Wangeditor uploading local video modification
工作汇报(2)