A company in Aba budgets next year’s sales of school uniforms. The sales figures for the past three years show a rising line with a regular pattern inside each year: low in the first quarter, high in the third when schools reopen. A budget that ignores the rise will under-estimate, and one that ignores the pattern will mis-time production and cash.
Two groups of techniques serve this need. Regression and correlation fit a straight line to pairs of data and measure how well it fits; they can estimate fixed and variable costs or project a trend. Time series analysis breaks a series of figures over time into a trend and seasonal variations, so that a forecast can be built for a future period.
This topic explains the regression formulae and the correlation coefficient, the components of a time series, the calculation of moving averages and centred moving averages, the trend line, the additive and proportional models of seasonal variation, and the benefits and limits of each technique. It builds on the earlier topic on the high-low method. The next topic covers the learning curve: the learning rate and the learning effect.
In 30 seconds
Linear regression finds the line of best fit y = a + bx from n pairs of data: b = (nΣxy − ΣxΣy) ÷ (nΣx² − (Σx)²) (find b first) and a = (Σy − bΣx) ÷ n. Used on cost data, a is the fixed cost and b the variable cost per unit; used with time as x, it projects a trend.
It uses all the data, so it is more reliable than the high-low method. Its reliability can be measured by the correlation coefficient r (between −1 and +1; near ±1 means a strong linear link) and r², the share of the variation in y explained by x. A time series has a trend (T), seasonal variation (S), cyclical variation (C) and random variation (R).
The additive model is Y = T + S + C + R; the proportional model is Y = T × S × C × R. The trend is estimated by moving averages (a group the length of the cycle: four quarters, five days) or regression; with an even cycle the averages are centred. Seasonal variation = actual − trend (additive; averages sum to zero) or actual ÷ trend (proportional; averages sum to the number of seasons).
Forecast = trend value + (or ×) the seasonal figure. Full marks come from correct working, a clear forecast and the assumptions stated.
Regression and correlation
Linear regression
Linear regression calculates a line of best fit, y = a + bx, from pairs of data: for each value of x there is an associated value of y. For costs, x is activity and y is total cost, so a is the fixed cost and b the variable cost per unit.
For forecasting over time, x is the time period and y the variable of interest, for example sales. The line is then a trend that is projected into the future, on the assumption that the past pattern continues.
Compared with the high-low method, regression uses all the data, is likely to be more reliable, and allows the reliability to be measured; but the arithmetic is heavier and normally needs a calculator or a spreadsheet.
The approach:
- set out x and y in columns
- add columns for x² and xy
- total each column
- put the totals in the formulae and solve for b first, then a
b = (nΣxy − ΣxΣy) ÷ (nΣx² − (Σx)²) and a = (Σy − bΣx) ÷ n, where n is the number of pairs.
Correlation
The correlation coefficient r measures the strength of the linear relationship between x and y: r = (nΣxy − ΣxΣy) ÷ √[(nΣx² − (Σx)²)(nΣy² − (Σy)²)]. It lies between −1 (perfect negative) and +1 (perfect positive); a value near zero means no linear relationship. The coefficient of determination, r², is the proportion of the variation in y that is explained by variation in x: an r² of 0.9 means that 90% is explained.
A high correlation shows association, not cause; and a forecast is reliable only if the relationship is strong, the data is representative and the forecast is not far outside the range of the data.
Time series
Components and models
A time series is a record of values over time, such as sales per quarter. Four components may affect it. The trend (T) is the underlying direction. Seasonal variation (S) is the regular difference between the actual figure in a period and the figure predicted by the trend. The “season” may be a day, a month or a quarter.
Cyclical variation (C) is a longer-term movement, which usually cannot be identified for lack of data. Random variation (R) cannot be predicted and is normally assumed to be negligible. The two models are:
- Additive: Y = T + S + C + R. The seasonal effect is a fixed amount above or below the trend. Suitable when seasonal swings are of a constant size.
- Proportional (multiplicative): Y = T × S × C × R. The seasonal effect is a proportion of the trend. Suitable when the swings grow as the trend grows.
A graph of a time series is a historigram.
The trend: moving averages
A moving average smooths the seasonal movement by averaging one whole cycle, so a quarterly series uses four periods, a daily series for a five-day week uses five. Each average is placed at the middle of the periods averaged. With an odd cycle the middle is an actual period.
With an even cycle (four quarters, twelve months) the middle lies between two periods, so a second average of each adjacent pair is taken: these are the centred moving averages, which line up with actual periods. The method loses values at the start and end of the series.
If the centred averages increase by a constant amount each period, they lie on a straight line, and its equation is found from a starting value and the average increase per period (or by regression on the averages). The equation must be used in terms of the period from which it starts.
Seasonal variation
Additive model. For each period with a trend value, find actual − trend. Group by season (quarter 1, quarter 2, and so on) and average each group. The averages should add to zero; if they do not, spread the difference equally over the seasons. Proportional model. Find actual ÷ trend, average by season, and check that the averages sum to the number of seasons (4 for quarters); if not, spread the difference equally.
Forecast: project the trend to the future period using the trend line, then add the additive seasonal figure or multiply by the proportional one.
Benefits and limitations
- Regression benefits: uses all the data; measurable reliability; more accurate cost and trend estimates. Limits: assumes a linear relationship; depends on the data being representative; correlation is not cause; forecasting outside the range is unreliable; a spreadsheet is usually needed.
- Time series benefits: separates trend from seasonal pattern and gives a forecast for each period, useful for production, inventory and cash budgets. Limits: assumes the past pattern continues; random and cyclical effects are ignored; needs enough data (several complete cycles); and the trend may not be a straight line.
Layouts for regression and time series
- Regression table: x, y, x², xy (and y² for r); totals; b; a; function; forecast.
- Moving average table: actual, moving total, moving average, centred average (if even).
- Seasonal table: actual − trend (or ÷ trend) by period; averages by season; adjustment to sum to zero (or to n).
- Forecast: trend line value for the period + seasonal figure.
Money is in naira millions and each answer is rounded once, at the end.
Worked examples
Example 1: regression and correlation. Output (000 units) and total cost (₦m) for six months: x 4, 6, 8, 5, 7, 10; y 31, 43, 50, 37, 46, 63. Required: the line, the forecast for 9,000 units and r.
- Totals.
n = 6
Σx = 40
Σy = 270
Σxy = 124 + 258 + 400 + 185 + 322 + 630 = 1,919
Σx² = 290
Σy² = 12,764. - b.
(6 × 1,919 − 40 × 270) ÷ (6 × 290 − 1,600) = (11,514 − 10,800) ÷ 140 = 714 ÷ 140 = 5.1, that is ₦5,100 a unit. - a.
(270 − 5.1 × 40) ÷ 6 = 66 ÷ 6 = 11.0, that is ₦11m fixed.
Line: y = 11.0 + 5.1x. - Forecast.
9,000 units: 11.0 + 5.1 × 9 = ₦56.9m. - r.
714 ÷ √[140 × (6 × 12,764 − 270²)] = 714 ÷ √(140 × 3,684) = 714 ÷ 718.2 = 0.9942
r² = 0.988.
Almost all the variation in cost is explained by output, so the forecast is reliable within the range.
Example 2: additive and proportional time series. Quarterly sales (₦m): Year 1: 40, 52, 66, 46. Year 2: 46, 58, 72, 52. Year 3: 52, 64, 78, 58. Required: the trend, seasonal variations and a forecast for Year 4 quarter 4.
- Four-quarter totals (quarters 1 to 4, 2 to 5, and so on): 204, 210, 216, 222, 228, 234, 240, 246, 252. Centred moving averages (add adjacent totals, divide by 8): quarter 3 51.75; quarter 4 53.25; then 54.75, 56.25, 57.75, 59.25, 60.75, 62.25 (quarter 10). The trend rises by 1.5 a quarter.
- Trend line.
Trend = 51.75 + 1.5 × (q − 3).
Year 4 quarter 4 is quarter 16: 51.75 + 1.5 × 13 = 71.25. - Additive variations. (actual − trend).
Quarter 3: 66 − 51.75 = 14.25; quarter 4: 46 − 53.25 = −7.25; quarter 5 (Q1): 46 − 54.75 = −8.75; quarter 6 (Q2): 1.75; quarter 7 (Q3): 14.25; quarter 8 (Q4): −7.25; quarter 9 (Q1): −8.75; quarter 10 (Q2): 1.75.
Averages: Q1 −8.75; Q2 +1.75; Q3 +14.25; Q4 −7.25.
The total is zero, so no adjustment is needed. - Additive forecast.
71.25 − 7.25 = ₦64.0m. - Proportional variations (actual ÷ trend): Q1 0.8402 and 0.8560, average 0.8481; Q2 1.0311 and 1.0281, average 1.0296; Q3 1.2754 and 1.2468, average 1.2611; Q4 0.8638 and 0.8776, average 0.8707. The total is 4.0095, 0.0095 too high, so deduct 0.0024 from each: Q1 0.8457; Q2 1.0272; Q3 1.2587; Q4 0.8683.
- Proportional forecast.
71.25 × 0.8683 = ₦61.87m.
The two models give different answers (64.0 and 61.9) because the swings in this series are constant in size, so the additive model fits better.
Expect variants: a series with five-day or monthly cycles, a requirement to find the trend by regression on the moving averages, interpretation of r, or a discussion of the assumptions.
Scaled data, seasonal factors and choosing the forecasting basis
If the y values were scaled down (for example divided by 100) to ease the sigma calculations, multiply a and b back up by the same factor before forecasting.
Forecast the trend first, then apply the seasonal adjustment:
- with multiplicative seasonal factors (a quarter 5% above trend) multiply the trend by 1.05
- with additive factors add or subtract the stated number of units
- to deseasonalise, divide by the factor or reverse the additive adjustment
To choose between forecasting bases (all periods or only the latest ones), compare the coefficients of determination: the higher r² explains more of the variation in sales by the passage of time, and so is the better basis, though a short series is a thin basis for forecasting.
Time series analysis or linear regression?
Time series analysis studies how sales moved over past periods, separating trend, seasonal and random variation, and projects the trend with seasonal adjustment; it suits sales that move mainly with time and season and where there is no clear driving variable.
Linear regression relates sales to another variable (advertising, price, time) and can show cause and effect with a measure of fit (r²). It is better when a reliable explanatory variable exists and can itself be forecast. Both rest on the assumption that past patterns continue, and both need enough data.
Common mistakes
- Finding a before b in regression.
- Forgetting to centre averages for an even cycle.
- Starting the trend equation at the wrong period and mis-numbering the forecast period.
- Not adjusting the seasonal figures to sum to zero (or to the number of seasons).
- Reading a high r as proof of cause.
- Forecasting far outside the data without comment.
Quick revision
- b = (nΣxy − ΣxΣy) ÷ (nΣx² − (Σx)²); a = (Σy − bΣx) ÷ n; r between −1 and +1; r² explained variation.
- Time series: T, S, C, R; additive or proportional; moving averages (centred if even); seasonal averages adjusted.
- Forecast = trend + seasonal (additive) or trend × seasonal (proportional).
How the marks are earned
- Layout: the tables with all totals.
- Calculation: b, a, trend, seasonal figures.
- Judgement: reliability and assumptions.
Practice questions
These are original questions, written in the style of the Skills examination. Work each one before you open the answer.
Recall check: multiple choice
Question 1. Linear regression:
- Uses only two points
- Calculates a line of best fit from all the data
- Ignores data
- Gives the median
Show the answer
B. It is more reliable than the high-low method.
Question 2. In y = a + bx used for costs, b is:
- The fixed cost
- Total cost
- The correlation
- The variable cost per unit
Show the answer
D. It is the slope; a is the fixed cost.
Question 3. The correlation coefficient measures:
- The strength of the linear relationship between x and y
- The cost
- The mean
- The trend
Show the answer
A. It lies between −1 and +1.
Question 4. r² shows:
- The slope
- The intercept
- The proportion of the variation in y explained by x
- The forecast
Show the answer
C. An r² of 0.9 means 90% is explained.
Question 5. The components of a time series are:
- Trend, seasonal, cyclical and random variations
- Cost, price, volume and mix
- Debits and credits
- Mean and mode
Show the answer
A. Random variation is normally ignored.
Question 6. For quarterly data a moving average uses:
- Two quarters
- Three quarters
- Four quarters
- Twelve quarters
Show the answer
C. One whole cycle.
Question 7. Centred moving averages are needed when:
- The cycle is odd
- The cycle has an even number of periods
- There is no trend
- Data is annual
Show the answer
B. The first average falls between two periods.
Question 8. Additive seasonal variations should sum to:
- One
- The number of seasons
- The trend
- Zero
Show the answer
D. Otherwise spread the difference equally.
Question 9. Proportional seasonal factors for quarters should sum to:
- Four
- Zero
- One
- Twelve
Show the answer
A. Average factor 1.
Question 10. A limitation of forecasting from a trend is that it:
- Is too accurate
- Uses no data
- Assumes the past pattern continues
- Needs no judgement
Show the answer
C. Conditions may change.
Section B style: written questions
Question 11 (10 marks). (a) Explain the components of a time series. (4 marks) (b) Distinguish the additive and proportional models. (3 marks) (c) State THREE limitations of time series forecasting. (3 marks)
Question 12 (15 marks). Output (000 units) and total cost (₦m): x 3, 5, 7, 4, 6, 9; y 26, 38, 45, 33, 41, 58.
(a) Prepare the table of x, y, x² and xy with totals. (5 marks) (b) Calculate b and a. (5 marks) (c) Forecast the cost of 8,000 units. (2 marks) (d) State THREE advantages over the high-low method. (3 marks)
Question 13 (20 marks). Quarterly sales (₦m): Year 1: 30, 42, 54, 34. Year 2: 36, 48, 60, 40. Year 3: 42, 54, 66, 46.
(a) Calculate the centred moving averages. (6 marks) (b) Calculate the additive seasonal variations for each quarter. (6 marks) (c) State the trend line and forecast sales for Year 4 quarter 2. (5 marks) (d) State TWO limitations of the forecast. (3 marks)
Model answers
Show the model answer to Question 11
(a) Trend: the underlying direction. Seasonal variation: the regular difference from trend within a cycle. Cyclical variation: longer-term movement, rarely identifiable. Random variation: unpredictable, normally ignored (4).
(b) Additive: Y = T + S + C + R, the seasonal effect is a fixed amount. Proportional: Y = T × S × C × R, the effect is a proportion of the trend (3).
(c) Any three: assumes the past pattern continues; ignores cyclical and random effects; needs several complete cycles; the trend may not be linear; external changes are not reflected (1 each).
Show the model answer to Question 12
(a)
- n = 6
- Σx = 34
- Σy = 241
- Σxy = 78 + 190 + 315 + 132 + 246 + 522 = 1,483
- Σx² = 9 + 25 + 49 + 16 + 36 + 81 = 216 (5).
(b) b = (6 × 1,483 − 34 × 241) ÷ (6 × 216 − 34²) = (8,898 − 8,194) ÷ (1,296 − 1,156) = 704 ÷ 140 = 5.03. a = (241 − 5.0286 × 34) ÷ 6 = 11.67 (5).
(c) 11.67 + 5.03 × 8 = ₦51.9m (2).
(d) Uses all the data; more reliable; reliability can be measured by r; shows the extent to which cost depends on output (3).
Show the model answer to Question 13
(a) Four-quarter totals: 160, 166, 172, 178, 184, 190, 196, 202, 208. Centred averages (adjacent totals ÷ 8): Q3 40.75; Q4 42.25; Q5 43.75; Q6 45.25; Q7 46.75; Q8 48.25; Q9 49.75; Q10 51.25 (6).
(b) Actual − trend: Q3 13.25; Q4 −8.25; Q5 −7.75; Q6 2.75; Q7 13.25; Q8 −8.25; Q9 −7.75; Q10 2.75. Averages: quarter 1 −7.75; quarter 2 +2.75; quarter 3 +13.25; quarter 4 −8.25; total zero (6).
(c)
- The trend rises by 1.5 a quarter: trend = 40.75 + 1.5 × (q − 3).
- Year 4 quarter 2 is quarter 14: 40.75 + 1.5 × 11 = 57.25
- forecast 57.25 + 2.75 = ₦60.0m (5).
(d) Any two: assumes the trend continues; ignores random and cyclical effects; only three years of data (3).
Pathfinder on Correlation, regression and time series
These are the ICAN Pathfinder questions that test this topic. ICAN owns the questions and the suggested solutions, so we point you to them and do not copy them. Open your Pathfinder, attempt each question under exam conditions, then check your answer against the notes above.
Regression forecast with seasonal adjustment; 10 v 5 periods; r squared.
Revise first: Layouts for regression and time series
Seven planning stages linking objectives and budgets; fixed, rolling, zero-based; time series v regression.
Revise first: Layouts for regression and time series
Deseasonalise and forecast; participation in budget setting arguments and challenges.
Revise first: Layouts for regression and time series
Regression forecast with seasonal adjustment; 10 v 5 periods, r squared.
Revise first: Layouts for regression and time series
Source: ICAN Pathfinder, Performance Management. Diets covered: March/July Diet, 2020 to May Diet, 2026. All 13 diets in the Pathfinder are mapped.
Spotted a mistake? Tell us and we will check it.