a). We remind that the formula for the forecast in exponential smoothing method has the form(https://towardsdatascience.com/simple-exponential-smoothing-749fc5631bed):
"f_t=\\alpha d_{t-1}+(1-\\alpha)f_{t-1}"
We set "\\alpha=0.3" and receive the following:
We will consider two cases:
We will get the following values for the first 15 days:
For the 15th day we received "f_{15}=35,4386".
2.We can also set "d_1=32" (value for the last 14th day) and "f_1=\\frac1{14}\\sum_{i=1}^{14}d_i=34.7143"
Then, "f_2=0.3\\cdot32+0.7\\cdot34,7143=33,9". This is the forecast for the 15th day.
b). We remind that the aim is to find such line "l_t=at+b" that "S=\\sum_{t}[y_t-(at+b)]^2" is minimized. After substitution of all values we receive: "S=17120-7512a-972b+1015a^2+210ab+14b^2"
We solve the system "\\frac{\\partial S}{\\partial a}=2030a+210b-7512=0" , "\\frac{\\partial S}{\\partial b}=28b+210a-972=0" . The latter is solved via: "a=\\frac{222}{455}" , "b=\\frac{2826}{91}" .
It is the global minimum.
We substitute the values "t=15," "t=16," "t=17" in "at+b" and receive:
"l_{15}\\approx38.374" ; "l_{16}\\approx38.862" ; "l_{17}\\approx39.35" . It is the approximation for the next 3 days.
The Mean Square Error is: "S=\\frac{1}{14}\\sum_{t=1}^{14}[y_t-(\\frac{222}{455}t+\\frac{2826}{91})]^2=\\frac{44294}{3185}\\approx13.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
Leave a comment