time series models Flashcards
exponential smoothing equation
st - the baseline at time period t
xt- the observed vlaue (response)
st = axt + (1-a)st-1
0<a<1
exponential smoothing tradeoff
a -> 0 there is a lot of randomness in the system, fluctuations are due to randomness, therefore yesterdays baseline is probably a good indicator of todays baseline
a-> 1 not much randomness in the system, fluctuations are probably due to changes in baseline
How to start exponential smoothing?
S1 or baseline = x1 or first value recorded
What does exponential smoothing not deal with?
-doesn’t deal with trends or cyclical variations
trends
the value is increasing or decreasing over time
What is time series data?
that in which the same response is known for many time periods
cyclical patterns
ex - annual temp cycles
-weekly sales cycles
-daily blood pressure cycles
add trend to exp smoothing calculation
Tt: trend at time period t
st = alphaxt + (1-alpha)(st-1+Tt-1)
How do you calculate trend?
just like you do for the baseline
Tt = Beta(St- St-1) + (1-Beta)Tt-1
Trend initial condition
T1 (trend) = 0
What two methods can you use to deal with cyclical patterns?
additive and multiplicative
Seasonalities additional variables
L: length of cycle
Ct: the mutiplicative seasonality for time t
(inflate or deflate the observed observation)
Baseline formula w/ trend and seasonality (multiplicative)
st = alphaxt/Ct-L + (1-alpha)(st-1+Tt-1)
How do we update seasonality? What is the initial value?
Ct = gamma(xt/St)+ (1-gamma)Ct-L
-no initial cyclic effect b/c it can’t be measured until the end of the first season
How would you interpret a seasonality value of 1.1 for weekly cyclical data? How would this change your results?
on that day, the value is 10% higher just because it is that day.
if you sold 550 items, 500 was your baseline and 50 was because it was sunday
Multiplicative seasonality starting condition
-start by multiplying by 1(no seasonality/cyclic effect) for the first L values of C
exponential smoothing also sometimes called
single, double or triple exponential smoothing depending on how many aspects like trend and seasonality you include
triple exponential smoothing with base equation plus trend and seasonality is also called?
winters method or holt-winters
What does exponential smoothing do?
peaks and valleys are smoothed out
st = alphaxt + (1-alpha)st-1
ex- alph = 1/2
when xt is high, St is not as high, its pulled down by (1-alpha)st-1
when xt is low, St is not as low, it’s pulled up by (1-alpha)st-1
Why is exponential smoothing exponential?
St-1 can be rewritten as
st-1 = alphaxt-1 + (1-alpha)st-2
and when you substitute the value, (1-alpha) multiplies the St-1 substitution so that you get (1-alpha )alpha xt-1 + (1-alpha )^2 St-2
and so on, all the way back to the first value in the time series
Which time periods contribute to current baseline estimate? Which time periods contribute the most?
Every past observation, all the previous data is baked in to St-1
The more recent time periods contribute the most, because we take (1-alpha)^exponent that increases by 1 with each time period
exponential smoothing forecasting baseline
original equation - st = alphaxt + (1-alpha)st-1
prediction
st+1 = alphaxt+1 + (1-alpha)st
xt+1 is unknown, so our best guess is St or the previous periods baseline
doing that calculation we get our forecast…
Ft+1 = alphaSt + (1-alpha)st, so Ft+1 = St
Ft+k = St, k = 1,2,…. the estimate remains the same for all future time periods
forecast error gets higher farther into the future
exponential smoothing forecasting including trend
we just include the trend
the best estimate of the next baseline is our current baseline estimate
best trend estimate is our most current trend estimate
therefore
our forecast for time t+1 is
Ft+1 = St+Tt
the trend is the same going forward
exponential smoothing forecasting including trend and multiplicative seasonality
the best estimate of the next time periods seasonal factor is
Ct+1 = CT(t+1) - L or the multiplicative seasonality the last cycle at this time
Forecast
Ft+1 = (St+Tt) C(T+1) - L and remains the same going forward