JURNAL FOURIER | Oktober 2025. Vol. No. 2, 56-67 DOI: 10. 14421/fourier. ISSN 2252-763X E-ISSN 2541-5239 Analysis of Inflation Rates During and After the COVID-19 Pandemic Using the K-Means Clustering Method and Kruskal-Wallis Test Riska Nuril Fadhila1. Nurissaidah Ulinnuha2. Moh. Hafiyusholeh3 Program Studi Matematika. Fakultas Sains dan Teknologi. Universitas Islam Sunan Ampel. Jl. Dr. Ir. Soekarno No. 682 Gunung Anyar. Surabaya 60294. Indonesia Korespondensi. Nurissaidah Ulinnuha. Email: nuris. ulinnuha@uinsa. Abstrak Inflasi terjadi ketika permintaan yang berlebihan mengakibatkan peningkatan harga barang dan jasa secara keseluruhan. Saat pandemi COVID-19, angka inflasi di Indonesia melandai karena melemahnya ekonomi. Namun, pada tahun 2022 terjadi lonjakan inflasi pasca COVID-19, karenakan meningkatnya permintaan masyarakat seiring membaiknya kondisi Inflasi yang stabil adalah syarat bagi pertumbuhan ekonomi yang berkelanjutan dan dapat meningkatkan kesejahteraan masyarakat. Dalam penanganan masalah inflasi di berbagai wilayah, variabel dan keadaan unik di setiap daerah sangatlah penting untuk dipertimbangkan. Penelitian ini bertujuan untuk mengetahui apakah ada perbedaan signifikan dalam pengelompokan tingkat inflasi di Indonesia pada saat dan pasca pandemi COVID-19. Hasil penelitian menggunakan uji Kruskal-Wallis dan metode K-Means didapatkan pengelompokan tingkat inflasi dengan yco = 2 memberikan hasil yang baik, ditunjukkan oleh nilai Silhoutte Coefficient sebesar 0,53. Selain itu, terdapat perbedaan signifikan antara tahun saat . dan pasca . COVID-19 yang dibuktikan melalui uji Kruskal-Wallis dengan p-value<0,05. Kata Kunci: Inflasi. K-Means Clustering. Kruskal-Wallis Abstract Inflation occurs when excessive demand results in an overall increase in the prices of goods and services. During the COVID-19 pandemic, the inflation rate in Indonesia leveled off due to the weakening economy. However, in 2022, there was a spike in post-COVID-19 inflation due to increased public demand as pandemic conditions improved. Stable inflation is a requirement for sustainable economic growth and improving people's welfare. In handling inflation problems in various regions, variables and unique circumstances in each region are very important. This research aims to determine whether significant differences exist in the clustering of inflation rates in Indonesia during and after the COVID-19 The research results using the Kruskal-Wallis test and the K-Means method obtained that the clustering of inflation rates with k=2 provides good results, as indicated by the Silhouette Coefficient value of 0,53. In addition, there is a significant difference between the current . and post . years of COVID-19 as evidenced by the Kruskal-Wallis test with a ycy Oe ycycaycoycyce < 0,05. Keywords: Inflation. K-Means Clustering. Kruskal-Wallis Introduction Developing countries often face high inflation and slow economic growth, while stable inflation is important to prevent economic instability due to its potentially positive or negative effects . The Coronavirus Disease (COVID-. has impacted education, tourism, and the economy. Inflation is one of the consequences of the COVID-19 pandemic. Inflation is a condition where there is overall excessive demand for goods and services . High and unstable inflation has a negative impact on the socioA 2025 JURNAL FOURIER Versi online via w. Analysis of Inflation Rates During and After the COVID-19 . economic conditions of society. Therefore, inflation control is based on the understanding that stable and low inflation is the foundation for sustainable economic growth, which ultimately improves the welfare of society . There are several reasons for controlling inflation, one of which is a top priority for the government. First, inflation can cause income inequality. Second, inflation can reduce domestic savings, which are a source of investment funds for developing countries. Third, inflation can cause a trade deficit and increase foreign debt. Fourth, political instability can be triggered by inflation . Based on the provisions of the Minister of Finance Regulation (PMK), the government works with Bank Indonesia to set inflation targets to maintain stable inflation rates. The purpose of these inflation targets is to help economic actors and the community carry out their activities by keeping inflation rates low and stable . Nationally, consumer price inflation between 2020 and 2023 peaked in September 2022 at 5,95% (BPS, 2. During the COVID-19 pandemic, inflation rates in Indonesia declined due to the weakening However, in 2022, there was a post-COVID-19 inflation surge due to increased public demand as the pandemic situation improved. Excessively high inflation has a negative impact on the economy, while deflationary conditions are also unfavorable for the economy . Understanding the differences in inflation during and after the COVID-19 pandemic can help the government plan finances, manage investments, and anticipate long-term economic impacts . Additionally, understanding changes in inflation enables the government to make wiser decisions in addressing dynamic economic situations . The problem faced is the instability of prices of basic commodities and daily necessities in various regions due to differences in regional economic policies. To overcome this, the government formed the Regional Inflation Control Team (TPID), which enables each region to be more responsive in identifying and addressing the causes of inflation in their respective areas, as well as providing various information and strategies to maintain regional economic stability . There are 90 cities in Indonesia that have recorded inflation rates along with their commodities. In this research, the capital city was taken as a sample that could represent the conditions of a province that is the economic and administrative center of a region. As a country that implements regional autonomy, each province has the authority to regulate its own economic activities. This makes the sources of inflation increasingly diverse, with various policies and internal factors affecting the inflation rate in each region . In research . that the Ordinary Least Squares (OLS) method was used to analyze the impact of COVID-19 on inflation in Indonesia, and it was found that an increase in the number of new COVID-19 cases per day caused a decrease in inflation, indicating an impact on consumer purchasing power. analyzing inflation changes in several major cities on the island of Sumatra. Indonesia, using the Kruskal-Wallis test, it was found that in 2022, the overall inflation rate was considered normal. Research . showed that economic growth was influenced by inflation by 21,6% using the simple linear regression method with an R-squared value of 0,216. Additionally, research . used the K-Means clustering method to group inflation in West Java and found that the best cluster was k = 5 with a DBA value of 0,063 and 100% accuracy. In research . which used the K-Means clustering method with k=3, the standard deviation ratio was 1,43. This can be used as a reference for grouping cities in Indonesia based on inflation indicators. Research . which grouped inflation before and after the COVID-19 pandemic in 34 provincial capitals in Indonesia using the K-Means clustering method, showed a decrease, increase, and stabilization in cluster levels, where the COVID-19 pandemic had a negative impact on the Indonesian economy as a whole. This was obtained from the Paired Sample T-Test, which showed a significant difference between the clustering before and after the COVID-19 pandemic. In research . a comparison of market segmentation in the automotive sales market showed that the average silhouette coefficient for K-Means was 0,716, while the values for the DBSCAN and Hierarchical methods were 0,296 and 0,301, respectively. This indicates that the K-Means clustering method is more effective than DBSCAN and Hierarchical clustering for determining market segmentation. Based on previous research, the K-Means Clustering method was used to group inflation rates before and during the COVID-19 pandemic in Indonesian provincial capitals. This prompted researchers to JURNAL FOURIER . 14 56-67 Riska Nuril Fadhila, dkk explore whether there were significant differences in the grouping of inflation rates during and after the pandemic using the Kruskal-Wallis test and the K-Means method. The results are expected to assist the government in addressing high inflation rates in regional capitals. This research is expected to provide a better understanding of regional economic changes in Indonesia and serve as a basis for more effective policies in addressing future economic uncertainties. Basic Theory Inflation Inflation is a condition in which there is a general increase in prices that continues over a certain period of time . Inflation is calculated using index figures obtained from various types of goods traded on the market, adjusted for the growth rate of each economy . According to the definition from Bank Indonesia, inflation cannot be concluded solely from the increase in the prices of one or two commodities, but must be widespread and have an impact on the increase in the prices of other goods. This price increase is also often accompanied by a decline in purchasing power due to the weakening of a country's currency . Inflation can also be classified based on its causes into three main types: demand-pull inflation, costpush inflation, and built-in inflation . Demand-pull inflation is caused by an increase in aggregate demand in the economy, such as a surge in household consumption or investment. Cost-push inflation occurs when production costs rise, for example, due to increases in fuel prices or labor wages. Built-in inflation is related to expectations of future inflation, which typically trigger automatic price adjustments, including in the setting of wages and service rates affected by previous inflation . Controlled inflation reflects a healthy economic stability. However, if inflation is too high, it can reduce people's purchasing power and cause dissatisfaction in daily social and economic life . K-Means Clustering The K-Means method is a non-hierarchical clustering technique that separates data into two or more groups based on partitions. This method separates data so that each group has similar characteristics within it, while different groups have different characteristics . Besides being known as a centroidbased technique. K-Means is also famous for its simplicity and speed in clustering data . The K-Means clustering process goes through five stages, as follows . Determine the number of clusters to be formed with k Identify k centroids The initial stage in the K-Means clustering process is to randomly determine the starting point for each cluster. This step aims to determine the centroid that will be used to measure the distance of each data point within the previously defined cluster. The centroid is the center point of each The centroid is calculated by summing all data points within a cluster and dividing the result by the number of data points. The position of the centroid will change iteratively until it reaches an optimal position. The formula for the centroid of cluster i is as follows: ycO= Ocycu yco=1 ycuyco yco = 1,2,3. A , ycu Where, ycuyco : object to m ycu : number of objects included in the cluster Finding distance data for each cluster After finding the centroid of each cluster, the next step is to measure the distance between each data point and the cluster center. The following is the distance formula for one cluster: cu, y. = Anycu Oe ycAn = ocycuyco=0. cuyco Oe ycyco )2 . JURNAL FOURIER . 14 56-67 Analysis of Inflation Rates During and After the COVID-19 . Where, ycuyco : the value of data object m in the cluster to be searched ycyco : the value of data object m at the centroid : amount of data Group the data based on the closest distance between centroid values Determine the new centroid (C. by combining the current data in the same centroid to obtain the yayco = . cu ) Oc yccyco yco Where ycuyco denotes the number of members in group k, yccyco denotes the numbers in group k. Elbow Method K-Means is an algorithm that requires the number of clusters as initial input. Determining the optimal number of clusters is an important factor in ensuring more accurate clustering results . One commonly used method for determining the number of clusters is the Elbow method, which identifies the point at which adding more clusters no longer significantly reduces the Within-Cluster Sum of Squares (WCSS) value (Rajsya, 2. WCSS itself describes the total distance between each data point and its cluster center. Using the Elbow method, the point at which the decrease in WCSS value begins to slow down is called the Auelbow point,Ay which indicates the optimal number of clusters. The WCSS value can be calculated using the formula proposed by . ycOyaycIycI = Ocya yco=1 Ocycuyco OOyayco Anycuyco Oe yayco An Where, ya : number of clusters ycuyco : data point m in cluster k yayco : centroid of cluster k Anycuyco Oe yayco An2 : squared euclidean distance between data ycuyco and its centroid Silhouette Coefficient The evaluation stage used is the Silhouette Coefficient to test cluster quality. The distance between data is measured using the Euclidean distance formula to assess how close an object is to a particular group. The optimal k value is determined from the highest value . The following is the formula for the average distance of the mth data point from each data point in cluster C . co, y. = . OcycOOya ycc. co, y. Where, ycc. co, y. : the mean distance from the data to m each data point in cluster C . : the number of data in cluster C ycc. co, y. : the distance between data m and data j in cluster C The following is the equation for calculating the silhouette coefficient: Oeyca. = maxA. ,yca. } . Where, yc. : silhouette coefficient value for data to m : the mean distance between data m and other data outside cluster j : the mean distance between data m and other data in cluster j JURNAL FOURIER . 14 56-67 Riska Nuril Fadhila, dkk The average silhouette coefficient value of all data objects in a cluster indicates how well the data fits that cluster. Table 1 shows the criteria for assessing the silhouette coefficient . Table 1. Silhouette Coefficient Criteria Silhouette Index Value O 0,25 Interpretation of Silhouette Index Cannot be considered a cluster Weak cluster 0,26-0,50 Good cluster 0,51-0,70 Strong cluster 0,71-1,00 Shapiro-Wilk test The Shapiro-Wilk all sample sizes (<50 sample. For large data sets (>50 sample. , the KolmogorovSmirnov test is used. In this test, data is collected from a population assumed to be normally distributed, as stated in the null hypothesis. If p is greater than 0,05, the data is normally distributed and the null hypothesis is accepted. conversely, if p is less than 0,05, the hypothesis is rejected. The Shapiro-Wilk test is considered better at detecting non-normality in data . Formula for the Shapiro-Wilk test . ycO = ya [Ocycuyco=1 ycayco . cUycuOeyco 1 Oe ycUyco )]2 , ya = Ocycuyco=1. cUyco Oe ycUI)2 . Where, ycayco : Shapiro-Wilk test coefficient ycUycuOeyco 1 : the ycu Oe yco 1 number in the data ycUyco : data to m ycUI : sample mean With the testing criteria. H0 is accepted if ycO > ycy Oe ycycaycoycyce and H0 is rejected if ycO O ycy Oe ycycaycoycyce with a significance level . = 0,05. Kruskal-Wallis test The Kruskal-Wallis test is a statistical method that is an extension of the Wilcoxon test. This method is used when there are several sample groups that are not related to each other. The KruskalWallis test is also an extension of the one-way ANOVA test, which is used when the data does not meet the requirements for normal distribution . In this test, k independent samples are used from the same group. The Kruskal-Wallis test is used to compare more than two population groups under the following conditions . Non-normal distribution data Data > 2 independent sample groups Ordinal or interval-scaled samples The calculation is written as follows: ycI2 ya = ycA. cA . Ocycoyc=1 ycuyc Oe 3. cA . yc With the hypothesis: ya1 = yuN1 = yuN2 = A = yuNyco . there were no significant differences between one group and another. ya1 = yuN1 O yuN2 O A O yuNyco . there are significant differences between one group and another. JURNAL FOURIER . 14 56-67 Analysis of Inflation Rates During and After the COVID-19 . Methods Data Source This is a quantitative study using secondary data from publications by the Indonesian Central Statistics Agency . The variables used are the monthly maximum values of eleven inflation indicators from 2020 to 2023. The time period was chosen based on the year in which the COVID-19 pandemic occurred and the latest data available at the time of writing. For analysis, 2020Ae2021 were categorized as the pandemic period, and 2022Ae2023 as the post-pandemic period. Table 2 shows the inflation indicator variables: Table 2. Inflation Indicators for 2020-2023 Variables X10 X11 Indicators Food, beverages, and tobacco Clothing and footwear Housing, water, electricity, and household fuel Household equipment, appliances, and routine Healthcare Transportation Information, communication, and financial services Recreation, sports, and culture Education Food and beverage provision/restaurants Personal care and other services In this study, the capitals of 34 provinces in Indonesia, whose inflation rates are measured by the Central Statistics Agency (BPS), were used as subjects. Inflation calculations are carried out by BPS Indonesia through surveys that collect various data on goods and services that are considered representative of public consumption spending. The inflation rate is then calculated by comparing prices over the previous period. One of the statistical techniques used to group data is clustering analysis. This technique searches for and groups data based on similarities in characteristics between data points. There are two types of data grouping categories: hierarchical and non-hierarchical. Steps The flowchart used in this study is shown in Figure 1. JURNAL FOURIER . 14 56-67 Riska Nuril Fadhila, dkk Figure 1. Research Flowchart The stages of analysis that can be carried out are as follows: Prepare research data, consisting of eleven inflation indicator variables from 34 provincial capitals in Indonesia for the 2020Ae2023 period. Perform the clustering process using K-Means. The process begins by determining the optimal number of clusters . using the Elbow Method, followed by initialization of k centroids, calculating the Euclidean distance of each data point to its nearest centroid, grouping data based on the smallest distance, and updating the centroid positions iteratively until convergence. Evaluate the clustering quality using the silhouette coefficient to identify the year with the most optimal cluster structure Conduct a normality test using the ShapiroAeWilk test to examine the distribution of the centroid Since the data were not normally distributed . < 0. , further analysis was performed using a non-parametric approach. Apply the KruskalAeWallis test to determine whether there are statistically significant differences in inflation cluster distributions across the four observation years . 0Ae2. Interpret the clustering patterns and statistical test results to identify regional differences and temporal shifts in inflation levels during and after the COVID-19 pandemic Draw conclusions based on the overall analysis results and their economic implications Results and Discussion Data description The data variables used are inflation indicators by group based on observations of provincial capitals in Indonesia, totaling 34 capitals from 2020 to 2023. There are indicators with relatively high inflation, namely, the inflation indicator by transportation group (X. in 2022 in Manokawari City with a figure of 13,62, the education group (X. in 2020 in Manado City with a figure of 10,69, and the health group (X. in 2023 in Pangkal Pinang City with a figure of 10,01. The maximum value for each inflation indicator by group in each region will be used for data grouping. Based on the maximum value of each inflation indicator, the next step is to group the data to see the similarity patterns between regions. Before determining the optimal grouping results, the appropriate number of clusters is first determined using the Elbow Method. JURNAL FOURIER . 14 56-67 Analysis of Inflation Rates During and After the COVID-19 . Figure 2. Visualization of Elbow Method Results . Based on the visualization results in Figure 2, it can be seen that the Within-Cluster Sum of Squares (WCSS) value decreases sharply from the 2nd cluster to the 3rd cluster, but after that the decline begins to level off. The elbow point is clearly visible at the 2nd cluster with a WCSS value of 385. This point indicates that at the second cluster, adding more clusters does not significantly reduce the WCSS value. Thus, it can be concluded that the optimal number of clusters for grouping inflation data between provincial capitals in Indonesia is two clusters . = . These results indicate that the characteristics of inflation between regions can be grouped into two main groups, each representing differences in inflation patterns or levels among provinces during the observation period from 2020 to 2023. For validation of the Elbow Method results, the Silhouette Coefficient value was calculated for each year of observation . 0Ae2. This value is used to assess the quality of clustering, where a higher value indicates a better cluster, as shown in Table 3. Table 3. Comparison of Silhouette Coefficient Values for 2020Ae-2023 Year Silhouette Coefficient Value 0,33 0,51 0,53 0,41 Based on Table 3, the highest Silhouette Coefficient value was obtained in 2022, which was 0,53. This indicates that the clustering structure in 2022 was the best compared to other years, so the results of that year's clusters were used as the basis for further analysis. Inflation Clustering Results In 2022, there was a surge in inflation in Indonesia after COVID-19, due to increased public demand as the pandemic situation improved. Based on the classification of inflation in 2022, there were two cities with high inflation but lower average inflation than other cities. In 2023, inflation rates at the beginning of the month were still relatively high. However, these inflation rates remained within the government's target range, with the 2023 inflation target set at 3A1%, and a year-on-year . -o-. inflation rate of 2,61%. The high inflation at the beginning of the month was attributed to the El Nino phenomenon, which JURNAL FOURIER . 14 56-67 Riska Nuril Fadhila, dkk impacted fluctuations in the prices of basic commodities. However, from January to December 2023, food prices were recorded to have decreased. As a result, the inflation rate continued to decline over time. The classification of provincial capitals in Indonesia after the COVID-19 pandemic has undergone various changes, with some rising from high to low, some falling from high to low, and some remaining This is in line with a report from the Central Statistics Agency, which recorded an increase in inflation in 2022 and a decrease in inflation in 2023. The Bank of Indonesia has also been recognized for implementing several effective monetary policies to control demand for petroleum products, which directly impacts the Consumer Price Index. Additionally, the government's efforts to improve goods distribution have contributed to curbing inflation. Based on the results of inflation cluster grouping in Indonesian provincial capitals during the period 2020 to 2023, most cities remained in cluster 0 . ow inflatio. with no significant changes between years. This shows that despite price pressures due to economic recovery and external factors such as food commodities, inflation rates in many capital cities remained manageable and stable. On the other hand, there were several cities that experienced cluster shifts, either upward or downward. For example. Bandar Lampung City moved from cluster 0 to cluster 1 in 2022 and then back to cluster 0 in 2023, and Jayapura City consistently remained in cluster 1 . igh inflatio. during the four years of observation. These findings reflect that inflation dynamics vary between regions, especially in eastern or island cities that are more vulnerable to price fluctuations and distribution constraints. Nevertheless, the overall results show that the majority of provincial capitals have relatively stable inflation conditions, in line with national data showing that Indonesia's inflation in 2023 was recorded at 2,61% . -o-. and returned to the government/Bank Indonesia target range . A 1%). The inflation grouping process is carried out separately for each year, so that the cluster results formed in each year represent the relative conditions between regions in that year, not a direct comparison between years. Therefore, a city's change in position from a high cluster to a low cluster . r vice vers. does not always indicate an absolute increase or decrease in inflation, but rather a shift in position relative to other regions based on the inflation pattern in the year in question. For example. Pangkal Pinang City was included in cluster 1 in 2020, but was not included in cluster 1 in 2021. This does not mean that inflation in Pangkal Pinang City has decreased significantly, but rather illustrates that in 2021 there were other cities with relatively higher inflation rates, causing Pangkal Pinang's relative position to shift to cluster 0. Table 4 shows details of capital cities included in cluster 1 with maximum values for each year of observation. Table 4. Provincial Capitals with High Inflation Categories (Cluster . 2020Ae-2023 Year Capital city with High Inflation Categories Pangkal Pinang. Tanjung Pinang. Manado. Ambon. Ternate. Manokwari. Jayapura Kendari. Ambon. Manokwari. Jayapura Bandar Lampung. Jayapura Kupang. Banjarmasin. Jayapura. From these results, it can be seen that Jayapura City has consistently been in the high inflation group throughout the observation period, while other cities show more fluctuating dynamics. This pattern illustrates that eastern Indonesia and several island cities tend to be more vulnerable to price pressures due to dependence on goods distribution and extreme weather changes, such as the El Niyo phenomenon. Kruskal-Wallis Test The Kruskal-Wallis test was used to test whether there were significant differences between two or more independent groups. Previously, a normality test was performed using Shapiro-Wilk to ensure the JURNAL FOURIER . 14 56-67 Analysis of Inflation Rates During and After the COVID-19 . distribution of the 2020 to 2023 inflation centroid data. The test results showed a ycy Oe ycycaycoycyce < 0,05, so H0 was rejected, and it could be concluded that the data were not normally distributed. Therefore, the non-parametric Kruskal-Wallis test was used to test the differences in inflation rates from year to year, with the hypothesis: H0 : there is no difference in the center of inflation H1 : there is a minimal difference between the two centers of inflation The test results showed significant differences, with statistical values of 13,26 . and 63,77 . , with p-values of 0,0041 and 9,19 y 10Oe14 , respectively, where ycy Oe ycycaycoycyce < 0,05, so H0 is rejected and shows that there are at least two inflation centers in 2020, 2021, 2022, and 2023. The difference between this study and previous studies lies in the number of clusters used. Previous studies used k=3, while this study used k = 2, based on an evaluation of model effectiveness using the Silhouette Coefficient and the Elbow Method. Good inflation is an inflation rate that remains within the government's target, i. , not exceeding 3A 1%. Although the inflation rate in 2023 is still relatively high, it is still within the target set by the government. Conclusion The results of the study show that the best number of clusters is k = 2, based on the Elbow Method and Silhouette Coefficient with a value of 0,53, which indicates a good clustering structure. The KruskalAeWallis test also shows a significant difference between the two clusters, with statistical values of 13,26 . and 63,77 . , and p-values of 0,0041 and 9,19y10a . < 0,. , respectively, thus rejecting ya0 . This proves that there were at least two centers of inflation during the 2020Ae-2023 period. In general. Cluster 0 covers regions with low inflation rates, while Cluster 1 covers regions with high inflation rates, such as Pangkal Pinang. Ambon, and Jayapura. Despite regional differences, the national inflation rate remained under control and within the government's target of 3 A 1%. These results show that after the COVID-19 pandemic, the pattern of inflation between provinces in Indonesia remains relatively stable, with two main groups representing a balance between regions with low inflation and regions with high inflation. References