A simple and a popular method for removing untrained and a seasonal pattern from a cities is by the
operation of different thing.
Different thing means taking the difference between two values.
So a lag.
One difference, which is also called first difference, means that we are taking difference between
every two consecutive values in the series.
For example, in this snippet of a line mice data, you can see that in this second column we have a
line Miles traveled in the third column.
We have lag one values of these data points.
So the mileage value of January is now present in the second row.
The mileage value of fab is now present in the third row.
So this is basically lag one value of this Miles column.
When we difference these two.
So if you look at the second row, the difference between these two values is minus six.
Forty nine for the third row.
The defense's nine zero six.
So there's different values, creates another series.
And this series is called Lag One, Different Cities.
Similarly, if you want to generalize, we can say that different thing at laggy is subtracting devalue
from gay periods back.
So it is basically whity.
That is pantry's value at twenty minus times, these value at Bain B minus key.
So for example, for our daily series lags seven.
Defensing means subtracting from each value.
The value of same day in the previous week.
This technique of defending is used to remove print and seasonal patterns and obtain cities which like
both of these things.
So let's see how we remove print.
And if we got on the top, you can see that our times this has a clear upward trend.
When we do a flag, one different thing and bloddy lag one difference values these values.
Now do not have any visible print.
And you can also notice that this method of lag when the printing does not assume that the trend is
global.
So even if in the initial part of this series you had a slow upward trend.
And in the later part of the series, the upward trend increases.
Still, your lag when the printing will give you beat rendered cities.
When you do one time different thing, you'll be able to remove linear drinks for quadratic and exploring
children.
We often have another round of lag when the printing, which has to be applied to our different series.
So for a quadratic print, we will take the new series and do different thing again.
Does it is that we will get then will not have the quadratic ring.
Once you have a series which does not have print.
You can use different ink to remove seasonality also for removing a seasonal pattern with M seasons
with different at a lag.
And for example, to remove a monthly pattern in our monthly data, we can take lag where difference.
This means that if your sales undergo a cycle within one year, that is, for example, in the month
of June and July, you have increasing and nearly closing of the year your sales dip in such scenarios.
We can say that there is a yearly cycle and seasonality is monthly to remove this kind of seasonality.
We will do a lag.
Defensing.
So you will different the sales value of July 2020 with the sales value of July 2019.
The resulting series that you will get will be be seasonal least seasonality will be removed from it.
If you have weekly seasonality, that is, if on weekends your sales increase and on weekdays your sales
decrease.
Then we can do a lag.
Seven different thing in which we will subtract the sales of last Sunday from this Sunday.
You can see in this graph also when we apply these seasonality on this left graph, we get this new
graph which is not showing any particular cyclic seasonal effect.
The seasonal pattern is more prominent in the initial part of the series.
And you can see that here the seasonal pattern is now removed in the final cities in case you have bought
trend and seasonality in your data.
You have to do different thing twice, once to remove the trend.
And second, to remove these seasonality in this way from the initial cities where you have both tendencies,
Naledi, and you cannot apply many of our methods which only apply to cities which do not have prevented
naledi.
We apply this method of defensing to get a series which do not have random seasonality.
And then we can apply those models where the cities must be D seasonal later.
Detering.