Sunteți pe pagina 1din 27

CH8-Q1

a Simple Linear Regression for forecasting monthly demand

Month Month # # of Oil


Changes
X Y X*Y X2 Y2
January 1 41 41 1 1,681
February 2 46 92 4 2,116
March 3 57 171 9 3,249
April 4 52 208 16 2,704
May 5 59 295 25 3,481
June 6 51 306 36 2,601
July 7 60 420 49 3,600
August 8 62 496 64 3,844
Total 36 428 2,029 204 23,276
ΣX ΣY Σ XY Σ X2 Σ Y2

=36/8 4.5

�  ̅=(∑128=428/8 53.5
▒�)/�
�  ̅= (∑128▒𝑦)/�
Simple Linear Regression for forecasting monthly demand
𝑦=�+��
where,
Y = dependent variable
X = independent variable
a = y-intercept
b = slope
�=(�𝛴�𝑦−∑128▒�𝛴𝑦)/(�∑128▒�^2 −(𝛴�)^2 )
=8*2029-36*428 2.45
8*204-36^2
�=𝑦  ̅−��  ̅
=53.5-2.45*4.5 42.48

b Calculate forecast for Sep, Oct & Nov


𝑦=�+��
Forecast
Month X a b Y
September 9 42.48 2.45 64.55
October 10 42.48 2.45 67.00
November 11 42.48 2.45 69.45
CH8-Q2
Current (Y) Proposed (X)
Y X X*Y X2 Y2
3.0 3.1 9.3 9.61 9.0
3.1 3.9 12.09 15.21 9.6
3.0 3.4 10.2 11.56 9.0
3.6 4.0 14.4 16.00 13.0
3.8 3.6 13.68 12.96 14.4
2.7 3.6 9.72 12.96 7.3
2.7 3.6 9.72 12.96 7.3
3.1 3.1 9.61 9.61 9.6
2.7 2.9 7.83 8.41 7.3
3.3 3.6 11.88 12.96 10.9
3.2 4.1 13.12 16.81 10.2
2.1 2.6 5.46 6.76 4.4
3.0 3.1 9.3 9.61 9.0
2.6 2.8 7.28 7.84 6.8
Total 41.90 47.40 143.59 163.26 127.79
ΣY ΣX Σ XY Σ X2 Σ Y2

�  ̅=(∑128
=47.4/14 3.16
▒�)/�

�  ̅=(∑128▒𝑦)/�
=41.9/14 2.79

a Linear Regression - Relationship to forecast Y from X


𝑦=�+��

Y = dependent variable
X = independent variable
a = y-intercept
b = slope

�=(�𝛴�𝑦−∑128▒�𝛴𝑦)/(�∑128▒�^2 −(𝛴�)^2 )
=14*143.6-47.4*41.9 0.62
14*163.3-47.4^2

�=𝑦  ̅−��  ̅ =2.79-0.62*3.16 0.83

As per the regression the relation between the two values are y = 0.83 + 0.62 x
Calculate Correlation Coffecient r to measure strength and direction of linear relationship between
b x&y

-1 ≤ r ≤ 1
If r is close to -1 or 1 implies very strong relationship and Standard Error is low
=14*143.59-47.4*41.9 0.67
SQRT[(14*163.26-47.4^2)(14*127.79-41.9^2)]

The Correlation Coefficient (Multiple R) measures the strength of a linear


relationship between two variables. The correlation coefficient can be any
value between -1 and 1, and its absolute value indicates the relationship
strength. The larger the absolute value, the stronger the relationship: r 0.67

The Coefficient of Determination (R Square) , which is used as an indicator


of the goodness of fit. It shows how many points fall on the regression line.
The R2 value is calculated from the total sum of squares, more precisely, it is
the sum of the squared deviations of the original data from the mean. r2 0.45

Standard Error of estimate (1-r) shows the precision of the regression


analysis. The smaller the number, the more certain you can be about your
regression equation. SE 0.33

Based on the aforesaid, strength of relationship between Y and X is moderate


CH8-Q3

Thousands
Cost per of Gallons
Thousand Gallon Sold
n Y X X*Y X2 Y2
1 1,015.00 416.90 423,153.50 173,805.61 1,030,225.00
2 973.00 472.50 459,742.50 223,256.25 946,729.00
3 1,046.00 250.00 261,500.00 62,500.00 1,094,116.00
4 1,006.00 372.10 374,332.60 138,458.41 1,012,036.00
5 1,058.00 238.10 251,909.80 56,691.61 1,119,364.00
6 1,068.00 258.60 276,184.80 66,873.96 1,140,624.00
7 967.00 597.00 577,299.00 356,409.00 935,089.00
8 997.00 414.00 412,758.00 171,396.00 994,009.00
9 1,044.00 263.20 274,780.80 69,274.24 1,089,936.00
10 1,008.00 372.00 374,976.00 138,384.00 1,016,064.00
Total 10,182.00 3,654.40 3,686,637.00 1,457,049.08 10,378,192.00
ΣY ΣX Σ XY Σ X2 Σ Y2

�  ̅=(∑128 =3654.4 365.44


▒�)/� 10.00

�  ̅=(∑128▒𝑦)/� =10182 1018.2


10.00

a Linear Regression - Relationship to forecast Y from X


𝑦=�+��

Y = dependent variable
X = independent variable
a = y-intercept
b = slope

(�𝛴�𝑦−∑128▒�𝛴𝑦)/(�∑128▒�^2 −(𝛴�)^2 )
=10*3686637-3654.4*10182 (0.28)
10*1457049.08-3654.4^2

�=𝑦  ̅−��  ̅ =1018.2-(-0.28)*365.44 1,120.52

As per the regression the relation between the two values are y = 1,120 - 0.28 x

b Calculate Correlation Coffecient r to measure strength and direction of linear relationship between x & y
-1 ≤ r ≤ 1
If r is close to -1 or 1 implies very strong relationship and Standard Error is low
=10*3686637-3654.4*10182
SQRT[(10*1457049.08-3654.4^2)(10*10378192-10182^2)]

The Correlation Coefficient (Multiple R) measures the strength of a linear relationship


between two variables. The correlation coefficient can be any value between -1 and 1, and
its absolute value indicates the relationship strength. The larger the absolute value, the r
stronger the relationship:

The Coefficient of Determination (R Square) , which is used as an indicator of the goodness


of fit. It shows how many points fall on the regression line. The R 2 value is calculated from
the total sum of squares, more precisely, it is the sum of the squared deviations of the
original data from the mean. r2

Aforesaid indicates a fairly strong negative relationship. Increases in costs explain 89% of the decreases in gallons sold

c Estimate manufacturing cost per gallon for 325,000 gallons

𝑦=�+��
Forecast
X a b Y
Estimate 325 1,120.52 (0.28) 1,029.52

The cost per gallon is $1.03


(0.94)

(0.94)

0.89

allons sold
CH8-Q6

a Forecast for weeks 6 through 10 by using a 4-week moving average

forecast for weeks 6


through 10 by using Absolute Error
Week Rentals Notes
a 4-week moving
average

1 15
2 16
3 24
4 18
5 23
6 20 20.25 0.25
7 24 21.25 2.75
8 27 21.25 5.75
9 18 23.50 5.50
10 16 22.25 6.25
Forecast for week 11 is
b 11 21.25 21.25 rentals
Mean Absolute
c Average 4.10 Deviation (Error) or
MAD for Week 10
CH8-Q9
�_(𝑡+1)=�_𝑡+𝛼(𝐷_𝑡−
�_𝑡 )
where α = smoothening constant or parameter
0≤α≤1
If anyone of F1, FT-1….FT is not given then use F1 = D1

a b
Three-Month Weighted Moving Average Forecast Sample exponential smoothing forecast
Forecast Absolute Forecast (SES - Absolute
Month Sales (WMA-3) Absolute Error Percent Error Squared Error α=0.6) Absolute Error Percent Error Squared Error
January 3,000.00 3,200.00
February 3,400.00 3,080.00
March 3,700.00 3,272.00
April 4,100.00 3,500.00 600.00 14.63% 360,000.00 3,528.80 571.20 13.93% 326,269.44
May 4,700.00 3,862.50 837.50 17.82% 701,406.25 3,871.52 828.48 17.63% 686,379.11
June 5,700.00 4,350.00 1,350.00 23.68% 1,822,500.00 4,368.61 1,331.39 23.36% 1,772,604.66
July 6,300.00 5,125.00 1,175.00 18.65% 1,380,625.00 5,167.44 1,132.56 17.98% 1,282,684.91
August 7,200.00 5,875.00 1,325.00 18.40% 1,755,625.00 5,846.98 1,353.02 18.79% 1,830,670.48
September 6,400.00 6,675.00 275.00 4.30% 75,625.00 6,658.79 258.79 4.04% 66,972.74
October 4,600.00 6,687.50 2,087.50 45.38% 4,357,656.25 6,503.52 1,903.52 41.38% 3,623,374.55
November 4,200.00 5,600.00 1,400.00 33.33% 1,960,000.00 5,361.41 1,161.41 27.65% 1,348,865.16
December 3,900.00 4,625.00 725.00 18.59% 525,625.00 4,664.56 764.56 19.60% 584,556.00
Mean Absolute Deviation (Error) 1,086.11 1,033.88
Mean Absolute Percent Error 21.64% 20.49%
Mean Squared Error 1,437,673.61 1,280,264.12

c According to MAD, Exponential method is accurate, since its MAD is less than 3-month moving method
d According to MAPE, Exponential method is accurate, since its MAPE is less than 3-month moving method.
e According to MSE, Exponential method is accurate, since its MSE is less than 3-month moving method.
CH8-Q16

Avg Yr 3 *
Avg Seasonal
Factor

Average Year 3
Seasonal Seasonal Seasonal
Quarter Year 1 Year 2 Expected Year 3 Forecast
Factor Factor Factor Sales

1 45 0.20 67 0.24 0.22 101.18


2 339 1.50 444 1.58 1.54 712.21
3 299 1.32 329 1.17 1.25 576.60
4 222 0.98 283 1.01 0.99 460.01
Total 905 1,123 1,850
Average 226.25 280.75 462.50
y

y
20,800,000.00
1.368613

90.9090909091

Positive relationship
0<r≤1 => b is +ve
If x ↑ then y ↑
Negative relationship
-1≤r<0 => b is -ve
If x ↑ then y ↓
No relationship
r=0
If y ↑↓ then x no change => b=∞
If x ↑↓ then y no change => b=0
y
y=a+bx

x
y=a+bx

y
y=a+bx

y
y=a+bx
x
is 10 million
Y X
Sales (thousands Advertising
Month
of units) (thousands of $)
1 264 2.5
2 116 1.3
3 165 1.4
4 101 1
5 209 2
SUMMARY OUTPUT

Regression Statistics
Multiple R 0.9795648
R Square 0.9595471
Adjusted R Square 0.9460628
Standard Error 15.602736
Observations 5

ANOVA
df SS MS F Significance F
Regression 1 17323.6639118 17323.664 71.160378 0.0034959687
Residual 3 730.336088154 243.44536
Total 4 18054

Coefficients Standard Error t Stat P-value Lower 95% Upper 95%Lower 95.0%
Intercept -8.134986 22.3524728989 -0.363941 0.7400393 -79.270531017 63.000559 -79.27053
Advertising (thousand109.22865 12.9484398881 8.4356611 0.003496 68.0209354567 150.43636 68.020935
Upper 95.0%
63.000559
150.43636
Dispersion % |
Actual - of Forecast Error|
Forecast Error /Actual
Blank Actual Forecast Error E |Error| Error 2 % Error Error - �  ̅
Period 1 39 41 −2 2 4 5.13%
Period n 37 43 −6 6 36 16.22%
Average Σ Actual / n
CFC Cumulative Forecast Error or Bias Error Σ Error
Σ Error / n or
AFE Avg Forecast Error or Mean Bias �  ̅ CFE / n
MAD Mean Absolute Deviation (Error) Σ |Error| / n
MSE Mean Squared Error Σ Error 2 / n
Σ % Error /
MAPE Mean Absolute Percent Error n

σ Standard Deviation of Errors

SE Standard Error
σ Standard
Deviation of
Errors
(Error -�  ̅ )2

√𝑀𝑆�
Blank Actual Forecast Error Absolute Error Error cap 2 Absolute Pct Error
Past period 1 39 41 −2 2 4 5.13%
Past period 2 37 43 −6 6 36 16.22%
Past period 3 55 45 10 10 100 18.18%
Past period 4 40 50 −10 10 100 25%
Past period 5 59 51 8 8 64 13.56%
Past period 6 63 56 7 7 49 11.11%
Past period 7 41 61 −20 20 400 48.78%
Past period 8 57 60 −3 3 9 5.24%
Past period 9 56 62 −6 6 36 10.71%
Past period 10 54 63 −9 9 81 16.67%
Totals 501 Blank −31 81 879 170.62%
Average 50.1 Blank −3.1 8.1 87.9 17.06%
Blan (Bias
Next period forecast 0 (M A D) (M S E) (M A P E)
k )
Blank Blank Blank Blank std err 9.883 Blank

8.33333 8.1
2.88675

25
E
-25 -23.125 -1.875 -23.125 534.76563
20 21.875 -1.875 21.875 478.51563
15 16.875 -1.875 16.875 284.76563
-20 -18.125 -1.875 -18.125 328.51563
-20 -18.125 -1.875 -18.125 328.51563
20 21.875 -1.875 21.875 478.51563
-40 -38.125 -1.875 -38.125 1453.5156
35 36.875 -1.875 36.875 1359.7656
-15 0 0 5246.875

-1.875

65
749.55357 27.377976
Y X X*Y X2 Y2
Total
ΣY ΣX Σ XY Σ X2 Σ Y2
�  ̅=(∑128▒𝑦)/��  ̅=(∑128▒ n = # of
�)/� objects

a Linear Regression - Relationship to forecast Y from X


𝑦=�+�� Y = dependent variable
X = independent variable
a = y-intercept
b = slope
�=(�𝛴�𝑦−∑128▒�𝛴𝑦)/(�∑128▒�^2 −(𝛴�)^2 )
�=𝑦  ̅−��  ̅

Calculate Correlation Coffecient r to measure strength and direction of linear


b relationship between x & y
If r is close to -1 or 1 implies very strong relationship and
Standard Error is low
-1 ≤ r ≤ 1

The Correlation Coefficient (Multiple R) measures the strength of a linear


relationship between two variables. The correlation coefficient can be any value
between -1 and 1, and its absolute value indicates the relationship strength. The
larger the absolute value, the stronger the relationship. If 0 then no relationship
r

The Coefficient of Determination (R Square) , which is used as an indicator of the


goodness of fit. It shows how many points fall on the regression line. The R 2 value is
calculated from the total sum of squares, more precisely, it is the sum of the
squared deviations of the original data from the mean. 0 ≤ r2 ≤ 1
r2

Standard Error of estimate (1-r) shows the precision of the regression analysis. The
smaller the number, the more certain you can be about your regression equation.
SE

Total Variation = Explained Variation + Unexplained Variation


Exponential Smoothing weighted moving average that
calculates the average of a time series by implicitly giving
recent demands more weight than earlier demands
Note: If F1, Ft-1….Ft is not given then use F1=D1

Relationship between smoothening parameter


α and moving avg time period n

or Ft+1 =

Linear trent regression equation is Yt = a + bt

Replace x by time period t in SLR model

Stable demand-use lower α or larger n


Dynamic demand--use higher α or smaller n

12
43.2

1900
633.33333

171
57

Multiplicative seasonal method - Calculate for each


Annual Demand of an Sum of all demands for all
year= seasons for that year
Average demand for Annual Demand
each season= # of seasons/year
Seasonal Factor (Index) Actual Demand for the season
for a season= Avg demand for the season
Σ Seasonal Factors for the
Avg Seasonal Factor season over the year
(Index) for a season=
# of years (for the season)
Avg Forecast for each Yearly forecast
season= # of seasons per year

Seasonal Forecast for a Avg Forecast for each season *


Avg Seasonal Factor (Index) for
season= a season
Ft + α(Dt - Ft) α

𝛼~2/(�+1)

30 42 182
2 2 2
15 21 91
7

∆y y2-y1
Slope = or
∆x x2-x1
-1.5≤TS≤1.5 is the desired TS range, else model needs to be changed

S-ar putea să vă placă și