a). We remind that the formula for the forecast in exponential smoothing method has the form(https://towardsdatascience.com/simple-exponential-smoothing-749fc5631bed):
ft=αdt−1+(1−α)ft−1
We set α=0.3 and receive the following:
We will consider two cases:
- We start from the first day. I.e., d1=28, f1=141∑i=114di and we will use the formula for the rest.
We will get the following values for the first 15 days:
For the 15th day we received f15=35,4386.
2.We can also set d1=32 (value for the last 14th day) and f1=141∑i=114di=34.7143
Then, f2=0.3⋅32+0.7⋅34,7143=33,9. This is the forecast for the 15th day.
b). We remind that the aim is to find such line lt=at+b that S=∑t[yt−(at+b)]2 is minimized. After substitution of all values we receive: S=17120−7512a−972b+1015a2+210ab+14b2
We solve the system ∂a∂S=2030a+210b−7512=0 , ∂b∂S=28b+210a−972=0 . The latter is solved via: a=455222 , b=912826 .
It is the global minimum.
We substitute the values t=15, t=16, t=17 in at+b and receive:
l15≈38.374 ; l16≈38.862 ; l17≈39.35 . It is the approximation for the next 3 days.
The Mean Square Error is: S=141∑t=114[yt−(455222t+912826)]2=318544294≈13.91
The latter was computed via the following formula in Maple:
S:=evalf(((28-(a*1+b))^2+(29-(a*2+b))^2+(33-(a*3+b))^2+(31-(a*4+b))^2+(37-(a*5+b))^2+(34-(a*6+b))^2+(36-(a*7+b))^2+(43-(a*8+b))^2+(41-(a*9+b))^2+(32-(a*10+b))^2+(34-(a*11+b))^2+(37-(a*12+b))^2+(39-(a*13+b))^2+(32-(a*14+b))^2)/14);
Comments