What is time series analysis?
The AI Glossary
In our classes, we often pause to explain the ideas behind AI and the language used to describe it. These posts grew out of those conversations. They’re for anyone who would like to understand AI better, with no technical background assumed.
Time series analysis studies measurements recorded in time order. The order matters because a value can depend on what happened before it. Daily appointment demand, weekly infection counts and minute-by-minute heart-rate readings are all time series, although they operate at very different speeds.
A series may contain a trend, meaning a longer-term increase or decrease, and seasonality, meaning a pattern that repeats over a recognizable interval. A clinic may receive more calls on Mondays; some infections have seasonal peaks. There is also variation that the chosen model does not explain.
Analyzing a time series can mean describing these patterns, identifying a change or forecasting future values. Forecasting is only one application. A method that describes last winter’s pattern well may still be unreliable when predicting the next winter.
The timing of observations needs attention. Some measurements arrive at regular intervals; others are taken only when something prompts a check. A patient whose laboratory tests are repeated frequently may be receiving more intensive care. The frequency of testing can itself contain information—and can change when the service changes its practice.
Evaluation should respect time. To simulate a prediction made on Tuesday, use only information available by Tuesday. Randomly mixing future and past observations can create an unrealistically easy test. Predictions should also include an account of uncertainty where appropriate, rather than presenting one forecast as an inevitable outcome.
Wearable devices make personal time series more accessible, but continuous recording is not continuous clinical understanding. Missing data, device changes, movement and measurement error can alter the apparent pattern. A change relative to a person’s usual range may deserve attention without identifying its cause.
For an emergency department forecasting next week’s staffing needs, a useful starting comparison is often simple: recent averages or the equivalent week last year. A more complicated model needs to improve on that baseline in a way that affects shift scheduling or patient wait times. The point is to make a better decision under uncertainty, not merely to draw a convincing line beyond the last observed value.
Sources: Hyndman and Athanasopoulos — Forecasting: Principles and Practice, third edition; scikit-learn — Cross-validation: Evaluating Estimator Performance
Further reading from Harvard Chan: Public Health Perspectives — To Meet Future Needs, Health Care Leaders Must Look at the Data (Science) (2022); Harvard Chan — Using advanced statistics and AI to improve health (2026).
To learn more, take a look at the AI in Health Care Certificate of Specialization from the Advanced Learning Academy at Harvard T.H. Chan School of Public Health. You can take an individual course or work toward the full certificate.
I’m a doctor, not a statistician. I teach the AI in Health Care Certificate of Specialization with Dr. Heather Mattie, a statistician and co-director of Harvard Chan’s Health Data Science master’s program. For more on data science and statistics, see Harvard Chan’s Health Data Science resources.
AI is a fast-moving field. This explanation reflects our class discussions and related material at the time of writing. Terminology, capabilities and tools may change.
For suggested additions or corrections, please email me at tpanch@hsph.harvard.edu.
Dr. Trishan Panch
Program Director, AI in Health Care
Harvard T.H. Chan School of Public Health — Advanced Learning Academy
Lead with AI in Health Care
The AI Pragmatist is a monthly newsletter from ALA faculty, with new explainers & essays from the Advanced Learning Academy