Now we will discuss a concept called seasonality in data.
When we have time data and our data shows recurring patterns such as high is coming every three months.
Other low coming in a particular season, such type of data is called seasonal data can have seasonality
because of the weather.
For example, every year.
Ice cream sales are higher in summer and lower in winter.
Or seasonality for tourism industry.
Depends on holidays and vacations.
Now, the variance in sales due to this season of the year may not be explained well by other factors
of model and hence our model will not fit well.
Therefore, it is advisable that we remove seasonality from the data.
To do that, we usually find a correction factor, which we multiply with the data to get a normalized
value.
To calculate this factor, we can use this formula.
M is equal to mean of a year divided by means of month.
This will give us multiplication factor for each observation.
Let me show you an example of how this is done.
Here I have data off sales in the last three years and every year in the first six months, sales show
a rise and then a dip.
You can look at this graph from month one two, month three.
There's a race.
Month three and four.
There's a flood.
And after month food, there is a dip.
After understanding the business context, if we are sure that this is due to the seasonal nature of
sales, we find the factors to normalize these sales figures.
If we use the formula shown earlier.
I will get multiplication factors of each value.
So this valley of 21.
We'll get multiplication factor.
By dividing mean of this year, by means of this month.
But because the mean of these three years is almost similar.
I have used population mean and divided by month, meaning I would suggest that you try doing it for
each cell.
So using population means divided by month, I mean, I have found these factors here, which I have
multiplied with these sales figures.
And below in this table, I have these multiplied values.
So you can see if you multiply 21 with one point five two, you get thirty one point nine four.
If you mind about twenty three with one point five two, you'll get thirty four point nine nine.
So this is all this table is created using the multiplication factors.
You can see that these old values are now in the same range and data is not seasonal.
Not this data can be used for analysis and can be fed to our model.
So this is all to move seasonality.