ExamSaathi learning library · Government exams · SSC CGL quantitative foundations; published syllabus labelled 2024 · Quantitative aptitude

Trend by semi-averages and the second-degree least squares curve

Draw a quick straight-line trend by the method of semi-averages, fit a second-degree (parabolic) trend v = a + b t + c t^2 by least squares with coded years t, and estimate a later year from either trend.

Status: original pilot lesson. Teacher review is pending. It is not a complete course or official exam material.

You will learn to

Before you start

A time series records one quantity at equal steps of time, kept in time order. In this lesson the yearly figures are written v and the coded years t, because the letter x is reserved for multiplication. The trend is the long-run path of a series once its short ups and downs are set aside. The moving averages lesson smooths a series and fits a straight trend line by least squares; this lesson adds two more tools. The method of semi-averages gives a quick straight-line trend from just two averages. The second-degree, or parabolic, trend fits a curve that can bend, for growth that speeds up or slows down. You need averages, the squares of small whole numbers, and two equations in two unknowns. All the figures are invented for practice.

The method of semi-averages

Split the years into two equal halves; with an odd number of years, leave out the middle year so that the halves match. Average the values in each half. Place each semi-average against the middle of its own half: for a half of three years that is its middle year, and for a half of four years it falls halfway between the second and third years of that half. Join the two points with a straight line, which is the trend. Its slope is the yearly change = (second semi-average - first semi-average) / (number of years between the two centres). The trend value of any year is then either semi-average plus the yearly change times the number of years from that average's centre, counted as negative for earlier years. The same rule carried beyond the data gives an estimate for a later year.

Merits and limits of semi-averages

The method is simple and quick: two averages and one division give the whole line. It is objective, since everyone working from the same figures gets the same line, unlike a trend drawn by eye. It also extends easily to estimate later years. Its limits come from the same simplicity. It always gives a straight line, so it misses a trend that bends. Each half is summed up by an ordinary average, so one extreme year, such as a flood, a drought or a boom, drags its half's average and tilts the whole line. When the number of years is odd, the middle year is not used at all. And since only two points decide the line, it does not make the total of squared gaps as small as possible, so it usually differs a little from the least squares line.

The second-degree trend and its normal equations

When the yearly increases themselves grow or shrink steadily, a straight line fits poorly and a second-degree curve does better: v = a + b x t + c x t^2. Least squares picks a, b and c so that the total of the squared gaps between the values and the curve is as small as it can be. The curve still counts as a linear model in the statistical sense, because it is linear in a, b and c. Code the years so that t adds up to 0: for 5 years t = -2, -1, 0, 1, 2, and for 7 years t = -3 to 3, with t = 0 at the middle year; this lesson keeps to an odd number of years so that such a middle year exists. Then the sums of t and of t^3 are 0 as well, and the three normal equations shrink to: sum of v = n x a + c x sum of t^2; sum of (t x v) = b x sum of t^2; sum of (t^2 x v) = a x sum of t^2 + c x sum of t^4. For 5 years, sum of t^2 = 10 and sum of t^4 = 34; for 7 years they are 28 and 196.

Solving for a, b and c, and estimating

The middle equation gives b at once, b = sum of (t x v) / sum of t^2, exactly as for a straight line. The other two equations hold a and c together. For 5 years they read sum of v = 5a + 10c and sum of (t^2 x v) = 10a + 34c; doubling the first and taking it from the second leaves 14c = sum of (t^2 x v) - 2 x sum of v. For 7 years, taking 4 times the first from the second leaves 84c = sum of (t^2 x v) - 4 x sum of v. Then a = (sum of v - c x sum of t^2) / n, which is not the plain mean of v unless c = 0. For an estimate, the t of the target year is the number of years it lies after the middle year; put that t into the curve. The sign of c shows the bend: the slope b + 2ct changes by 2c for each step of t. A positive c makes the slope keep rising, so a rising trend speeds up or a falling one eases; a negative c makes the slope keep falling, so a rising trend slows and in time turns down, or a falling one speeds up. Keep estimates to a few years ahead, because a parabola carried far beyond the data can mislead.

Common mistakes

Placing a semi-average against the last year of its half instead of the middle. Dividing the difference of the semi-averages by the number of years in a half, or by the total number of years, instead of by the gap between the two centres. Keeping the middle year of an odd series inside one of the halves. Counting a later year's distance from the last year in the table instead of from the centre of a half. For the curve: coding the years so that t does not add up to 0, then using the shortened equations anyway; taking a as the mean of v, which is right for a straight line but not for a parabola; mixing up sum of t^2 and sum of t^4; measuring a future year's t from the final year of the table rather than from the middle year; and dropping the c x t^2 term when estimating.

A routine for these trend questions

Semi-averages: 1. Drop the middle year if the count is odd. 2. Average each half. 3. Place each average at the centre of its half. 4. Yearly change = difference of the averages / years between the centres. 5. Trend value or estimate = a semi-average + yearly change x years from its centre. Parabola: 1. Code t with t = 0 at the middle year. 2. Make columns t, t^2, t x v and t^2 x v, and note sum of t^2 and sum of t^4. 3. b = sum of (t x v) / sum of t^2. 4. Solve the other two equations for c, then a. 5. Substitute the t of the year asked about. 6. Sense-check: the fitted values for the given years add up to the sum of v, and the curve should follow the data closely.

Worked examples

  1. A town's average daily water use (million litres) in each year was: 2017: 52, 2018: 58, 2019: 55, 2020: 63, 2021: 66, 2022: 74, 2023: 71 and 2024: 81. Find the trend by the method of semi-averages, the trend values for 2017 and 2024, and an estimate for 2026.

    1. Eight years split into two halves of four: 2017-2020 and 2021-2024.
    2. First semi-average = (52 + 58 + 55 + 63) / 4 = 228 / 4 = 57, placed halfway between 2018 and 2019. Second semi-average = (66 + 74 + 71 + 81) / 4 = 292 / 4 = 73, placed halfway between 2022 and 2023.
    3. The two centres are 4 years apart, so the yearly change = (73 - 57) / 4 = 4 million litres.
    4. Trend for 2017, 1.5 years before the first centre: 57 - 1.5 x 4 = 51. Trend for 2024, 1.5 years after the second centre: 73 + 1.5 x 4 = 79.
    5. Estimate for 2026, 3.5 years after the second centre: 73 + 3.5 x 4 = 87.

    Answer: Yearly change = 4 million litres; trend 51 for 2017 and 79 for 2024; estimate for 2026 = 87 million litres a day.

  2. Two-wheeler sales (hundreds) in a district of Odisha were 47 in 2020, 48 in 2021, 56 in 2022, 66 in 2023 and 73 in 2024. Fit a second-degree trend by least squares and estimate the sales for 2026.

    1. Code t = -2, -1, 0, 1, 2 for 2020 to 2024, so sum of t^2 = 10 and sum of t^4 = 34.
    2. Sum of v = 47 + 48 + 56 + 66 + 73 = 290. Sum of (t x v) = -94 - 48 + 0 + 66 + 146 = 70. Sum of (t^2 x v) = 188 + 48 + 0 + 66 + 292 = 594.
    3. b = 70 / 10 = 7.
    4. The equations 290 = 5a + 10c and 594 = 10a + 34c give, after doubling the first (580 = 10a + 20c) and subtracting, 14 = 14c, so c = 1 and a = (290 - 10) / 5 = 56.
    5. Trend: v = 56 + 7t + t^2. Its values for 2020 to 2024 are 46, 50, 56, 64 and 74, which add up to 290, as they should.
    6. For 2026, t = 4: v = 56 + 28 + 16 = 100.

    Answer: The trend is v = 56 + 7t + t^2 (t = 0 at 2022), and the estimate for 2026 is 100 hundred, about 10,000 two-wheelers.

  3. Broadband connections (thousand) in a district of Kerala were 28 in 2018, 39 in 2019, 50 in 2020, 60 in 2021, 68 in 2022, 73 in 2023 and 74 in 2024. Fit a second-degree trend by least squares and estimate the figure for 2025.

    1. Code t = -3 to 3 for 2018 to 2024, so sum of t^2 = 28 and sum of t^4 = 196.
    2. Sum of v = 28 + 39 + 50 + 60 + 68 + 73 + 74 = 392.
    3. Sum of (t x v) = -84 - 78 - 50 + 0 + 68 + 146 + 222 = 224, so b = 224 / 28 = 8.
    4. Sum of (t^2 x v) = 252 + 156 + 50 + 0 + 68 + 292 + 666 = 1484.
    5. 84c = 1484 - 4 x 392 = -84, so c = -1, and a = (392 - 28 x (-1)) / 7 = 420 / 7 = 60.
    6. Trend: v = 60 + 8t - t^2. For 2025, t = 4: v = 60 + 32 - 16 = 76.

    Answer: The trend is v = 60 + 8t - t^2 (t = 0 at 2021), and the estimate for 2025 is 76 thousand connections; with the slope 8 - 2t still positive up to 2024, the negative c shows the growth slowing.

Practice checks

  1. A tractor dealer in Karnal sold 30, 34, 35, 41, 44, 47 and 50 tractors in the years 2018 to 2024. By the method of semi-averages, what is the trend estimate for 2026?
  2. Rice output (thousand tonnes) of a block in West Bengal was 20, 23, 23, 26, 28 and 30 in the years 2019 to 2024. By the method of semi-averages, what is the trend estimate for 2027?
  3. For a 5-year series coded t = -2 to 2, sum of v = 305, sum of (t x v) = 70 and sum of (t^2 x v) = 596. In the second-degree trend v = a + b t + c t^2 fitted by least squares, the value of a is:
  4. The parabolic trend fitted to a sweet shop's yearly sales (Rs. lakh), with t = 0 at 2021 and t rising by 1 each year, is v = 120 + 9t + 0.5t^2. What is the trend estimate for 2026?
  5. A district's yearly paddy output for 2015 to 2024 includes one severe drought year, 2016. What does this do to a trend found by the method of semi-averages?

Sources checked