当前位置:网站首页>介紹一下實現建模中可能用到的時間序列預測之線性二次移動平均,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提供了大量能使我們快速便捷地處理數據的函數和方法。
边栏推荐
- MySQL Performance Monitoring and SQL statements
- SVN 安装配置
- 使用‘百家饭’自动生成API调用:JS部分进展(二)
- Detailed explanation of MySQL fuzzy query
- Win10 start FTP service and set login authentication
- Nacos2.x.x start error creating bean with name 'grpcclusterserver';
- consul微服务治理中心踩坑
- Fabric.js 上划线、中划线(删除线)、下划线
- 10年程序员职业生涯感悟—写给正在迷茫的你
- 最牛X的CMDB系统
猜你喜欢
![[Beiyou orchard microprocessor design] 10 serial communication serial communication notes](/img/61/b4cfb0500bbe39ed6a371bb8672a2f.png)
[Beiyou orchard microprocessor design] 10 serial communication serial communication notes

再获认可!知道创宇入选“业务安全推进计划”首批成员单位

QT连接MySql数据查询失败

Svn installation configuration

Jasperreports - print PDF (project tool)

栖霞市住建局和消防救援大队开展消防安全培训

Redis knowledge mind map
![Compréhension approfondie de l'expérience de port série stm32 (registre) [Tutoriel de niveau nounou]](/img/b2/f09e220918a85b14a1993aa85f7720.png)
Compréhension approfondie de l'expérience de port série stm32 (registre) [Tutoriel de niveau nounou]

滑动窗口

.net中,日志组件 Nlog,SerialLog, Log4Net的用法
随机推荐
mysql性能監控和sql語句
Uncaught reflectionexception: class view does not exist
Implementing MySQL master-slave replication in docker
最牛X的CMDB系统
laravel 安装报错 Uncaught ReflectionException: Class view does not exist
C language -- operators and expressions
sliding window
Using reflection to export entity data to excel
10年程序员职业生涯感悟—写给正在迷茫的你
[work details] March 18, 2020
Common regular expressions - tool classes (mobile number, email, QQ, fax)
Will updating a large amount of data in Oracle cause the undo space to explode
一键部署属于自己的社区论坛
Redis (basic) - learning notes
你好!正向代理!
Cereals Mall - Distributed Advanced
TCP面试
02 linked list of redis data structure
Plookup table in appliedzkp zkevm (8)
CEPH operation and maintenance common instructions