Advanced Quantitative Methods 360-301 • CEGEP, Montreal

Corrected exercises: time series and forecasting (360-301)

These ten corrected exercises cover the analysis of series measured over time, in the CEGEP course Advanced Quantitative Methods, 360-301: decomposition into components, smoothing with moving averages, seasonal indices, seasonal adjustment (deseasonalization), trend and forecasting.

The thread of the set fits in one sentence: in a time series the observations are not independent, and almost everything you think you read directly, a rise, a drop, a correlation, is first of all an effect of the calendar or of a shared trend.

Three pitfalls are named outright: a seasonal variation reported as if it were a result, a moving average whose order is not the seasonal period (exercises 2 and 8), and two growing series correlated at 0.97 with no connection whatsoever (exercises 7 and 8).

10 corrected exercises • 100 points • 150 minutes

This chapter is part of 360-301, every chapter with its set and sheet Before you start Revision sheet: the traps and the method for this chapter

Self-checking set Type your answers and check them question by question: the page tells you right or wrong before you open the solution. With an account, every answer right on the first try earns points, and your right answers stay filled in when you come back.

Course recap

  • • Four components: TREND, CYCLE (variable period), SEASONALITY (fixed, known period), IRREGULAR.
  • • MULTIPLICATIVE model Y=T×S×C×IY=T\times S\times C\times I when the seasonal swing grows with the level; ADDITIVE model when it is constant.
  • • Moving average: the order must be a MULTIPLE of the seasonal period, 4 for quarterly data, 12 for monthly data.
  • • EVEN order: the average falls between two periods, so it must be CENTRED by averaging two consecutive moving averages.
  • • A moving average of order pp loses p2\dfrac{p}{2} values at each end, including the most recent one.
  • • Seasonal index: the ratio of each value to the mean of its year, then the mean of the ratios for the same season. The pp indices must add up to pp, otherwise you RENORMALIZE.
  • • To deseasonalize: divide the raw value by the index of its season, in a multiplicative model.
  • • Forecast: fit the trend, extend it, then multiply by the seasonal index. Check: the forecasts for one year add up to pp times the trend value.
  • • Growth at a constant rate: it is the LOGARITHM of the series that is linear, and the slope on a logarithmic scale gives the rate.
  • • AUTOCORRELATION: neighbouring observations resemble each other. It makes standard errors too small, so you declare significant what is not.
  • • Effective sample size of an autocorrelated series: neff≈n1−ρ1+ρn_{eff}\approx n\dfrac{1-\rho}{1+\rho}.
  • • Spurious trend correlation: two growing series are correlated because they share time. Correlate the CHANGES, never the levels.

Part A: the basics (/50)

Exercise 1: The four components of a time series

A series measured over time is not read like a sample: successive observations resemble each other, and the overall movement breaks down into four pieces, each of which calls for different treatment.

Quarterly enrolment at a CEGEP over three years. Year 1: 2100, 1500, 2400, 1800. Year 2: 2200, 1560, 2520, 1880. Year 3: 2320, 1640, 2640, 1960.

2468101214120014001600180020002200240026002800quarter number, over three years
  • a) Name and describe the four components of a time series.
  • b) Identify the trend and the seasonality in the series, giving the numbers that show them.
  • c) Distinguish the CYCLE from SEASONALITY.
  • d) Write the MULTIPLICATIVE model and the ADDITIVE model, and say which one fits here.
  • e) Why can't you compare the third quarter of a year directly with the fourth?

Type your answers, the page tells you right or wrong 0/16

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) Trend, cycle, seasonality, irregular: fixed period for the season, variable for the cycle
  • b) Annual means 19501950, 20402040, 21402140, that is +95+95 per year; third quarter always the highest
  • c) The season has a fixed period and a repeating pattern; the cycle has a variable period and amplitude
  • d) Yt=Tt×St×Ct×ItY_{t}=T_{t}\times S_{t}\times C_{t}\times I_{t} or the sum; here the multiplicative, the gap going from 900900 to 10001000
  • e) Because their seasonal weights differ: a drop between them is NORMAL
a)

The TREND is the underlying long-term movement, here the growth in enrolment. The CYCLE is an oscillation lasting several years, tied to the economic climate, whose period is not fixed. SEASONALITY is a pattern with a FIXED, known period, here four quarters. The IRREGULAR component is what is left over, unpredictable: a snowstorm, a strike, a change in regulations.

b)

The trend shows in the annual means: 2100+1500+2400+18004=1950\dfrac{2100+1500+2400+1800}{4}=1950, then 2040, then 2140, a steady rise of about 95 students per year. The seasonality shows in the shape repeated within each year: the third quarter is always the highest, around 2400 to 2640, the second always the lowest, around 1500 to 1640, and the pattern recurs in all three years.

c)

Both are oscillations, but SEASONALITY has a FIXED period set by the calendar, and its pattern repeats almost identically: fall term, winter term, summer term. The CYCLE has a VARIABLE period, from a few years to ten or so, and an irregular amplitude: a recession pushes CEGEP enrolment up, a recovery brings it down, with no way of saying in advance when. That is why we routinely deseasonalize and never “decycle”: the cycle cannot be predicted.

d)

MULTIPLICATIVE model: Yt=Tt×St×Ct×ItY_{t}=T_{t}\times S_{t}\times C_{t}\times I_{t}, where the seasonal effect is a percentage of the trend. ADDITIVE model: Yt=Tt+St+Ct+ItY_{t}=T_{t}+S_{t}+C_{t}+I_{t}, where the seasonal effect is a gap in units. The multiplicative model fits here: the gap between the high quarter and the low quarter goes from 900 in the first year to 1000 in the third, so it grows with the level of the series. A seasonal gap that is proportional calls for the multiplicative model; a constant gap would call for the additive one.

e)

Because the two quarters do not carry the same seasonal weight: the third is structurally high and the fourth structurally average, so a drop between them is NORMAL and says nothing about the health of the institution. Comparing two consecutive quarters only makes sense after deseasonalization. The usual alternative in the financial press is to compare a quarter with the SAME quarter of the previous year, which neutralizes the season but costs twelve months of responsiveness.

Tick the exercises you have done or want to review: a free account, no password, keeps your ticks and your right answers from one visit to the next, tells you which chapter to tackle next and lets you ask for the exercise you are missing. Create your space, an email is enough.

Exercise 2: Smoothing with a moving average

To see the trend, you have to wipe out the season. A moving average whose order equals the seasonal period does exactly that: each window contains one complete season.

2468101214120014001600180020002200240026002800quarter number, over three years
  • a) Compute the moving average of order 4 of the first four quarters, then of quarters 2 to 5.
  • b) Why choose order 4 for quarterly data?
  • c) How many values do you lose at the ends with a moving average of order 4?
  • d) A moving average of EVEN order raises a problem of position. What is it, and how is it fixed?
  • e) What would happen with a moving average of order 3 on these data?

Type your answers, the page tells you right or wrong 0/13

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) 78004=1950\dfrac{7800}{4}=1950 and 79004=1975\dfrac{7900}{4}=1975
  • b) Because each window of four quarters contains each season exactly once
  • c) Two at each end, four in all: eight smoothed points remain
  • d) The mean belongs to position 2.52.5; you centre it by averaging two windows: 1962.51962.5 at quarter 3
  • e) Order 3 leaves some seasonality: 20002000 then 19001900, a gap of 100100 that is not a trend
a)

First four quarters: 2100+1500+2400+18004=78004=1950\dfrac{2100+1500+2400+1800}{4}=\dfrac{7800}{4}=1950. Quarters 2 to 5: 1500+2400+1800+22004=79004=1975\dfrac{1500+2400+1800+2200}{4}=\dfrac{7900}{4}=1975. The smoothed series rises gently, from 1950 to 1975, whereas the raw series went from 1500 to 2200 over the same quarters: all the seasonal movement has disappeared.

b)

Because each window of four quarters contains each season exactly ONCE: one fall term, one winter term, one summer term, one intersession. The sum of the seasonal effects is therefore the same from one window to the next, and it cancels in the comparison. With any other order, the windows would not contain the same seasons and the smoothing would leave a seasonal residue. For monthly data, you would use order 12.

c)

You lose two values at each end, four in all out of twelve: a moving average of even order pp loses p2\dfrac{p}{2} values on each side. Eight smoothed points remain. This is a major drawback in practice: the moving average is blind precisely to the most recent period, the one the decision-maker cares about.

d)

The mean of quarters 1 to 4 belongs to the middle of the window, that is, position 2.5, which matches no quarter. You CENTRE it by averaging two consecutive moving averages: 1950+19752=1962.5\dfrac{1950+1975}{2}=1962.5 then belongs to quarter 3. This is the centred moving average of order 4, the one every statistical agency uses on quarterly data.

e)

A moving average of order 3 would mix three seasons out of four and leave a good part of the seasonal pattern in place: the smoothed series would still oscillate. On our data, the window of quarters 1 to 3 gives 2100+1500+24003=2000\dfrac{2100+1500+2400}{3}=2000 and the window of quarters 2 to 4 gives 1500+2400+18003=1900\dfrac{1500+2400+1800}{3}=1900, a gap of 100 that has nothing to do with a trend: it is a leftover of the season. The rule has no exceptions: the order of the smoothing must be a MULTIPLE of the seasonal period.

2468101214120014001600180020002200240026002800quarter number, over three yearsmoving average of order 4

Exercise 3: Seasonal indices

A seasonal index says by how much, in percent, a quarter departs from the average level of its year. You get it by dividing each value by the mean of its year, then averaging the ratios for the same season.

  • a) Compute the four ratios for the first year.
  • b) Compute the average seasonal indices of the four quarters, given that the ratios for the first quarter in the three years are 1.0769, 1.0784 and 1.0841.
  • c) Check that the four indices add up to 4. Why must they?
  • d) Interpret the index of the second quarter.
  • e) Deseasonalize the second quarter of the first year and the third quarter of the third year.

Type your answers, the page tells you right or wrong 0/14

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) 1.07691.0769, 0.76920.7692, 1.23081.2308 and 0.92310.9231, adding up to 44
  • b) 1.07981.0798, 0.76680.7668, 1.23321.2332 and 0.92020.9202
  • c) Their sum is 44: otherwise the season would add level to the series. If not, renormalize
  • d) The second quarter is structurally 23.3%23.3\% below the average level of its year
  • e) 15000.7668≈1956\dfrac{1500}{0.7668}\approx 1956 and 26401.2332≈2141\dfrac{2640}{1.2332}\approx 2141
a)

Mean of year 1: 1950. Ratios: 21001950≈1.0769\dfrac{2100}{1950}\approx 1.0769; 15001950≈0.7692\dfrac{1500}{1950}\approx 0.7692; 24001950≈1.2308\dfrac{2400}{1950}\approx 1.2308; 18001950≈0.9231\dfrac{1800}{1950}\approx 0.9231. Their sum is exactly 4, which is automatic since each value is divided by the mean of the four.

b)

First quarter: 1.0769+1.0784+1.08413≈1.0798\dfrac{1.0769+1.0784+1.0841}{3}\approx 1.0798. Repeating the same calculations for the other quarters: second, ≈0.7668\approx 0.7668; third, ≈1.2332\approx 1.2332; fourth, ≈0.9202\approx 0.9202. Averaging over the three years removes most of the irregular component: that is the point of this second step.

c)

1.0798+0.7668+1.2332+0.9202=4.00001.0798+0.7668+1.2332+0.9202=4.0000. It must equal 4 because the indices are ratios to the mean: if their sum exceeded 4, the season would add level to the series, which is absurd. When the sum departs from 4 because of rounding or the irregular component, you RENORMALIZE by multiplying each index by 4sum obtained\dfrac{4}{\text{sum obtained}}.

d)

An index of 0.7668 means that the second quarter sits structurally 23.3% BELOW the average level of its year. This is not a drop, it is a permanent feature of the academic calendar, and it will recur next year. A release announcing a “29% plunge in enrolment in the second quarter” would be describing the calendar, not the institution.

e)

Second quarter of year 1: 15000.7668≈1956\dfrac{1500}{0.7668}\approx 1956. Third quarter of year 3: 26401.2332≈2141\dfrac{2640}{1.2332}\approx 2141. The deseasonalized values are thus close to the respective annual means, 1950 and 2140, which is the check to make: once the season is removed, only the trend and a little irregular variation should remain.

Exercise 4: Trend and forecasting

Once the season is isolated, you fit a line to the trend, extend it, then put the season back. This is the complete chain of elementary forecasting.

123451800190020002100220023002400195020402140year
  • a) Fit a line to the three annual means 1950, 2040 and 2140, coding the years 1, 2 and 3.
  • b) Forecast the quarterly mean for the fourth year.
  • c) Forecast each of the four quarters of the fourth year.
  • d) Check that the four forecasts add up to four times the forecast mean.
  • e) What reservations come with this forecast?

Type your answers, the page tells you right or wrong 0/13

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) y^=1853.33+95x\hat{y}=1853.33+95x
  • b) 1853.33+380=2233.331853.33+380=2233.33 students per quarter
  • c) 24122412, 17131713, 27542754 and 20552055
  • d) 89348934 against 4×2233.33=8933.334\times 2233.33=8933.33: automatic, the indices adding up to 44
  • e) Only three points, no break considered, no uncertainty quantified
a)

x‾=2\overline{x}=2 and y‾=1950+2040+21403=61303≈2043.33\overline{y}=\dfrac{1950+2040+2140}{3}=\dfrac{6130}{3}\approx 2043.33. Covariance sum: (−1)(1950−2043.33)+0+(1)(2140−2043.33)=93.33+96.67=190\left(-1\right)\left(1950-2043.33\right)+0+\left(1\right)\left(2140-2043.33\right)=93.33+96.67=190. Sum of squares of the xx deviations: 1+0+1=21+0+1=2. Slope: 1902=95\dfrac{190}{2}=95. Intercept: 2043.33−95×2=1853.332043.33-95\times 2=1853.33. Line: y^=1853.33+95x\hat{y}=1853.33+95x.

b)

Year 4: y^=1853.33+95×4=1853.33+380=2233.33\hat{y}=1853.33+95\times 4=1853.33+380=2233.33 students per quarter on average.

c)

Multiply the trend by each seasonal index. First quarter: 2233.33×1.0798≈24122233.33\times 1.0798\approx 2412. Second: 2233.33×0.7668≈17132233.33\times 0.7668\approx 1713. Third: 2233.33×1.2332≈27542233.33\times 1.2332\approx 2754. Fourth: 2233.33×0.9202≈20552233.33\times 0.9202\approx 2055.

d)

Sum of the four forecasts: 2412+1713+2754+2055=89342412+1713+2754+2055=8934, and 4×2233.33=8933.334\times 2233.33=8933.33. The agreement, up to rounding, is automatic since the indices add up to 4. It is the final check on any seasonal forecast, and it catches index errors.

e)

Three reservations. First, the line is fitted on only THREE points: the trend is very poorly estimated, and there is only one degree of freedom left to judge the fit. Second, extending a trend assumes that nothing changes, which rules out by construction any break, reform, program closure or demographic shock; yet these breaks are precisely what the decision-maker cares about. Third, no uncertainty is quantified here: a serious forecast comes with an interval, and that interval widens quickly as you move away from the data. A one-year forecast is reasonable; at five years it is decorative.

123451800190020002100220023002400195020402140yeary = 1853.33 + 95xforecast: 2233.33

Exercise 5: Growth rates and the logarithmic scale

A trend is not always a straight line. When growth is proportional, it is the LOGARITHM of the series that is linear, and the logarithmic scale becomes the correct way to read it.

  • a) Compute the average annual growth rate between the annual means 1950 and 2140, over two intervals.
  • b) Compare with the linear model of slope 95: what does each predict for the tenth year?
  • c) On a graph with a logarithmic scale, what does growth at a constant rate look like?
  • d) Two series grow, one by 10 units a year, the other by 3% a year. Which one eventually overtakes the other? Illustrate.
  • e) How can you tell visually, on an ordinary scale, that growth is exponential?

Type your answers, the page tells you right or wrong 0/14

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) 21401950−1≈4.76%\sqrt{\dfrac{2140}{1950}}-1\approx 4.76\% per year
  • b) Linear 28032803, exponential ≈2965\approx 2965: a gap of 162162 after ten years
  • c) A straight line, whose slope directly measures the growth rate
  • d) The constant-rate one: 200200 against 134134 at 10 years, but 900900 against 10641064 at 80 years
  • e) Constant differences: linear. Constant ratios: exponential. Here 9090 and 100100, 1.04621.0462 and 1.04901.0490
a)

Two intervals separate the first and the third year. (1+t)2=21401950≈1.09744\left(1+t\right)^{2}=\dfrac{2140}{1950}\approx 1.09744, so 1+t=1.09744≈1.047591+t=\sqrt{1.09744}\approx 1.04759 and t≈4.76%t\approx 4.76\% per year. Note that the total rise of 9.74% divided by 2 would give 4.87%, a little too high: the geometric mean is always smaller than the arithmetic mean.

b)

LINEAR model: 1853.33+95×10=2803.331853.33+95\times 10=2803.33. EXPONENTIAL model: starting from 1950 in year 1, 1950×1.047599≈1950×1.5203≈29651950\times 1.04759^{9}\approx 1950\times 1.5203\approx 2965. The gap thus reaches 162 students in the tenth year, whereas the two models were indistinguishable over the three observed years. This is the fundamental problem of extrapolation: two models that fit the past equally well diverge in the future, and nothing in the data allows you to choose between them.

c)

A STRAIGHT LINE. A constant rate means that the ratio of one value to the next is constant, so the DIFFERENCE of the logarithms is too: ln⁡(yt+1)−ln⁡(yt)=ln⁡(1+t)\ln\left(y_{t+1}\right)-\ln\left(y_{t}\right)=\ln\left(1+t\right). On a logarithmic scale the series therefore becomes a straight line, and the slope of the line directly measures the growth rate. This is why long economic series, such as gross domestic product and population, are almost always published this way.

d)

The series with a constant rate always ends up overtaking the other, whatever its rate and whatever the slope of the other. Starting both from 100: after 10 years, 100+100=200100+100=200 against 100×1.0310≈134100\times 1.03^{10}\approx 134; after 40 years, 500500 against 100×1.0340≈326100\times 1.03^{40}\approx 326; after 80 years, 900900 against 100×1.0380≈1064100\times 1.03^{80}\approx 1064. The crossover happens around t≈70.6t\approx 70.6, during the seventy-first year: 100×1.0370≈792<800100\times 1.03^{70}\approx 792<800, but 100×1.0371≈816>810100\times 1.03^{71}\approx 816>810. Exponential growth is slow at first and unbounded afterwards, which is exactly why human intuition always underestimates it.

e)

By the curvature: the successive gaps increase instead of staying constant. The quick test is to compute the DIFFERENCES from one value to the next; if they are roughly constant, growth is linear, and if it is the RATIOS that are constant, growth is exponential. On our annual means, the differences are 90 then 100, and the ratios 1.0462 then 1.0490: both are nearly constant, which confirms that with three points you cannot decide.

102030405060708090200400600800100012001400+10 a year+3% a yearyears

Part B: problems and reasoning (/50)

Exercise 6: Reading a deseasonalized series

Every published economic indicator is deseasonalized, and almost nobody knows what that changes. The graph shows the same series before and after.

2468101214120014001600180020002200240026002800quarter number, over three yearsraw seriesdeseasonalized series
  • a) On the RAW series, what is the change from the second to the third quarter of year 2?
  • b) On the DESEASONALIZED series, same question.
  • c) A news release announces a “61% jump in enrolment”. What is wrong with it?
  • d) Comparing a quarter with the same quarter of the previous year is another way of neutralizing the season. Compute that change and say what it costs.
  • e) What is the main limitation of a deseasonalized series?

Type your answers, the page tells you right or wrong 0/10

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) 2520−15601560≈61.5%\dfrac{2520-1560}{1560}\approx 61.5\%
  • b) 20342034 against 20442044, that is +0.45%+0.45\%
  • c) The figure describes the calendar: it will recur next year, even at a CEGEP in decline
  • d) 2520−24002400=5.0%\dfrac{2520-2400}{2400}=5.0\%, at the price of responsiveness and sensitivity to accidents
  • e) It is an ESTIMATE, revised with each new data point, and the irregular component comes to the foreground
a)

From 1560 to 2520: 2520−15601560≈0.6154\dfrac{2520-1560}{1560}\approx 0.6154, a rise of 61.5%. The number is exact and it measures little more than the passage from winter to fall.

b)

Deseasonalized values: 15600.7668≈2034.4\dfrac{1560}{0.7668}\approx 2034.4 and 25201.2332≈2043.5\dfrac{2520}{1.2332}\approx 2043.5. Change: 2043.5−2034.42034.4≈0.0045\dfrac{2043.5-2034.4}{2034.4}\approx 0.0045, that is 0.45%. The real movement is therefore under half a percent, against 61.5% in appearance: all the rest was calendar.

c)

That the figure describes the season and not the institution. A “61% jump” will recur next year and the year after, whatever happens, and it would be just as true at a CEGEP in decline. The correct release would say: “after adjustment for seasonal variation, enrolment is up 0.4% from the previous quarter”, or failing that it would compare with the same quarter of the previous year.

d)

Third quarter of year 2 against third quarter of year 1: 2520−24002400=0.05\dfrac{2520-2400}{2400}=0.05, that is 5.0%. The method is simple and robust, and it needs no seasonal index. It costs two things: RESPONSIVENESS, since a turnaround that happened three months ago stays invisible for nine months, and SENSITIVITY to accidents, since an exceptional quarter a year ago distorts today's comparison.

e)

Its main limitation is that deseasonalization is an ESTIMATE, revised with every new data point: the seasonal indices are recomputed, and the value published for a past quarter changes retroactively. Statistical agencies do publish these revisions, often a few tenths of a point, which is enough to make a “technical recession”, defined as two consecutive quarters of decline, appear or disappear. In addition, a deseasonalized series is NOISIER than it looks: by removing the most regular component, you leave the irregular component in the foreground, and a single month can be enough to create a false inflection.

Exercise 7: Pitfalls specific to time series

The observations of a series are not independent, and this difference alone invalidates a good part of the usual toolbox.

  • a) Define AUTOCORRELATION and give an example.
  • b) Which tool of classical statistics becomes invalid as a result, and in which direction does it go wrong?
  • c) Two growing series with no connection are correlated at 0.97 over twenty years. Name the phenomenon and propose the remedy.
  • d) On twelve monthly points, two seasonal series give r=0.93r=0.93. What should you check before commenting?
  • e) What is the real “sample size” of a series of 40 strongly autocorrelated quarters?

Type your answers, the page tells you right or wrong 0/10

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) The correlation of a series with itself shifted; here the order 4 is close to 1
  • b) The standard errors of the regression: underestimated, they make us reject too often
  • c) Spurious trend correlation; remedy: correlate the CHANGES
  • d) Whether the two series share the same season; and twelve monthly points never settle anything
  • e) 40×0.21.8≈4.440\times \dfrac{0.2}{1.8}\approx 4.4 effective observations
a)

AUTOCORRELATION is the correlation of a series with itself shifted in time: this quarter's enrolment resembles the previous quarter's, and resembles even more the same quarter of last year. Example: in our data, the autocorrelation of order 4, the one linking each quarter to the same quarter of the previous year, is close to 1, since the seasonal pattern repeats almost identically.

b)

The tests based on the INDEPENDENCE of the observations, starting with the standard errors of the regression and all the significance tests that follow from them. They almost always go wrong in the same direction: they UNDERESTIMATE the standard errors, hence overestimate the tt statistics, hence declare significant relationships that are not. The mechanism is easy to grasp: forty quarters strongly correlated with one another contain far less information than forty independent observations, and the formula behaves as if they contained as much.

c)

It is a SPURIOUS TREND CORRELATION, or spurious regression: any two series that rise are correlated, because they share time as a common factor. The remedy is to work on the CHANGES rather than the levels: you compute the differences from one period to the next, or the growth rates, and correlate those. Most of the time, a correlation of 0.97 on the levels falls to almost zero on the changes, which settles the question.

d)

You must check whether the two series simply share the same SEASON. Two monthly series that both peak in July will be strongly correlated with no link at all: ice cream sales and drownings, electricity consumption and colds. So you deseasonalize both before computing any coefficient. Twelve monthly points, for that matter, allow no conclusion, whatever the value obtained.

e)

Much smaller than 40. The effective size is computed by neff≈n1−ρ1+ρn_{eff}\approx n\dfrac{1-\rho}{1+\rho}, where ρ\rho is the autocorrelation of order 1: with ρ=0.8\rho=0.8, you get 40×0.21.8≈4.440\times \dfrac{0.2}{1.8}\approx 4.4 effective observations. Forty strongly autocorrelated quarters are therefore worth, in information, fewer than five independent observations. It is the same reasoning as the design effect in cluster sampling, and it explains why economic series require methods of their own.

Exercise 8: Five statements to correct

Each of the five following statements is FALSE. Say why and give the correct statement.

  • 1) “Enrolment jumped 61% between winter and fall: our strategy is working.”
  • 2) “I smoothed my quarterly data with a moving average of order 3 to keep more points.”
  • 3) “Our two series are correlated at 0.97 over twenty years: the link is beyond dispute.”
  • 4) “The trend is 95 students a year; in thirty years we will have 2850 more per quarter.”
  • 5) “The sum of my four seasonal indices is 4.08, which is close enough to 4.”

Type your answers, the page tells you right or wrong 0/11

1)
2)
3)
4)
5)
Show the solution

Answers

  • 1) FALSE: calendar effect (0.7670.767 against 1.2331.233); the real movement is 0.45%0.45\%
  • 2) FALSE: the order must be a multiple of the period, so 4 for quarterly data and 12 for monthly data
  • 3) FALSE: two growing series share time; correlate the changes
  • 4) FALSE: three fitted points, thirty years extrapolated, and no interval given
  • 5) FALSE: 4.084.08 adds 2%2\% of level; renormalize by 44.08≈0.9804\dfrac{4}{4.08}\approx 0.9804
1)

FALSE. The 61% rise is a CALENDAR effect, structural and repeated every year: the seasonal index of winter is 0.767 and that of fall is 1.233. After adjustment, the real movement is 0.45%. Correct statement: seasonally adjusted, enrolment is up 0.4% from the previous quarter, which is too small to be attributed to anything.

2)

FALSE. The order of the smoothing must be a MULTIPLE of the seasonal period, here 4, otherwise each window contains a different combination of seasons and the smoothing leaves the pattern in place. On our data, a moving average of order 3 still oscillates by 100 units from one window to the next. Correct statement: use order 4 on quarterly data and order 12 on monthly data, even if it means losing points at the ends.

3)

FALSE. Any two growing series are strongly correlated because they share time: this is the spurious trend correlation, and it produces coefficients above 0.9 between quantities with no connection whatsoever. Correct statement: you must correlate the CHANGES from one period to the next, not the levels; the correlation computed that way is almost always close to zero.

4)

FALSE. The line was fitted on three points and three years: extending it by thirty years multiplies the horizon of the data by ten, with no reason to believe that the trend will hold. In addition, the uncertainty of a forecast grows with distance, and no interval is given. Correct statement: the observed trend is about 95 students a year; a forecast one or two years out is defensible, beyond that it is a scenario and not statistics.

5)

FALSE, you must RENORMALIZE. A sum of 4.08 means that the indices add 2% of level to the series, which would inflate every forecast and make the final check fail. Correct statement: multiply each index by 44.08≈0.9804\dfrac{4}{4.08}\approx 0.9804, so that the sum becomes exactly 4 again.

Exercise 9: Problem: the complete forecast

The whole procedure again, from start to finish, on another series. Quarterly attendance at a help centre, in visits: year 1, 840, 610, 960, 730; year 2, 900, 640, 1020, 780; year 3, 950, 690, 1090, 830.

The graph below shows the data.

2468101214500600700800900100011001200quarter number, over three years
  • a) Compute the three annual means.
  • b) Compute the seasonal indices by the ratio-to-annual-mean method and check their sum.
  • c) Fit the trend line on the annual means.
  • d) Forecast the four quarters of year 4.
  • e) The centre wants to know whether it should hire for the second quarter. What do you answer from these figures?

Type your answers, the page tells you right or wrong 0/19

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) 785785, 835835 and 890890
  • b) 1.07181.0718, 0.77300.7730, 1.22311.2231 and 0.93220.9322, adding up to 44 up to rounding
  • c) y^=731.67+52.5x\hat{y}=731.67+52.5x
  • d) Trend 941.67941.67; forecasts 10091009, 728728, 11521152 and 878878
  • e) The second quarter is the slowest (0.7730.773); the third is where 6262 more visits are expected
a)

Year 1: 840+610+960+7304=31404=785\dfrac{840+610+960+730}{4}=\dfrac{3140}{4}=785. Year 2: 900+640+1020+7804=33404=835\dfrac{900+640+1020+780}{4}=\dfrac{3340}{4}=835. Year 3: 950+690+1090+8304=35604=890\dfrac{950+690+1090+830}{4}=\dfrac{3560}{4}=890.

b)

Ratios, year 1: 1.07011.0701; 0.77710.7771; 1.22291.2229; 0.92990.9299. Year 2: 1.07781.0778; 0.76650.7665; 1.22161.2216; 0.93410.9341. Year 3: 1.06741.0674; 0.77530.7753; 1.22471.2247; 0.93260.9326. Averages by quarter: 1.07181.0718; 0.77300.7730; 1.22311.2231; 0.93220.9322. Sum: 4.00014.0001, that is 4 up to rounding, which validates the calculation.

c)

x‾=2\overline{x}=2, y‾=785+835+8903=25103≈836.67\overline{y}=\dfrac{785+835+890}{3}=\dfrac{2510}{3}\approx 836.67. Covariance sum: (−1)(785−836.67)+(1)(890−836.67)=51.67+53.33=105\left(-1\right)\left(785-836.67\right)+\left(1\right)\left(890-836.67\right)=51.67+53.33=105. Sum of squares of the deviations: 2. Slope: 52.552.5. Intercept: 836.67−105=731.67836.67-105=731.67. Line: y^=731.67+52.5x\hat{y}=731.67+52.5x.

d)

Trend for year 4: 731.67+52.5×4=731.67+210=941.67731.67+52.5\times 4=731.67+210=941.67 visits per quarter on average. Forecasts: 941.67×1.0718≈1009941.67\times 1.0718\approx 1009; 941.67×0.7730≈728941.67\times 0.7730\approx 728; 941.67×1.2231≈1152941.67\times 1.2231\approx 1152; 941.67×0.9322≈878941.67\times 0.9322\approx 878. Check: their sum is about 3767, that is 4×941.674\times 941.67.

e)

First, you must say that the second quarter is structurally the SLOWEST, with an index of 0.773, that is 23% below the annual mean: hiring for that quarter would mean hiring for the least busy period. Next, the real question concerns the busiest quarter, the third, whose forecast goes from 1090 to about 1152 visits, 62 more. Finally, the answer must come with its limits: the line rests on three points, no interval is computed, and the opening of a program or a change in schedule would be enough to invalidate the forecast. The reasonable recommendation is to adjust resources for quarter three, and to follow the deseasonalized series quarter after quarter rather than lock in a plan based on an extrapolation.

Exercise 10: Problem: reading a quarterly economic release

Excerpt: “Employment fell 0.3% in the second quarter, after a 0.1% rise in the first. This is the first decline in two years. The data are seasonally adjusted. Over twelve months, employment is up 1.4%. The survey's margin of error is plus or minus 0.2 percentage points.”

  • a) Can the 0.3% decline be distinguished from survey noise?
  • b) Compare the information given by the quarterly change and by the twelve-month change.
  • c) The release specifies that the data are seasonally adjusted. Why is that essential here?
  • d) “First decline in two years”: what reading trap does this sentence contain?
  • e) Write the paragraph you would publish.

Type your answers, the page tells you right or wrong 0/13

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) Barely: [−0.5,−0.1][-0.5, -0.1], and a gap of 0.40.4 points for a margin of 0.280.28
  • b) The quarterly change is responsive and noisy, the twelve-month change stable and slow; here they contradict each other
  • c) Because employment follows a very pronounced calendar: without adjustment, we would be describing spring
  • d) A threshold comparison: seven tiny rises are enough to manufacture “first decline in two years”
  • e) Keep the facts, add the uncertainty to every number, and replace the event with a hypothesis to be confirmed
a)

Barely. With a margin of 0.2 points, a decline of 0.3 points leaves an interval from −0.5-0.5 to −0.1-0.1 points: it does not contain zero, so the decline is distinguishable, but only just. And the comparison with the previous quarter, itself affected by the same uncertainty, is even more fragile: the difference between the two, 0.10.1 then −0.3-0.3, a gap of 0.4 points, has a margin of about 0.22≈0.280.2\sqrt{2}\approx 0.28 points, which makes it only just significant. A movement of this size should never make a headline.

b)

The QUARTERLY change is responsive but noisy: it picks up a turnaround as soon as it happens, at the price of a mediocre signal-to-noise ratio. The TWELVE-MONTH change is stable but slow: here, 1.4%, it describes the year just ended and will say nothing about a turnaround that occurred three months ago until several quarters have passed. A careful reader looks at both, and becomes wary when they contradict each other, which is precisely the case here: employment is up over a year and down over a quarter, which at best signals a recent slowdown.

c)

Because without seasonal adjustment, comparing a second quarter with a first quarter would be meaningless: employment follows a very pronounced calendar, with student hiring, seasonal work and the end of school contracts. Raw seasonal swings are counted in percentage points, ten times the change being reported. Without adjustment, the release would be describing spring.

d)

It relies on a THRESHOLD comparison: saying that a decline is the first in two years suggests a remarkable event, whereas over eight quarters, seven of them tiny rises, it only takes one change going from +0.1+0.1 to −0.3-0.3 to produce that sentence. It is a narrative dressing of a movement consistent with noise. To judge, you would need the full series of the eight changes with their margins, and not the single qualifier “first”.

e)

“Seasonally adjusted employment fell 0.3% in the second quarter, after a 0.1% rise in the first. Given the survey's margin of error, plus or minus 0.2 points, this decline is only weakly established, and the difference between the two quarters is at the limit of what the survey can distinguish. Over twelve months, employment is up 1.4%. These figures are therefore consistent with a recent slowdown, without a turnaround having been demonstrated; one or two more quarters will be needed to settle the matter.” The paragraph keeps the facts, adds the uncertainty to every number, contrasts the two comparison horizons, and replaces the announcement of an event with a hypothesis to be confirmed.

Something missing from this set? A type of exercise your teacher gives, a problem you are stuck on, a mistake you spotted: tell me, I read every request.

Sending goes through your free space: that is how I can answer you and tell you when the exercise is added. An email is enough, no password. Create your space. Rather not create an account? Write to me directly.

What is it about?
I read every request myself, nobody else sees it. No need to write your name or your school.
When your request is dealt with, you hear about it by email and in your space.

By sending, you agree that I read your request to answer it. It is kept with your account, erased with it, and never published: privacy policy.

Previous chapter Nonparametric tests, 360-301

© Ahmed Squalli Houssaini. Exercise set published at www.letuteurscientifique.ca/en/exercices/cegep-aqm-time-series. Free for personal and classroom use; republishing it elsewhere requires written permission (legal notice).

See also

Looking for a quantitative methods tutor in Montreal?

Get in touch for a first session. 360-301 arrives at the time of the end-of-program research project, and it is the course where a method error costs you the whole analysis chapter.

Site by Studio Squalli