達人手札 v2.0 輕描淡寫|不求奢華

Forecast-平均數分析


平均數分析技術

歷史資料通常包含部份的隨機變異或白噪音,平均數分析技術可使資料變異變小

  1. 天真預測法

    使用時間序列的前一期數值當做預測基礎,可用於穩定序列、季節性變異或趨勢

    優點 缺點
    不需任何成本、方法,簡單迅速,無需分析資料,故容易了解 不能提供高精確度的預測

    Example:

    好比夏天買冷氣、風扇的人會變多,冬天買暖器的人會變多,每一年的趨勢幾乎都一樣

  1. 移動平均法

    公式:

    $F_t$ = $MA_n$ = $\frac{\sum A_i}{n}$

    where, i = “Age” of data (i=1,2,3…)

    n = number of periods in moving average(移動平均期數)

    $A_i$ = actual value with age I 第i期的實際質

    $F_t$ = 第t期的預測值,$MA_n$ = n期的移動平均

    優點 缺點
    容易計算與了解 各期資料權重都相同

    Example:

    以下有前5年的實際資料,請用最後三期之數據推估第6年

    Period (t) Age Visits Forecast
    1 5 15908  
    2 4 15504  
    3 3 14272  
    4 2 13174 15228
    5 1 10022 14317
    6     12489

    F6 = $MA_3$ = (14272 + 13174 + 10022) / 3 = 12489.3

  2. 加權移動平均法

    公式:

    $F_t$ = $MA_n$ = $\sum w_iA_i$

    優點 缺點
    與移動平均法相比,較能反應近期的事情 權重的選擇有點武斷,通常需使用試誤法才能找出適當權重

    Example:

    以下有前5年的實際資料,請用最後三期之數據推估第6年,越靠近近期,權重越高

    Period (t) Age Visits Weights Forecast
    1 5 15908    
    2 4 15504    
    3 3 14272    
    4 2 13174 0.2  
    5 1 10022 0.3  
    6     0.5 11818

    F6 = 14272 * 0.2 + 13174 * 0.3 + 10022 * 0.5 = 11818

  3. 平滑指數

    公式:

    $F_t$ = $F_{t - 1}$ + $\alpha (A_{t - 1} - F_{t - 1})$

    where, $F_t$ = Forecast for period t 第t期的預測值

    $F_{t - 1}$ = Forecast for period t - 1 前一期預測值

    $\alpha$ = Smoothing constant 平滑常數 (代表預測誤差百分比)

    $A_{t - 1}$ = Actual demand or sales in period t - 1 (前一期實際需求或銷售量)

    Example:

    以下有前5期的實際資料,請透過這5期的數據,採用平滑指數推估第6年,預測誤差百分比30%

    $\alpha$ = 0.3     Error
    Period (t) Actual (Visits) Forecast (Actual - Forecast)
    1 15908 -  
    2 15504 15908 -404
    3 14272 15786.8 -1514.8
    4 13174 15332.4 -2158.4
    5 10022 14684 -4662.9

    $F_3$ = 15908 + 0.3(15504 - 15908) = 15786.8


上一篇 Forecast-簡介

Comments

Content