What a time series and a line chart show
A time series records a variable at regular intervals, such as daily temperature, monthly sales or yearly population. Time goes on the horizontal axis and the measured value goes on the vertical axis. Each point is joined to the next by a straight segment.
The joining lines suggest that the quantity changes continuously between observations. This fits data such as temperature. It is only an approximation for counts recorded once a month, so a line chart should be used when the order of the points matters.
Trend, seasonality and noise
Analysts usually split a series into three parts. The trend is the long-run upward or downward movement. Seasonality is a pattern that repeats at a fixed period, such as higher ice cream sales every summer. Noise is the irregular variation left over.
A common way to reveal the trend is a moving average, which replaces each value with the mean of nearby values. This smooths out noise and, if the window equals the seasonal period, also removes seasonality. A simple trend can also be fitted with a straight line, as in linear regression on time.
Worked example: a three-month moving average
Suppose monthly sales, in units, are 10, 14, 12, 18, 16, 20 for months 1 to 6. The three-month moving average at month 2 is (10 + 14 + 12) / 3 = 36 / 3 = 12. At month 3 it is (14 + 12 + 18) / 3 = 44 / 3, about 14.7.
At month 4 it is (12 + 18 + 16) / 3 = 46 / 3, about 15.3. At month 5 it is (18 + 16 + 20) / 3 = 54 / 3 = 18. The smoothed values 12, 14.7, 15.3 and 18 rise steadily, while the raw values zigzag. The trend is upward even though sales fell in months 3 and 5.
Common misconceptions
A rising line does not show that one variable causes another. Two unrelated series can both trend upward over time and appear linked. A trend also should not be extended far beyond the observed data, because the pattern may change.
The look of a chart depends on its scales. A vertical axis that does not start at zero can make small changes look large. Unevenly spaced dates drawn at equal spacing also distort the shape of the trend.
Where line charts and trends appear
Line charts are used for stock prices, climate records, hospital admissions, website traffic and economic indicators such as inflation. Forecasting methods, including moving averages and exponential smoothing, build on the same decomposition into trend, seasonality and noise.
Key terms
- Time series
- A set of observations of one variable recorded in time order.
- Trend
- The long-run upward or downward direction of a series.
- Seasonality
- A pattern that repeats over a fixed period.
- Noise
- Irregular variation that is not trend or seasonality.
- Moving average
- The mean of a fixed number of neighbouring values, used to smooth a series.
- Line chart
- A graph of values against time with consecutive points joined by line segments.
