第3章 預測 Forecasting 2020/4/12 第3章 預測 1 © The McGraw-Hill Companies, Inc., 2007 本章重點目標 chapter objective 1. 2. 1. 2. 2020/4/12 列舉好預測中所需要的元素、預測流程的步驟、 定性預測技術、比較定性與定量的預測方法。 描述平均法、趨勢與季節技術及迴歸分析法,兩 種評估與管制預測的方法,選擇預測技術時的主 要考量因素 List the elements of a good forecast, steps in the forecasting processing, qualitative forecasting techniques, compare qualitative and quantitative approaches to forecasting. Describe averaging techniques, trend and seasonal techniques and regression analysis three measures of forecast accuracy; describe evaluating and controlling forecasts; the consideration of major factors when choosing a forecasting technique. 第3章 預測 2 © The McGraw-Hill Companies, Inc., 2010 3.1 導論 Introduction 預測有兩個重要層面Two important aspects of forecasts 需求期望水準:the level of demand expectation 是一個有結構變異的函數,如趨勢性或季節性變異。 A function of some structural variation such as a trend or seasonal variation 預測精確度:the degree of accuracy 2020/4/12 是根據預測者需求、隨機變異和突發狀況,來正確地建 構模型的能力。The ability of building model based on forecasters’ demand, random variation, and unforeseen events. 第3章 預測 3 © The McGraw-Hill Companies, Inc., 2010 預測有兩種用途 Two uses for forecasts 系統規劃 plan the system 包含一些長程規劃。is long-range plan. 使用系統的規劃 plan the use of the system 指一些中短程規劃。 Refers to short and intermediate range planning. 2020/4/12 第3章 預測 4 © The McGraw-Hill Companies, Inc., 2010 3.2 各種預測技術的共同特徵 Features common to all forecasts technique 預測技術的共同特徵: four common features: 1. 預測技術通常假設過去存在的因果系統未來將持續。 Assume underlying causal system existed in the past will continue to exist in the future 2. 預測很少完美無缺。 Not perfect 3. 整體預測會比單一預測更為精確。 Forecasts for groups tend to be more accurate than individual items. 4. 隨著預測的時間週期愈廣,預測精確度會減少。 Forecast accuracy decreases as the forecasting horizon increases 2020/4/12 第3章 預測 5 © The McGraw-Hill Companies, Inc., 2010 3.3 優良預測的因素 Elements of a good forecast 優良預測的因素包括: Elements of a good forecast: 1. 有時間性。should be timely. 2. 必須精確,並應該說明其精確度。should be accurate and describe the degree of accuracy. 3. 必須具備可靠性。 should be reliable. 4. 必須具備有意義的計量單位。should be meaningful units. 5. 必須書面化。should be in writing. 6. 技術必須容易了解、容易使用。technique should be easy to understand and use. 7. 必須符合成本效益。should be cost-effective. 2020/4/12 第3章 預測 6 © The McGraw-Hill Companies, Inc., 2010 3.4 預測流程的步驟 The steps in forecasting process 預測流程的六大基本步驟如下:Six steps in forecasting process: 1. 決定預測的目的與時機。Decide the purpose and timing of the forecast. 建立預測所需的時間幅度。Built a time horizon. 3. 選擇預測技術。Select a forecast technique. 4. 蒐集與分析適當的資料。Collecting and analyze 2. proper data. 準備預測。Prepare forecast. 6. 檢視預測。Monitor the forecast. 5. 2020/4/12 第3章 預測 7 © The McGraw-Hill Companies, Inc., 2010 3.5 預測的精確度 Forecast accuracy 預測誤差(error)是針對給定的期數,其實際 值與預測值的差。 Forecast error is the difference between the occurred value and the predicted value for a given time period. 誤差=實際值-預測值 et = At - Ft 2020/4/12 第3章 預測 8 © The McGraw-Hill Companies, Inc., 2010 彙整預測精準度 Summarizing forecast accuracy 常用的衡量方法主要有三種:Three commonly used measures: 平均絕對偏差 (mean absolute deviation, MAD) 實際值: Actual 預測值: Forecast 均方誤差 (mean squared error, MSE) 平均絕對百分比誤差 (mean absolute percent error, MAPE) 2020/4/12 第3章 預測 9 © The McGraw-Hill Companies, Inc., 2010 3.6 預測技術 forecast technique 常用的預測技術,分為定性法與定量法。 Two general approaches to forecasting: qualitative and quantitative. 1. 定性法: 由軟性的資訊所組成,例如人的因素、個人意見、直覺。 Qualitative approach: includes soft information, such as human factors, personal opinions, hunches. 通常缺乏精確的數字描述。Generally it is difficult to quantify. 2. 定量法: 涵蓋客觀的歷史資料,或開發以因果變數做預測的關聯性模型。 Quantitative techniques involve either the projection of historical data or the development of associative methods that attempt to use causal variables to make a forecast 由客觀分析或硬性資料所組成。 Quantitative approach: includes analyzing objective or hard data. 2020/4/12 第3章 預測 10 © The McGraw-Hill Companies, Inc., 2010 三種預測技術 Three forecasting technique 判斷預測法 (judgmental forecasts) 根據主觀的分析。Based on subjective analysis 時間序列預測法(time-series forecasts) 根據過去的經驗來了解未來,利用歷史資料。 Based on past experience to understand future, using historical data. 關聯性模型(associative model) 利用包含一個以上可解釋的變數方程式來預測 需求。 Include one or more explanatory variables to predict the demand. 2020/4/12 第3章 預測 11 © The McGraw-Hill Companies, Inc., 2010 3.7 以判斷與意見為基礎的預測 Forecasts based on judgment and opinion 主管的意見 Executive opinions 高層管理者一同進行預測。The upper level managers work together to develop a forecast. 銷售員的意見 Salesforce opinions 以銷售╱客服人員為資訊來源。 Based on The information sources from the sales staff / customer service staff. 消費者調查 Consumer surveys 組織設計問卷,並以抽樣方式直接從顧客身上獲得資訊。 Organization sets consumer surveys to sample consumer opinions and get the information directly from consumers. 德菲法(Delphi method) 反覆進行流程以取得一致的預測結果。An iterative process to get a consensus forecast. 2020/4/12 第3章 預測 12 © The McGraw-Hill Companies, Inc., 2010 3.8 以時間序列資料為基礎的預測 Forecasts based on time-series data 時間序列(time series) 指間隔固定時間並依時間順序排列的觀測值。 A timeordered sequence of observations taken at regular time intervals 假設未來的序列值能經由過去的序列值估計。 Assume that future values of the time-series can be estimated from past values of the time-series 2020/4/12 第3章 預測 13 © The McGraw-Hill Companies, Inc., 2010 時間序列基本行為 The behaviors of time-series 趨勢(trend):指資料長期隨時間 向上或向下的移動。 Is a long-term upward or downward movement in the data. 季節性(seasonality):指短期、規則 的變異,通常與日期或一天中的時間 因素有關。 Is short-term, regular variations, generally related to factors 循環(cycle):指持續一年以上的 波狀變異。 Cycles are wavelike variations of more than one year’s duration. 2020/4/12 第3章 預測 14 © The McGraw-Hill Companies, Inc., 2010 時間序列基本行為The behaviors of time-series 不規則變異(irregular variations):指由不尋常的情況所產 生,其無法反映典型行為,應盡可能確認出這些資料並移除。 Irregular variations are due to unusual circumstances and does not reflect typical behavior, so these should be identified and removed from the data. 隨機變異(random variations):指考量所有其他活動狀況 之後,所留下的殘餘變異。Random variations are residual variations left after considering all other behaviors. 2020/4/12 第3章 預測 15 © The McGraw-Hill Companies, Inc., 2010 時間序列分析方法 Time-series analysis method 天真預測法 Naive forecast 平均法分析技術 Averaging techniques 2020/4/12 第3章 預測 16 © The McGraw-Hill Companies, Inc., 2010 天真預測法(Naive forecast) 使用時間序列的前一期數值當做預測基礎, 可用於穩定序列、季節性變異或趨勢。Uses a single previous value of a time series as the basis for a forecast, it can be used with a stable series, with seasonal variations, or with trend. 優點 advantage 缺點 disadvantage 不需任何成本、方法簡單迅速; 無需分析資料,故容易了解。 No cost, quick, easy to prepare, easy to understand 2020/4/12 第3章 預測 不能提供高精確度的預測。 Can not provide highly accurate forecasts 17 © The McGraw-Hill Companies, Inc., 2010 平均法分析技術 Averaging techniques 歷史資料通常包含部分的隨機變異或白噪音(white noise), 平均法分析技術可使資料的變異變小。Historical data contain a certain amount of random variation, or white noise. Average techniques smooth variations. 適合此法的三種型態three possible patterns Data forecast step change gradual change 三種平均法技術:three techniques for averaging 1. 2. 3. 2020/4/12 ideal 移動平均法。 Moving average 加權移動平均法。 Weighted moving average 指數平滑法。Exponential smoothing 第3章 預測 18 © The McGraw-Hill Companies, Inc., 2010 移動平均法 Moving average 使用數個近期的實際資料來產生預測值。 averages a number of the most recent actual values in generating a forecast 其中 Ft =第 t 期的預測值 where forecast for time period t MAn = n 期的移動平均 n period moving average At–1 =第 t - 1 期的實際值 actual value in period t-1 n =移動平均的期數(資料點) number of period in the moving average 【請參照本章之例題2】 refer to example 2 in this chapter 優點 advantage 缺點 disadvantage 容易計算與了解。Easy to compute 各期的資料權重都相同。All and understand values are weighted equally 第3章 預測 2020/4/12 19 © The McGraw-Hill Companies, Inc., 2010 移動平均法 Moving average 說明: 移動平均法的資料傾 向於平滑,而且變動 較實際資料落後。 A moving average forecast tends to smooth and lag changes in the data. 需求: Demand 期數:Period 2020/4/12 第3章 預測 20 © The McGraw-Hill Companies, Inc., 2010 加權平均法(Weighted average) 和移動平均法很類似,不同之處是愈近期的資料,給定的權重愈大 (權重總和必為 1.00)。similar to moving average, difference is the most recent values in a time series are given more weight in computing a forecast. (the sum of weights must equal to 1.00) 其中 Wt =期間 t 之權重 (weight for period t) ,Wt – 1 =期間 t - 1 之權重(weight for period t-1) At =期間 t 實際值(actual value for period t) , At – 1 =期間 t - 1 之實際值(actual value for period t-1) 【參照本章之例題3】 refer to example 3 in this chapter: 優點 advantage 缺點 disadvantage 與移動平均法相比,其能反映較近 期的事情。Over a simple moving average, 權重的選擇有點武斷,通常需使 用試誤法才能找出適當的權重。The more reflective the most recent occurrences. choice of weights is arbitrary and general use trial and error to find a suitable weights. 2020/4/12 第3章 預測 21 © The McGraw-Hill Companies, Inc., 2010 指數平滑法(Exponential smoothing) 以前一個預測值為基礎,再加上預測誤差的百分 比。Based on the previous forecast plus a percentage of difference. 其中 where Ft =第t 期的預測值 forecast for period t Ft - 1 =前一期的預測值(亦即第 t - 1 期)forecast for the previous period α =平滑常數(代表預測誤差的百分比)smoothing constant (a percentage of difference) At – 1 =前一期的實際需求或銷售量 actual demand or sales from the previous period 上述公式亦可寫作:the formula above also can be written as: 2020/4/12 第3章 預測 22 © The McGraw-Hill Companies, Inc., 2010 指數平滑法 Exponential smoothing 平滑常數α愈接近 0,則預測誤差調整的速度愈平滑。 需求: Demand 期數:Period 實際值: Actual value 優點 advantage 缺點 disadvantage 計算容易,僅需改變α 即可變更權 為一複雜的加權平均法。 Complicate method for weighted 重。Easy to compute, change α can average change weights 第3章 預測 2020/4/12 23 © The McGraw-Hill Companies, Inc., 2010 其他預測方法 Other forecasting methods 焦點預測 focus forecasting 由柏納‧史密斯所發展。 (developed by Bernard T Smith) 包含多種預測方法的運用,擁有最高精確度的方法習慣 被用來做為預測下個月的方法。Use several forecasting methods and has highest accuracy to be used for the next month forecast. 【參照本章之例題4】 refer to example 4 in this chapter 散佈模型 diffusion models 2020/4/12 推行新產品或服務時,無法使用歷史資料進行預測。此時可 利用數學散佈模型,採用預測生產率和延續使用其他已確定 產品來替代。散佈模型廣泛地使用於行銷和估算投資新科技 的價值。Introduced new products or services can use mathematical diffusion models instead of historical data, especially widely used in marketing and assessing the value of 第3章 預測 24 investing in new technologies. © The McGraw-Hill Companies, Inc., 2010 趨勢分析技術 Techniques for trend 當趨勢產生時,有兩種重要的技術可以建 立預測:There are two important techniques to develop forecast when the trend is present: 使用趨勢方程式。 Use trend equation 2. 另一個則是指數平滑法的延伸。An extension of exponential 1. smoothing 2020/4/12 第3章 預測 25 © The McGraw-Hill Companies, Inc., 2010 線性趨勢方程式(linear trend equation) 其中where Ft =第 t 期的預測值 forecast for period t a 為 t = 0 時的 Ft 值 value of Ft at t=0 b =斜率 slope of the line t =從 t = 0 之後欲推測的期數 specified number of time periods from t=0 利用下列兩個方程式,可從歷史資料計算直線的係數 a 與 b:Using the following two equations can compute the coefficients of the line a and b from historical data. 其中 n =期數 (number of periods) y =時間序列值(value of the time series) 【參照本章之例題5】 refer to example 5 in this chapter 2020/4/12 第3章 預測 26 © The McGraw-Hill Companies, Inc., 2010 趨勢調整指數平滑法 (trend-adjusted exponential smoothing) 當時間序列顯示出線性趨勢時使用,或稱為雙重平滑法。 It can be used when a time series exhibits a linear trend, or called double smoothing. 趨勢調整預測值(trend-adjusted forecast, TAF) 其中where St = 前一個預測值加上平滑誤差(previous forecast plus smoothed error) Tt = 目前趨勢估計 (current trend estimate) 且 and 其中 α 與β 為平滑常數 ( where α andβ are smoothing constants) 【參照本章之例題6】refer to example 6 in this chapter 第3章 預測 2020/4/12 27 © The McGraw-Hill Companies, Inc., 2010 季節性分析技術 Seasonality techniques 在時間序列中的季節性,是以實際值偏離序列平 均值的量來表示。Seasonality is expressed in terms of the amount that actual values deviate from the average value of a series 季節性分析技術的模型 Models of seasonality 加法模型 Additive 季節性以數量表示,即時間序列之平均值加上或減去某一數量。 Expressed as a quantity that gets added or subtracted from the time-series average to incorporate seasonality 乘法模型Multiplicative 季節性是以百分比表示,即 時間序列值乘以平均趨勢值 的某一百分比。 Seasonality is expressed as a percentage, the value of a series multiply a percentage of the average (or trend) amount . 2020/4/12 第3章 預測 28 © The McGraw-Hill Companies, Inc., 2010 預測的季節相對性 Seasonal relatives in forecasting 兩種不同的使用方式:Two ways using seasonal relatives: 消除時間序列的季節性 To deseasonalize data 1. 將季節性因素從資料中移除,以得到更清楚的非季節性因素圖。 Done in order to get a clearer picture of the nonseasonal components of the data series. 將每個資料點除以相對應的季節相對性。 Divide each data point by its seasonal relative. 在預測中加入季節性 To incorporate seasonality in a forecast 2. 使用趨勢方程式,求出所要求期間的趨勢估計值。 Using a trend equation to obtain trend estimates for desired periods 將這些趨勢估計值乘以對應的季節相對性,再加上季節性。 Add seasonality by multiplying these trend estimates by the corresponding seasonal relative 2020/4/12 第3章 預測 29 © The McGraw-Hill Companies, Inc., 2010 預測的季節相對性 Seasonal relatives in forecasting 計算季節相對性 computing seasonal relatives 中心點移動平均法(centered moving average)。 【參照本章之例題8】Refer to example 8 in this chapter 說明: 3 期中心點移動平均 緊跟著實際資料 explanation: Centered MA3 moving average closely tracks the data 2020/4/12 第3章 預測 30 © The McGraw-Hill Companies, Inc., 2010 循環分析技術 Techniques for cycles 最常用的方法是解釋性的:尋找另一個與感興趣 之變數相關的前置變數(leading variable)。 Explanatory approach: search for another variable that relates to, and leads, the variable of interest. 若組織能與前置變數建立高度相關性,則能夠發 展出描述其關係的方程式來進行預測。 If a high correlation can be established with a leading variable, it can develop an equation that describes the relationship, enabling forecasts to be made. 兩個變數間相關性愈高,則預測精確的機會就愈 高。 The higher the correlation, the better the chances that the forecast will be on target. 2020/4/12 第3章 預測 31 © The McGraw-Hill Companies, Inc., 2010 關聯性預測技術 Associative forecasting techniques 關聯性技術所使用的變數必須與感興趣 之變數預測值相關。 Associative techniques are using variables that related to predict values of the variable of interest. 關聯性技術 建立出歸納預測變數效果的方程式。 Develop an equation summarizes the effects of predictor variables. 2020/4/12 主要分析方法:迴歸。Major analysis method: regression 第3章 預測 32 © The McGraw-Hill Companies, Inc., 2010 簡單線性迴歸 Simple linear regression 最簡單與最廣泛使用的迴歸形式為兩個變數之間 的線性關係。 The simplest form of regression that involves a linear relationship between two variables. 線性迴歸的目的是求出一條直線方程式,使每個 資料點與此線的垂直距離平方和最小。The object of simple linear regression is to obtain an equation of a straight line that minimizes the sum of squared vertical deviations from the line (i.e., the least squares criterion) 【注意:通常以 y 軸表示 要預測的(相依)變數值, 以 x 軸表示預測(獨 立)變數值。】 2020/4/12 第3章 預測 y as predicted (dependent) variable, x as predicted (independent) variable 33 © The McGraw-Hill Companies, Inc., 2010 最小平方直線(least squares line) 其中 yc =預測(相依)變數 predicted (dependent) variable x =預測(獨立)變數 predicted (independent) variable b =直線的斜率 slope of the line a 為 x = 0 時,yc 的值(即 y 截距的高度) value of yc when x = 0 以下的方程式可以計算出係數 a 與 b:equations computing the coefficients a and b 其中 n =成對觀察點的數目(number of paired observations) 【參照本章之例題9】refer to example 9 in this chapter 2020/4/12 第3章 預測 34 © The McGraw-Hill Companies, Inc., 2010 線性迴歸線之精確度 Accuracy of a linear regression line 預測散佈在迴歸線附近的資料點之數量。A measure of the scatter of points around a regression line. 散佈程度可以用標準估計誤差解釋。 The scatter ca be summarized using the standard error of estimate. 其中 Se = 標準估計誤差 y =每個資料點的 y 值 n =資料點總數 2020/4/12 standard error of estimate y value of each data point number of data points 第3章 預測 35 © The McGraw-Hill Companies, Inc., 2010 相關性(correlation) 衡量兩變數之間關係的強度與方向。A measure of the strength and direction of relationship between two variables 相關係數r 的範圍為-1.00~+1.00 ,0 即表示兩 變數間幾乎沒有線性關係。 Ranges between -1.00 and +1.00. Zero means little linear relationship between two variables. 相關係數的平方,r2 (square of the correlation coefficient) 用來衡量線性迴歸對數據的解釋能力。A measure of the percentage of variability in the values of y that is “explained” by the independent variable . 2020/4/12 值為 0~1.00 。 Ranges between 0 and 1.00 第3章 預測 36 © The McGraw-Hill Companies, Inc., 2010 應用線性迴歸分析的要點 comments on using linear regression analysis 簡單迴歸分析的應用應滿足下列假設: Simple Linear Regression Assumptions 在直線附近的變異是隨機的。 Variations around the line are random 在直線附近的偏差應為常態分配。 Deviations around the average 1. 2. value (the line) should be normally distributed 只在觀測值的範圍內進行預測。 Predictions are made only within 3. the range of observed values 滿足上列假設後,為了得到最佳結果: 1. 經常將資料繪成圖形,驗證線性關係是否恰當。Always plot the line to verify that a linear relationships is appropriate 2. 資料也許會受時間影響 。若顯示出模式,則使用時間 序列分析替代迴歸分析,或把時間當做多元迴歸分析 獨立變數。 The data may be time-dependent. If pattern appears, use analysis of time series or use time as an independent variable in a multiple regression analysis 3. 低度相關可能暗示有其他更為重要的變數。A small correlation may indicate that other variables are important. 2020/4/12 第3章 預測 37 © The McGraw-Hill Companies, Inc., 2010 曲線與多元迴歸分析 curvilinear and multiple regression analysis 包含一個以上的預測變數 ─用多元迴歸分析。 More than one predictor ─ use curvilinear regression 出現非線性關係 ─用曲線分析。 Non-linear relationship ─ use multiple regression 2020/4/12 第3章 預測 38 © The McGraw-Hill Companies, Inc., 2010 3.10 預測的檢視 Monitoring the forecast 預測誤差產生的原因:the reasons cause forecast errors 1. 因為 (a) 重要變數的刪除,(b) 預測模型無法處理的變 數變動或遷移,或 (c) 新變數的出現,而造成預測模型 也許不適當。Due to (a) the omission of an important variable (b) forecast model can not deal with variable change or shift (c) new variable appears 2. 惡劣氣候或其他自然現象。Sever weather or other natural phenomena 3. 誤用預測技術,或錯誤地解釋預測結果。Use wrong forecast technique or misinterpret the result 4. 資料存在隨機變異。Random variations in the data 偵測非隨機誤差的工具:detecting nonrandomness tools 1. 2. 2020/4/12 管制圖(control chart) 追蹤訊號(tracking signal) 第3章 預測 39 © The McGraw-Hill Companies, Inc., 2010 管制圖control chart 誤差分配的標準差估計值 即為MSE 的平方根。 An estimate of the standard deviation of the distribution of errors is the square root of MSE. 管制圖基本假設: basic assumption of control chart 當誤差為隨機時,誤差就會是常態分配,且平均值在 0 的附近。 When errors are random, it will be normal distribution around a mean of zero. 求得管制上限與管制下限: to get upper control limit and the lower control limit 其中 z = 來自於平均值的標準差 (the number of standard deviations form the mean) 結合上述兩個公式,可得:combining two formulas to get control limit: 【參照本章之例題11】refer to example 11 2020/4/12 第3章 預測 40 © The McGraw-Hill Companies, Inc., 2010 追蹤訊號(tracking signal) 累積預測誤差與相關的平均絕對偏差(即 MAD) 的比,目的偵測誤差的偏差(bias)。 The cumulative forecast error to the average absolute error, purpose ─ to detect bias. MAD 可以用指數平滑法更新: 實際值 actual 誤差值 forecast 【參照本章之例題12】refer to example 12 2020/4/12 第3章 預測 41 © The McGraw-Hill Companies, Inc., 2010 管制圖法與追蹤訊號法 control chart and tracking signal 管制圖法通常優於追蹤訊號法。 追蹤訊號法的缺點是使用累積誤差,個別誤差 可能會被遮蔽,使較大的正負誤差相互抵銷。 在管制圖法中,每個誤差需個別判斷。 The control chart method is better than tracking signal method: The weakness of the tracking signal is to use cumulative errors, ignore individual error, so large positive and negative values cancel each other. 2020/4/12 In control chart, every error need to judged individually. 第3章 預測 42 © The McGraw-Hill Companies, Inc., 2010 3.11 選擇預測技術 choosing a forecasting technique 選擇預測技術的兩個重要因素為 two important factors choosing a forecasting technique 成本 cost 精確度 accuracy 最佳的預測是管理者所認定的精確度與成本之最佳組合。 The best forecast is the best combination of accuracy and cost believed by management. 其他考慮的因素包括 2020/4/12 other considering factors 歷史資料之可得性 available historical data 電腦軟體之可得性 available computer software 蒐集、分析資料並籌劃預測資料之時間 time to gather data, analyzing data and prepare forecast 第3章 預測 43 © The McGraw-Hill Companies, Inc., 2010 第2篇 預測 – 完 敬請接續第3篇系統設計 系統設計包含以下章節: 第4 章 產品與服務設計 第5 章 產品與服務之策略性產能規劃 第6 章 製程選擇與設施佈置 第7 章 工作系統設計 第8 章 地點規劃與分析 2020/4/12 第3章 預測 44 © The McGraw-Hill Companies, Inc., 2007