Most of the data covered elsewhere on this site is treated as if each observation is independent of the others β but data collected sequentially over time (monthly sales, daily temperatures, quarterly revenue) behaves differently: today's value is often related to yesterday's, and repeating patterns can hide a real underlying trend inside a lot of noise. Time series analysis is the set of techniques built specifically for this kind of sequential, time-ordered data.
- The three components any time series can be broken into: trend, seasonality, and noise
- Moving averages, and a full worked example smoothing noisy data
- Why the standard tools elsewhere on this site assume independence that time series data violates
- Where time series methods show up in practice
The Three Components
A time series can generally be thought of as the combination of three underlying pieces:
Trend β the long-run direction the data is moving, ignoring short-term ups and downs: steadily rising, steadily falling, or roughly flat over the full span being examined.
Seasonality β a pattern that repeats at fixed, known intervals: retail sales spiking every December, ice cream sales rising every summer, website traffic dipping every weekend. Seasonality is defined by its fixed, predictable period, which distinguishes it from irregular fluctuation.
Noise (or "residual") β the remaining random variation left over once trend and seasonality are accounted for, the same kind of unpredictable variability that shows up in any real measurement.
Separating a time series into these three components β a process called decomposition β is often the very first step in any serious time series analysis, since trying to model or forecast raw, undecomposed data usually means fighting against the seasonal pattern rather than accounting for it directly. Decomposition can be additive (trend + seasonality + noise, when the seasonal swing stays roughly the same absolute size regardless of the trend level) or multiplicative (trend Γ seasonality Γ noise, when the seasonal swing scales up proportionally as the trend grows) β retail sales, for example, are often better modeled multiplicatively, since a growing business's December spike tends to grow in absolute terms right along with its overall sales level.
Moving Averages: Smoothing Out the Noise
A moving average replaces each point with the average of itself and a fixed number of neighboring points, sliding that window across the full series β a simple, widely used way to smooth out short-term noise and make the underlying trend easier to see.
Worked Example: A 3-Month Moving Average
Problem: A small business records monthly sales (in thousands): 100, 120, 90, 130, 110, 140. Calculate a 3-month moving average to smooth out the month-to-month noise.
MA for month 2 (average of months 1, 2, 3): (100+120+90)/3 = 103.33
MA for month 3 (average of months 2, 3, 4): (120+90+130)/3 = 113.33
MA for month 4 (average of months 3, 4, 5): (90+130+110)/3 = 110.00
MA for month 5 (average of months 4, 5, 6): (130+110+140)/3 = 126.67
The raw data bounces around noisily (dropping from 120 to 90, then jumping to 130), making the underlying direction hard to judge by eye. The smoothed moving-average series (103.33 β 113.33 β 110.00 β 126.67) shows a clearer overall upward trend once the month-to-month noise is averaged out β exactly what moving averages are built to reveal. Note the moving average series is also shorter than the original (4 values from 6 original months), since each point requires a full window of neighbors on both sides; the first and last months in the original data can't get a centered 3-month average.
Why Independence Assumptions Break Down
Nearly every technique elsewhere on this site β the confidence interval formulas, the t-test, the Central Limit Theorem itself β assumes observations are independent of one another. Time series data routinely violates this: this month's sales are correlated with last month's sales (a busy month tends to be followed by another reasonably busy month, not a random reset), a property called autocorrelation. Applying an ordinary confidence interval formula directly to time series data, without accounting for this correlation, typically produces a falsely narrow interval β understating real uncertainty, because the formula assumes each new data point carries more independent information than it actually does when consecutive points are correlated with each other.
Real-World Uses
Business forecasting: retailers, manufacturers, and service businesses use time series methods to forecast future demand, accounting explicitly for known seasonal patterns (holiday shopping, summer travel) rather than being caught off guard by them every year.
Economic indicators: government statistics agencies routinely report economic figures (unemployment, retail sales) as "seasonally adjusted" β meaning the known, predictable seasonal component has been mathematically removed, so month-to-month changes reflect genuine shifts in the underlying trend rather than an entirely expected seasonal swing.
Quality control and process monitoring: tracking a manufacturing process's output over time using moving averages and control charts helps distinguish a genuine shift in the process (worth investigating) from ordinary random noise (not worth chasing).
Website and app analytics: daily active user counts, page views, and conversion rates all form time series with their own trend and seasonality (weekday-versus-weekend patterns are especially common), and treating a normal weekend dip as a genuine problem β or missing a real weekday trend hidden underneath the weekly cycle β is a routine analytics mistake that decomposition helps avoid.
Common Mistakes
Comparing raw, non-seasonally-adjusted figures across different times of year. A retailer's December sales will always dwarf its February sales due to seasonality alone β comparing them directly, without accounting for the known seasonal pattern, produces a misleading month-over-month "decline" that says nothing about genuine business trend.
Applying ordinary independence-based statistical formulas directly to time series data. As explained above, autocorrelation violates a core assumption behind standard confidence intervals and hypothesis tests β specialized time series methods exist specifically to handle this correctly.
Confusing a short-term blip with a genuine trend change. A single unusually high or low month can look like the start of a new trend when it's really just noise β moving averages and a longer observation window help distinguish the two, and jumping to conclusions from one or two data points is a common, avoidable error.
What's the difference between a moving average and the mean covered elsewhere on this site?
Does a longer moving-average window always produce a better result?
Is seasonality always tied to calendar seasons?
How does autocorrelation relate to the independence assumption in the Central Limit Theorem?
Share this article
Written by
Statistics Fundamentals Editorial Team
Written and reviewed by our team of statistics educators. Content is aligned with GCSE, A-Level, AP Statistics, and undergraduate curricula.
About Statistics Fundamentals β