Definition of Time Series Core
A time series is a sequence of data points collected or recorded at successive, equally spaced points in time. It is used to analyze patterns, trends, and relationships over time, enabling forecasting and decision-making.
The key characteristic of time series data is the temporal ordering — the sequence matters, and observations are not independent.
Why Time Series Matters
Time series analysis helps us understand the past, monitor the present, and predict the future. It is foundational in fields like economics, finance, meteorology, epidemiology, and signal processing.
Components of Time Series Detailed
A time series is typically decomposed into four distinct components:
Trend
Long-term increase or decrease in the data over time. Reflects the general direction.
Seasonal
Regular, predictable patterns that repeat within a fixed period (day, week, month, quarter, year).
Cyclical
Fluctuations that occur over longer, irregular periods — often tied to economic or business cycles.
Irregular (Noise)
Unpredictable, random variations that cannot be attributed to trend, seasonal, or cyclical patterns.
Visual decomposition of a time series into Trend, Seasonal, Cyclical, and Irregular components.
Individual Component Plots
Each component isolated to highlight its distinct pattern.
Trend
Smooth long‑term movement
Seasonal
Regular periodic fluctuations
Cyclical
Longer, irregular cycles
Irregular
Random noise / residuals
Each component plotted on its own scale to show its unique behavior.
Time Series vs Cross‑Sectional vs Panel vs Longitudinal
Understanding the differences between these data structures is essential for choosing the right analytical approach.
| Feature | Time Series | Cross‑Sectional | Panel | Longitudinal |
|---|---|---|---|---|
| Definition | Observations of a single entity over time | Observations of many entities at one point in time | Multiple entities observed over time | Same individuals tracked repeatedly over time |
| Dimension | 1D (time) | 1D (entities) | 2D (entities × time) | 2D (individuals × time) |
| Purpose | Forecasting, trend analysis | Comparing groups, prevalence | Combines cross-section & time | Change within individuals |
| Independence | Dependent over time | Independent observations | Dependent within entity | Dependent within individual |
📊 Examples
- Time Series: Monthly sales of a single store (2015–2025)
- Cross‑Sectional: Sales of 100 stores in January 2025
- Panel: Sales of 100 stores for each month from 2015–2025
- Longitudinal: Health metrics of 1,000 patients measured yearly
🔍 When to Use
- Time Series: Forecasting, detecting trends
- Cross‑Sectional: Surveys, A/B testing, prevalence studies
- Panel: Econometrics, policy evaluation, fixed-effects models
- Longitudinal: Clinical trials, developmental psychology
Key characteristics compared across data types.
Time Series Models vs Regression vs ANOVA
These three statistical approaches serve different purposes. Here's how they compare with practical examples.
| Aspect | Time Series Model | Regression Model | ANOVA |
|---|---|---|---|
| Goal | Forecast future values from past | Model relationship between variables | Compare means across groups |
| Data Type | Sequential, time‑ordered | Independent observations | Categorical predictor, continuous response |
| Key Assumption | Stationarity / autocorrelation | Independence, homoscedasticity | Normality, homogeneity of variance |
| Example | ARIMA forecasting stock prices | Predicting house price from size & location | Testing if 3 fertilizers give different yields |
| Output | Forecasted values + intervals | Coefficients, R², p‑values | F‑statistic, group means, p‑values |
Forecast next month's sales using past sales data, accounting for trend and seasonality.
yt = c + φ₁yt−1 + … + θ₁εt−1 + εt
Predict a student's GPA based on study hours, attendance, and prior grades.
y = β₀ + β₁x₁ + β₂x₂ + … + ε
Compare the average test scores of students taught using three different teaching methods.
F = MSbetween / MSwithin
Key Insight:
Time series = time dependency
Regression = association
ANOVA = group differences
Conceptual comparison of model outputs.
Stationarity & Autocorrelation Advanced
Stationarity is a fundamental concept in time series analysis. A time series is stationary if its statistical properties — mean, variance, and autocorrelation — are constant over time. Most forecasting models assume stationarity.
✅ Stationary Series
- Constant mean over time
- Constant variance over time
- Covariance depends only on lag, not time
- No trend or seasonal patterns
❌ Non-Stationary Series
- Changing mean (trend)
- Changing variance
- Seasonal patterns
- Unit root (random walk)
How to Check for Stationarity
- Visual: Plot the series — look for trends, seasonality, changing variance.
- ACF Plot: For a stationary series, autocorrelations decay quickly.
- Statistical Tests: Augmented Dickey-Fuller (ADF) test, KPSS test.
Autocorrelation Function (ACF) & Partial ACF
ACF measures the correlation between a series and its lagged values. PACF measures the correlation after removing the effects of intermediate lags.
ACF (blue) and PACF (orange) for a simulated AR(1) process. The dashed lines represent the 95% confidence interval.
📚 Resources — Books, Notes & Lectures
All materials are managed securely on the server. Files are uploaded via WinSCP and are read-only for website visitors.
Backend-Controlled Library
To add or update files, use WinSCP to place files in the /resources/ directory on the server.
Categories can be assigned by editing the metadata.json file.
Available Files
0 itemsLoading files...
Books
Upload full textbooks or reference PDFs.
Notes
Lecture summaries, cheat sheets, handouts.
Lectures
Slides, transcripts, or recorded sessions.