Time series analysis studies data collected in order over time, such as monthly sales, daily temperatures, or yearly population totals. This cheat sheet helps students recognize patterns, smooth noisy data, and make basic forecasts from past observations. It is useful because time order matters, and methods for ordinary unordered data can miss trends, cycles, and seasonality.
The most important ideas are trend, seasonal variation, random variation, smoothing, and forecast accuracy. Students should know how to compute changes, moving averages, residuals, and common error measures such as mean absolute error. Simple models often describe a value as a combination of trend, seasonal, and irregular components.
Graphs are essential because a time plot can reveal patterns before formulas are applied.
Key Facts
- A time series is a set of observations ordered by time, often written as .
- The first difference measures period-to-period change and is calculated by .
- The percent change from one period to the next is .
- A simple moving average with window size is .
- An additive time series model can be written as , where is trend, is seasonal effect, and is random error.
- A multiplicative time series model can be written as , and it is often used when seasonal variation grows as the level increases.
- A forecast error is actual minus predicted, so .
- Mean absolute error summarizes forecast accuracy with .
Vocabulary
- Time Series
- A time series is a data set whose values are recorded in chronological order.
- Trend
- A trend is the long-term upward, downward, or steady movement in a time series.
- Seasonality
- Seasonality is a repeating pattern that occurs at regular time intervals, such as days, months, or quarters.
- Moving Average
- A moving average is a smoothing method that replaces a value with the average of nearby time-ordered values.
- Forecast
- A forecast is a predicted future value of a time series based on past data and a chosen model.
- Residual
- A residual is the difference between an observed value and a fitted or forecasted value, calculated as .
Common Mistakes to Avoid
- Ignoring the order of the data is wrong because time series values are connected by their sequence, and rearranging them can hide trends or cycles.
- Using a moving average without checking the window size is wrong because a window that is too small may leave too much noise, while a window that is too large may hide real changes.
- Confusing seasonal patterns with random variation is wrong because seasonality repeats at regular intervals, while random variation has no consistent timing.
- Calculating forecast error as predicted minus actual when the class uses is wrong because the sign of the error will be reversed.
- Extrapolating far beyond the data is risky because a trend that fits past values may not continue under new conditions.
Practice Questions
- 1 The monthly sales values for four months are , , , and . Find the first differences , , and .
- 2 For the time series values , , , , and , calculate the 3-period moving average ending at the fifth value.
- 3 A model forecasts , , and for actual values , , and . Find the forecast errors and the .
- 4 A company has higher sales every December and lower sales every February for several years. Explain why this pattern is likely seasonality rather than random variation.
Understanding Time Series Analysis
A useful time series begins with a sensible time scale. Hourly readings can show rush-hour traffic, while monthly totals can hide those daily changes. The chosen interval must match the process being studied.
Measurements should be equally spaced whenever possible. Missing months, changed survey methods, or a faulty sensor can create apparent jumps that are not real changes in the underlying system.
Students should label axes carefully and record units. A graph of electricity use means little unless it is clear whether each point is a daily total, a monthly average, or a single reading at a fixed time.
Smoothing is helpful, but it has a cost. A moving average reduces short-term wiggles by combining nearby observations. This makes the longer direction easier to see, yet it can delay the appearance of a sudden rise or fall.
A three-period average reacts faster than a twelve-period average, but it remains more affected by random noise. At the beginning of a series, there may not be enough earlier values to calculate the chosen average.
Centered averages use values before and after a time point, so they are good for studying past data but cannot be used for a real forecast. A real forecast can use only information available at that time.
Autocorrelation describes the link between a value and earlier values in the same series. Daily temperature often has strong positive autocorrelation because a warm day is likely to be followed by another fairly warm day. A random sequence has little predictable connection from one observation to the next.
Looking at lagged plots or autocorrelation values helps students judge whether a model has left useful structure unexplained. Residuals should not form long runs above zero or below zero.
Such runs suggest that the forecast consistently misses a trend, seasonal pattern, or important event. Large isolated residuals may come from a holiday, a storm, a recording mistake, or another unusual cause.
Forecasts need honest testing. A model should be fitted using an earlier section of the data, then checked against later observations that were held back. This mirrors the real task of predicting an unknown future.
Mean absolute error gives the typical size of a miss in the original units, which makes it easy to interpret. It does not show whether forecasts are usually too high or too low, so students should inspect signed errors as well. Compare a model with a simple baseline, such as using the most recent value or the value from the same month last year.
A complicated method is not automatically better. In school problems, pay close attention to whether seasonal effects stay about the same size or grow with the series level. That decision affects whether an additive or multiplicative model makes sense.