ECON 290 · Economic Data and Computing

Time Series Basics: Trends, Growth Rates and Moving Averages

Learn to read data that comes in time order: find the trend, compute growth rates correctly, and smooth noise with a moving average.

Key takeaways

  • A time series is data in time order, and its main features are trend, ups and downs around the trend, and repeating seasonal patterns.
  • A growth rate is the change divided by the starting value; it is a percent of where you began, not where you ended.
  • Percent changes do not simply add up over time; growth compounds.
  • A moving average smooths out noise by averaging a window of neighboring values, at the cost of lagging behind turns.
  • Always say which period you compare with, because the same data can look hot or cold depending on the choice.

Picture Nora, who owns a small bakery. Her yearly sales, in thousands of dollars, were 100, 104, 110, 108 and 115. A friend asks, "How fast is your business growing?" Nora pauses. Last year it fell. The year before, it jumped. Is the answer 4 percent, 6 percent, or "it depends"?

It does depend, and learning what it depends on is the heart of this lesson. A time series is a list of numbers recorded in time order: yearly sales, monthly unemployment, quarterly output. Time order matters because today's number is usually tied to yesterday's. That makes time series both useful and a little tricky, and it gives economists a small toolkit used on almost every macroeconomic data set.

What a time series looks like

Plot Nora's five years and you see a line that mostly climbs, with a dip in year 4. Economists describe a time series using a few pieces.

Trend. The long-run direction: up, down or flat. Nora's sales trend upward.

Cycle. Slower swings around the trend, such as booms and recessions in an economy.

Seasonality. Patterns that repeat on a calendar. A bakery sells more before holidays every year. Retail sales spike in December. Unemployment among teenagers jumps in summer. The same shape comes back each year.

Noise. Random ups and downs with no pattern, such as a rainy week that keeps customers home.

Real data mixes all four. A big part of analysis is deciding which part you care about. A shop owner deciding whether to hire cares about the trend. A manager planning how much flour to buy cares about the season.

The data themselves come from sources like those in the lesson on national statistics agencies, and many series are revised later, as the lesson on revisions explains. Plot your series first, as the lesson on honest charts advises, before computing anything.

Growth rates: the percent change

The growth rate from one period to the next is the change divided by the starting value, times 100.

growth rate = (new − old) ÷ old × 100

Let us compute Nora's year-to-year growth.

Year 1 to 2:  (104 − 100) ÷ 100 × 100 =  4.0%
Year 2 to 3:  (110 − 104) ÷ 104 × 100 ≈  5.8%
Year 3 to 4:  (108 − 110) ÷ 110 × 100 ≈ −1.8%
Year 4 to 5:  (115 − 108) ÷ 108 × 100 ≈  6.5%

The important detail is the denominator. Each rate is measured against the earlier value. That is why a rise of 6 (from 104 to 110) is 5.8 percent, while a rise of 7 (from 108 to 115) is 6.5 percent. The base keeps changing.

The growth rate formula
g = new − old ÷ old g = Growth rate The percent change from one period to the next. new − old = The change How much the value rose or fell, in the series' own units. old = The starting value The earlier period; the base the change is measured against. g = new − old ÷ old g = Growth rate The percent change from one period to the next. new − old = The change How much the value rose or fell, in the series' own units. old = The starting value The earlier period; the base the change is measured against.

Multiply the result by 100 to express it as a percent.

Growth compounds

What is Nora's growth over the whole four years? A tempting shortcut adds the four rates: 4 + 5.8 − 1.8 + 6.5 = 14.5. That is close, but not right. The true total change is from 100 to 115, which is 15 percent.

The shortcut fails because growth builds on itself. This is compounding. Here is a cleaner example. Suppose sales grow 10 percent in year one and 10 percent in year two, starting from 100.

Year 1:  100 × 1.10 = 110
Year 2:  110 × 1.10 = 121
Total growth: 21%, not 20%

The second 10 percent applies to 110, not to 100, so it adds 11 instead of 10. The extra point is the interest earned on interest.

The right way to turn many periods into one steady rate is the average annual growth rate. If the total growth over n periods is G (as a decimal factor, such as 1.15), the steady rate r satisfies (1 + r)ⁿ = G. For Nora, 115 ÷ 100 = 1.15 over 4 years, so (1 + r)⁴ = 1.15. Taking the fourth root gives about 1.0356, so r ≈ 3.6 percent per year. Check: 1.0356 × 1.0356 ≈ 1.0725, and 1.0725 × 1.0725 ≈ 1.150. It works.

So Nora's answer to her friend: "Growth was uneven, but averaged about 3.6 percent a year."

Nora's sales and a three-year moving average
Sales ($ thousands) Sales 3-year average Year Sales ($ thousands) Sales 3-year average Year

The dashed line smooths the dip in year 4. Each point averages the year and the two before it.

Moving averages: smoothing out noise

Nora's dip in year 4 might be a rainy season rather than a real turn. To see the underlying direction, economists often use a moving average: replace each value with the average of a window of neighboring values.

With a window of three years, the first possible average uses years 1 to 3. Then slide the window one step to the right.

Years 1-3:  (100 + 104 + 110) ÷ 3 = 314 ÷ 3 ≈ 104.67
Years 2-4:  (104 + 110 + 108) ÷ 3 = 322 ÷ 3 ≈ 107.33
Years 3-5:  (110 + 108 + 115) ÷ 3 = 333 ÷ 3 = 111.00

The smoothed series, 104.67, 107.33 and 111, rises every step. The dip has vanished. That is the point: the moving average shows a steady climb that the raw numbers hide.

There are costs. First, you lose data at the start (no average for years 1 and 2). Second, the average lags. It reacts to a real turning point late, because old values are still in the window. If Nora's sales truly collapsed in year 4, a three-year average would still look healthy for a while. A wider window smooths more but lags more.

In code, one line does this for a column, as in the programming lesson: the rolling mean of a column with window 3. In a spreadsheet, you copy an AVERAGE formula down the column, as in the spreadsheet lesson.

Which period do you compare with?

Economic news often reports growth "from last month" or "from a year earlier". These are different questions.

  • Month over month shows the latest momentum but is noisy and affected by the season.
  • Year over year compares with the same month a year ago, which cancels out seasonality, but reacts slowly to change.

Suppose a store sold 80 in December and 50 in January. Month-over-month growth for January is (50 − 80) ÷ 80 = −37.5 percent. That looks like a crash, but it is just the end of the holiday season. If the previous January sold 48, year over year is (50 − 48) ÷ 48 ≈ 4.2 percent, a quiet gain. Same store, same month, two very different stories. A fair report says which one it uses.

Statistics agencies also publish seasonally adjusted series, in which the usual seasonal pattern has been removed so that months can be compared directly. Check whether a series is adjusted before you compare months.

A last cautionary tale concerns annualizing. If output grows 1 percent in a quarter, the annualized rate is about (1.01)⁴ − 1 ≈ 4.06 percent, not 1 percent. Many headlines quote growth at an annual rate, so read the fine print.

Two ways to measure the same change
Month over month Compares with the previous month Quick to react to news Swings with the season Example: January −37.5% Year over year Compares with the same month last year Cancels the seasonal pattern Slower to show a turn Example: January +4.2% VS Month over month Compares with the previous month Quick to react to news Swings with the season Example: January −37.5% Year over year Compares with the same month last year Cancels the seasonal pattern Slower to show a turn Example: January +4.2%

A worked example: removing the season

Nora also tracks sales by quarter. In a typical year they are 80, 60, 70 and 90 (in thousands of dollars). The yearly average is (80 + 60 + 70 + 90) ÷ 4 = 300 ÷ 4 = 75.

A seasonal index divides each quarter by that average.

Quarter 1:  80 ÷ 75 ≈ 1.07
Quarter 2:  60 ÷ 75 = 0.80
Quarter 3:  70 ÷ 75 ≈ 0.93
Quarter 4:  90 ÷ 75 = 1.20

Quarter 4 runs 20 percent above an average quarter, and quarter 2 runs 20 percent below. Now suppose next year's quarter 1 brings in 88 and quarter 2 brings in 63. Raw numbers say sales went up, then fell by 25 (88 to 63). But divide each by its index to remove the season.

Q1 adjusted:  88 ÷ 1.0667 = 82.5
Q2 adjusted:  63 ÷ 0.80  = 78.75

The adjusted change is from 82.5 to 78.75, a fall of 3.75, or about 4.5 percent. So the drop is much milder than the raw drop of 25 suggests, because quarter 2 is always weaker. The season explains most of the fall. This is what agencies do, with more careful methods, when they publish seasonally adjusted data.

Real growth versus dollar growth

One more adjustment matters a great deal over time. Dollar figures include price changes. Suppose Nora's sales grew 6 percent in dollars, while prices in the economy rose 3 percent. Her real growth, which asks how much more she actually sold in terms of buying power, is about (1.06 ÷ 1.03) − 1 ≈ 0.029, or 2.9 percent. A quick rule is to subtract inflation from the dollar growth, which gives 3 percent, close but not exact. For small rates the shortcut is fine. For large rates, such as in a country with fast inflation, use the division.

The same idea applies across the economy: GDP, wages and prices in dollars all move with inflation, so economists often compare real values. Always ask whether a series is in current dollars or in dollars adjusted for prices, and check the agency's notes for the base year used.

Nora's quarterly sales in a typical year
Quarter 1 $80thousands of dollars Quarter 2 $60thousands of dollars Quarter 3 $70thousands of dollars Quarter 4 $90thousands of dollars Quarter 1 $80thousands of dollars Quarter 2 $60thousands of dollars Quarter 3 $70thousands of dollars Quarter 4 $90thousands of dollars

An invented example. The average is 75, so Quarter 4 is 20 percent above average and Quarter 2 is 20 percent below. Hypothetical example: the numbers are made up to show the method, not a quote or an average.

Common mistakes

Adding growth rates. Rates compound, so use the total change or the fourth-root method.

Using the wrong base. A fall of 50 percent followed by a rise of 50 percent leaves you below where you started: 100 × 0.5 × 1.5 = 75.

Mixing up percent and percentage points. If unemployment goes from 4 percent to 5 percent, it rose by 1 percentage point, which is a 25 percent increase (1 ÷ 4).

Reading a trend from two points. Picking a high start year and a low end year can make anything look like a boom or a bust. Plot the whole series.

Forgetting inflation. Nora's sales are in dollars. If prices rose 3 percent a year, her real growth is much smaller than her dollar growth.

Words to know

Time series a set of numbers recorded in time order, such as monthly unemployment.

Trend the long-run direction of a series, up, down or flat.

Seasonality a pattern that repeats on a calendar, such as a December sales spike.

Growth rate the change in a value divided by its starting value, as a percent.

Compounding growth that builds on earlier growth, so each period's change is applied to a larger or smaller base.

Moving average a smoothed series made by averaging a sliding window of neighboring values.

Seasonally adjusted a series with the usual seasonal pattern removed so months can be compared.

Check yourself

  1. Sales go from 80 to 100. What is the growth rate?
  2. Sales grow 10 percent in year one and 20 percent in year two, starting at 100. What are they at the end, and what is the total growth?
  3. Compute the three-year moving average for the series 10, 14, 12, 18, ending at the last year.
  4. A series falls 50 percent and then rises 50 percent. Where does it end, relative to its start?
  5. Unemployment rises from 4 percent to 5 percent. State the change in percentage points and as a percent.
  6. Explain why year-over-year growth is often preferred for seasonal data, and name one cost.
Show the answers
  1. (100 − 80) ÷ 80 × 100 = 25 percent.
  2. 100 × 1.10 = 110, then 110 × 1.20 = 132; total growth is 32 percent, not 30.
  3. The averages are (10 + 14 + 12) ÷ 3 = 12 and (14 + 12 + 18) ÷ 3 = 14.67; the one ending at the last year is 14.67.
  4. 100 × 0.5 = 50, then 50 × 1.5 = 75, which is 25 percent below the start.
  5. It is 1 percentage point, and 1 ÷ 4 = 25 percent as a relative increase.
  6. It compares the same season in two years, which cancels the seasonal pattern; the cost is that it reacts slowly to a recent turn.

A free self-study program written for 4Economics with AI writing tools and not reviewed line by line by a person. It is not an accredited degree and awards no credit. Check anything you rely on against a textbook or primary source. Report an error.

In this unit: Working with data

  1. Spreadsheets for Economic AnalysisLearn to organize data in rows and columns, write formulas for growth and averages, and avoid common spreadsheet traps.10 min
  2. Charts That Tell the TruthLearn how axes, scales and choices of chart type can mislead, and how to draw honest charts of economic data.10 min
  3. Cleaning and Merging DataRaw data is messy. Learn to find and fix common problems, then join two tables safely on a shared key.12 min
  4. A First Look at Programming for Data AnalysisMeet variables, lists, loops, functions and tables in Python, using small economic examples you can follow line by line.11 min
  5. Summaries and Regressions in CodeUse a few lines of Python to describe a data set, fit a straight line, and read the results without being fooled.11 min
  6. Reproducible Work: Files, Notes and VersionsOrganize files, write down your steps and save versions so that you, or anyone else, can redo an analysis and get the same answer.11 min
  7. Time Series Basics: Trends, Growth Rates and Moving AveragesLearn to read data that comes in time order: find the trend, compute growth rates correctly, and smooth noise with a moving average.10 min
  8. Presenting Data Findings to Non-ExpertsTurn an analysis into a clear message for busy readers: lead with the answer, choose one chart, and be honest about doubt.10 min

In the news