MATH546 - Module1 - Lesson1 - What Are Time Series
MATH546 - Module1 - Lesson1 - What Are Time Series
This course is about the analysis of time series. Put simply, a time series is just a set of data over
time. More specifically, a times series involves two ingredients:
(1) A collection of times
(2) A set of observations, all of the same type, with exactly one observation associated to each time.
For example, the collection of times could consist of each day in the calendar year, and the set of ob-
servations could be the daily high temperature in Chicago. Or the collection of times could consist of
quarters in the fiscal year, and the set of observations could be the earnings per share of a given stock.
Or it could just be a list of ten numbers xt , t = 1, 2, . . . , 10, without any inherent meaning:
t 1 2 3 4 5 6 7 8 9 10
xt 3 1 5.32 9 −2.22 5.2 7 −99 4 0
Though at its core, a time series is just a list of numbers like the one in the table above, it is typically
much more useful for larger time series datasets that arise in practice to have some way of visualizing,
rather than just listing, the data. Figures 1, 2, and 3 below show examples of time series plots.
F IGURE 1. Johnson and Johnson quarterly earnings data. Naturally, there are four actual
data points associated to each year. The default settings for the plotting command in R
(the program used to generate this figure) have used interpolation between the datapoints
to make the plot easier to look at.
1
Introduction to Time Series What are Time Series? Module 1, Lesson 1
We’ll talk later about how to generate plots ourselves (including the plots in Figures 1, 2, and 3)
from datasets, using the popular software called ‘R,’ which you’ve most likely heard of (or perhaps even
used). But let’s not get ahead of ourselves. Before jumping into anything too complex, let’s talk a little
bit about the purpose (at least, at a high level) of what we plan to learn about.
There are a number of reasons why time series are interesting to study, but perhaps the most com-
pelling motivation is that time series analysis gives us a way to use the past (an existing time series) to
predict the future. Of course, ‘predict’ here means making an educated guess rather than prognosticating
with any kind of true certainty, but such an educated guess can be immensely useful. For example, an
airline would be very interested in the kind of time series plotted in Figure 3 (along with a lot of other
data, of course) when determining what its future flight offerings and prices should look like, since even
2
Introduction to Time Series What are Time Series? Module 1, Lesson 1
a cursory glance at the plot allows you to heuristically get a pretty good idea of the number of passengers
to expect each month over the next year or two.
Now, if we want a more precise prediction of what happens each month, or if we are considering
a data set where the patterns are less clear, we’ll want to create a time series model for our dataset.
Basically, we make the assumption that our dataset is a single realization of a stochastic process1. There
are always of course many possible sequences of stochastic processes that could have our time series as
a realization; we use some appropriate criteria to choose the ‘best’ one for our purposes. Then, having
chosen our model, we assume that the stochastic process will continue on its current ‘trajectory,’ which
we use to forecast likely possibilites for future data.
If you haven’t done much modeling in the past, the explanation above might seem a bit opaque at the
moment. But don’t worry—we’ll get into more details about all of this later on! For now, just be aware
that there is a meaningful distinction between time series data and a time series model. One (simplified)
version of the paradigm is suggested in the diagram below.
3. ACKNOWLEDGMENTS
The plots in this document were generated by the author, using the software R. The data used to
generate these plots was taken from the pre-loaded, publicly available package datasets; the datasets
1
A stochastic process is a sequence of random variables.
3
Introduction to Time Series What are Time Series? Module 1, Lesson 1