In this article, we will use the data on divorce cases per month to break down the time series into seasonal factors, trends, and irregular series.Excluding the seasonal factors, the divorce trend at the end of the Heisei period Certain features " I understand.
in Japan Three Month Is a farewell month.This year, the graduation ceremony has been canceled due to the influence of COVID-19 (new coronavirus infection), the farewell party has been canceled, but it is also a month to put a break in my life .
Some people will experience the sad divorce of “divorce”.News often reports about celebrity divorces, but is the number of divorces actually increasing? By referring to the Ministry of Health, Labor and Welfare's demographic statistics, the number of divorces per month can be determined. Consider the number of divorces * from January 2014 to December 2019 (the latest published month as of this writing). to watch.
* Note: Preliminary data is used for all months.
What is the number of divorces per year?
First, let's make a bar chart of the number of divorces in each year.

The number of divorces per year has been gradually decreasing since 2015, but has started to rise slightly in 2019.The number of divorces in 2018 was 212,393, compared to 212,955 in 2019.
For reference, the figure below shows the number of divorces and marriages by year as a line graph.The blue line at the top is the number of divorces, and the red line at the bottom is the number of marriages.You have a similar tendency.Divorce can not be related to marriage because divorce can not be achieved unless you are married in the first place.

Why was the number of divorces in 2019 slightly higher than in the previous year?So, let's make a line graph of the number of divorces per month.

From this graph, the number of divorces has a clear monthly trend (seasonality).Again, the most prominent is March, which is overwhelmingly higher than the other months, and it can be seen that the other month also increases in December.You can imagine the consequences of divorce during breaks.
However, there is one thing that I care about.The average number in April is sharply lower than that in March of the same year, but only slightly decreases in April 2019.
In addition, monthly trends are easy to understand
This time, let's overlay the yearly line graph with the month as the horizontal axis.

The red line is 2019, but the number of divorces in April is higher than in other years, indicating that it has not decreased much compared to March.
April 2019 is the last month of Heisei.It is thought that many couples wanted to put a break before the era changed.
Removing Seasonality by Decomposing Time Series
Time series data can be broken down into several factors, such as seasonality and trends.Decomposing can remove seasonality and trends from the original time series.
For example, you can decompose the original time series into seasonal factors and trends, as well as irregular series that cannot be explained by these, as shown in the following figure.

Therefore, an irregular series is a time series that excludes seasonal factors and trends from the original time series.
Here is the result of such a decomposition of the divorce data *.
* The X11 method is used as the time series decomposition method.
◆ Seasonal factors

Monthly trends are extracted.You can see that there is seasonality, with values small in January and February and large in March and December.
◆ Trend

This is a trend graph.As a whole, it can be seen that the trend is decreasing, but there are mountains in the first half of 2015 and the second half of 2018.The fact that divorce cases were extremely high in March 2015 and that of divorce cases in 2018 compared with October of other years in October was the cause of the peak at that time.
◆ Irregular series
The time series that could not be extracted by the above seasonal factors and trends are shown.In other words, it is a series that is calculated as "Irregular series = original time series-seasonal factor-trend".

April 2019, the last month of the Heisei period, was extremely abnormal even if seasonal factors and trends were excluded, so it was an unusual month.
In addition, September 2018 came out as a small value.Since the next month, October 2018, shows a large value, it is probable that there was some reason to divorce in October instead of September in 2018.I can't think of it right away, but why don't you consider the cause?
Changes in the number of divorces excluding seasonality
Finally, in the figure below, a line graph (red) excluding seasonal factors is superimposed on the original divorce line graph (blue).
Red polyline = Original divorce polyline-Seasonal polyline

The numerical value of the red line graph is calculated as follows, for example, in April 2019.
21,061 (original time series) = -36.53 (seasonal factors) + 17,543.89 (trend) + 3,553.64 (irregular series)
Adjusting for seasonal factors
There are unexpectedly many time series data with seasonal factors nearby.Retail store sales, power consumption, and the number of people who have infectious diseases can be considered, but we may see trends after adjusting for seasonal factors in these data, as in this example of divorce cases.
The Statistics Bureau, Ministry of Internal Affairs and Communications, explains in an easy-to-understand manner about statistical thinking and how to read statistical information. https://www.stat.go.jp/koukou/index.html ), Which contains a clear explanation of adjusting for seasonal factors. https://www.stat.go.jp/koukou/trivia/careers/career9.html ).