Complex data with trends or a cyclic patterns are difficult to analyze.

So, essentially, because of that,

the Box-Jenkins procedure starts with taking a complex time series

and trying to convert it into

a stationary time series through the differencing operations.

Let's see an example.

So, here, we have a complex time series.

Note that this complex time series is not stationary.

First of all, the mean of the series change over time.

Sometimes it is basically changing.

Sometimes it's constant over time.

Sometimes it shows a trend.

So, this is clearly not a stationary time series.

However, if we apply differencing on this time series, that is,

if you basically instead of representing the series with the observed values,

but the difference of the observed values, in time,

we might be able to get a more stationary time series.

So, differencing usual helps us take

a complex data and convert it into a simpler stationary data.

Because of that, Box-Jenkins procedure usually starts with differencing.

So you take the data, you apply differencing to see whether you

can make the data as stationary as possible.

Now, once you obtain the stationary data,

as stationary as possible,

then the next step essentially is to do what is known as plot analysis.

That is, we will basically drop in certain plots,

and we'll basically visual analyze those plots to see whether we

can discover the parameters of the underlying model.

But what are we plotting? What are we plotting?

So, what are these things that we will be plotting?

We will not be plotting the time series themselves.

We'll be plotting the statistical properties of the time series.

The first statistical property of the time series that we care about is known

as the autocorrelation function of the time series.

The autocorrelation function essentially is a function that helps us observe

linear relationships between lagged values of a given time series.

So this is the close form formula of the autocorrelation function.

Essentially, you will see here,

is that we are basically,

so this is from earlier lectures.

You will remember that this is a correlation.

This essentially is the correlation between two time series.

In this case, we're finding the correlation between

the time series itself and the lagged values of the time series.

That is, the shifted version of the time series.

So we can visualize it like this.

So I'm given the time series.

So this is my time series.

It's sort of a small part of the time series.

There is the past, and there is the sort of the future.

So, it's a longer time series.

So I'm here basically.

Let's assume that the color correspond to the value.

The darker means higher value.

The lighter means, say, a lower value.

Essentially, what we do is basically we take

lagged values of the time series and we compare them.

In this case, for example,

we can basically look at when lag is equal to 0.

Essentially, what we are doing is we're comparing the time series with itself.

We find the correlation of the time series with itself.

We're comparing value by value,

and we are seeing are these values similar.

That's what correlation does if you remember.

Obviously, if you basically have no lag in the data,

if you don't shift the data,

we will have a very high correlation because this time series here,

which is X_t, look very similar to this time series,

which is X_t plus 0, which is again X_t.

In fact, the correlation,

in this case, will be 1.

The ACF with lag equal to 0 will have the value 1.

It is going to be perfect match,

perfect alignment, or let's treat it like zero.

Next, what we will do is we will apply a shift.

We'll basically shift the time series with one unit.

In this case, our lag is equal to 1.

Note that when we apply a shift,

lag equal to 1, when we shift the time series a bit, rather,

we shift the time series a bit, just a bit,

what's happening is that there are sort of observation

start differing from each other at the same point.