Hanggang saan aabot ang bente pesos mo?

Not a kilo of rice,
that's for sure.

Overview

Rice is arguably the most important staple food for nearly every Filipino household. However, the cost of rice has continued to steadily rise despite promises to lower grain prices.

We wanted to find out about the status of the rice supply in the Philippines and explore how it relates to the retail price of rice.

  • Problem

    The cost of rice has continued to rise amidst efforts to address the escalating rice prices.

  • Solution

    Use data science to analyze the correlation between rice supply and retail prices, and the trends between rice retail prices, suggested daily budget, and minimum wage income. This analysis aims to provide actionable insights to policymakers to ensure food security in the Philippines.

Background

In February 2024, Philippine Statistics Authority reported that rice inflation reached a new 14-year high of 22.6% in January 2024, due to high prices in the world market and a low base from the previous year.

Despite former senator Ferdinand "Bongbong" Marcos Jr.'s campaign promise during the 2022 presidential elections to lower the price of rice to ₱20 per kilo, recent data from the Philippine Statistics Authority and the Department of Agriculture revealed substantial surges in rice inflation rates. Additionally, the DA noted a 36% spike in retail rice prices in March 2024 compared to the previous year, prompting concerns about food security and discussions on stabilization measures.

Hence, considering the dynamics between rice stocks, local production, and imports, how do fluctuations in these factors correlate with the retail prices of rice in the Philippines? Additionally, based on the suggested daily budget provided by the government and the daily minimum wage income, how affordable is rice based on its retail prices?

Null Hypothesis

Retail prices of rice are not correlated with variations in rice stocks, local production, and imports, and there is no significant difference in the affordability of rice between the suggested daily budget and minimum wage income.

Alternative Hypothesis

Retail prices of rice are correlated with variations in rice stocks, local production, and imports, which also suggests varying degrees of impact, and there is a significant difference in the affordability of rice between the suggested daily budget and minimum wage income.

Action Plan

Analyze data from government reports and market analyses regarding variations in rice stocks, local production, imports, and retail prices, and its affordability relative to the suggested daily budget and minimum wage income.

Data Collection

We collected the annual national data on rice supply (thousand metric tons) — local rice production, imports, and stocks — and retail prices (PHP) of special, well milled, and regular milled rice in the Philippines from 1995 to 2023, as well as the per capita rice consumption (kg/yr) and Philippine population.

We also obtained the daily minimum wage income (PHP), along with the suggested daily food budget (PHP) and rice consumption (g/day) for a family of five in the Philippines from 2012 to 2023.

Click here to view our dataset.
Methodology

Here’s an overview of our data science methodology:

Data Preprocessing

We employed several preprocessing methods to our data such as dataset expansion to derive more accurate and comprehensive analysis, handling missing values to ensure data completeness, and data transformation to ensure consistency on data formats.

Dataset Expansion

Our initial dataset consists of monthly regional data from May 2023 to December 2023. To obtain a more comprehensive analysis of trends and patterns on rice supply and prices in the Philippines over time, we expanded the data by obtaining the annual national data of rice supply and prices from 1995 to 2023 and the annual national data of economic variables from 2012 to 2023.

Handling Missing Values

We derived the data for the suggested food daily budget in the Philippines through dividing the collected monthly food threshold data for a family of five by 30, which is the average number of days in a month. However, we found that the suggested daily budget for 2016 was missing, hence, we decided to use the mean values from 2015 and 2017. Similarly, the average daily rice consumption for 2023 was not available, thus we used the mean of the values from 2012 to 2022 to fill for 2023.

Data Transformation

Some values in the datasets we obtained were formatted as comma-separated numbers, which were considered strings and had to be converted to numerics to become suitable for quantitative operations.

Visualization

We transformed our dataset into intuitive plots and graphs to illustrate and easily visualize the complex relationships and trends in rice supply, retail prices, daily budget, and minimum wage across the Philippines.

Correlation Heatmap

We used Spearman’s rank correlation to determine the relationship between rice supply and retail prices of rice as it is suitable for identifying monotonic and nonlinear correlations. Strong positive correlations were observed between local rice production and retail prices with coefficients ranging from 0.95-0.97, while moderate correlations were found between rice imports and retail prices, with coefficients of 0.47-0.54, and between rice stocks and retail prices, with coefficients of 0.43-0.44.

Polynomial Regression

Polynomial regression was employed to determine the relationship between rice supply and retail prices, addressing the non-linear pattern in the data indicated by the moderate correlation coefficients.

The various plots depicting data points further showed the strong correlation between local production and retail prices, in contrast to the weak to moderate correlation between rice imports and retail prices and between rice stocks and retail prices.

Time-series Analysis

Time-series Analysis was employed to determine the trends between rice retail prices, suggested daily budget, and daily minimum wage from 2012 to 2023.

The plot shows an observable positive trend in the chart, which shows that daily wage and suggested budget has kept up with the rise of retail prices.

Hypothesis Testing

We used regression analysis methods, time-series analysis, correlation coefficients, and statistical tests to determine the relationships and verify significant findings in our data analysis.

Linear Regression and Correlation Coefficients

Linear regression, Pearson’s correlation, and Spearman’s rank correlation were employed to deliberately determine and assess the correlation between each of the independent variables with the retail prices of rice, as well as between the local rice production and imports.

Independent Variable Dependent Variable Linear Regression Coefficient Spearman's Rank Correlation Coefficient Pearson's Correlation Coefficient P-value
(obtained using Pearson's correlation)

Hypothesis Testing and Results for Linear Regression

Local Production and Retail Price

For the linear regression between local production and the retail prices of rice, a strong positive correlation is observed in all three pairs of variables: local production and the price of special rice, local production and the price of well-milled rice, and local production and the price of regular milled rice. All three of the p-values observed are well below the threshold of 0.05, all of them around with an order of magnitude of -13, which means that local rice production and retail rice prices are significantly correlated. The coefficients range from 0.0043 to 0.0051, which means for every million metric tons of rice produced, the retail price of rice would change by 4.30 to 5.10 pesos. The Pearson’s correlation coefficient ranges from 0.930 to 0.933, which implies a strong linear positive correlation between local production and price. The same statement could be made with the Spearman’s rank correlation coefficient, which ranges from 0.947 to 0.967, implying a strong positive monotonic correlation.

This is unexpected since by the economic law of supply and demand, if local production increases, the supply of rice increases and the price of rice should decrease as a result. However, it is possible that there is a confounding factor or several confounding factors influencing both variables such as population growth, which dictates the growth of demand for rice.

Rice Imports and Retail Price

The correlation between rice imports and retail rice prices, although positive, is less strong compared to that of local production and retail prices. All three p-values are less than 0.05, which suggest that there is a significant correlation between rice imports and rice retail prices. The Pearson’s correlation coefficients range between 0.491 and 0.568, while the Spearman’s rank correlation coefficients range between 0.468 and 0.536, suggesting only a moderate correlation between the two variables. The coefficients of the linear regression vary from 0.0051 to 0.0069, implying that for every million metric tons of rice imported, the retail price increases by 5.10 to 6.90 pesos.

It is possible there is not as strong of a correlation between the two variables since rice importation has been mainly a reactionary measure in the past years in response to rice shortages (such as in the case of 2008 when former President Gloria Macapagal Arroyo temporarily lifted import restrictions on rice in anticipation of rice shortages) and natural disasters (such as the worldwide 1997-98 El Nino event, where the Philippines along with several countries experienced severe droughts from June 1997 to June 1998). From our dataset, it could be seen that rice importation greatly increased in 2019 and onwards, which was around the time former President Rodrigo Roa Duterte signed the Rice Tariffication Law into effect. The aim of the Rice Tariffication Law was to replace restrictions on how much rice is allowed to be imported by private traders with the imposition of tariffs and taxes on those goods instead in order to lower rice prices by increasing the available supply. However, if there is a positive correlation between rice imports and retail rice prices, then it means that rice imports actually have done little to curb the increasing prices of rice in the market, contrary to the aims of the Rice Tariffication Law. That being said, it is still possible for the two variables to not be caused by each other but instead influenced by confounding variables, as in the previous section.

Rice Stocks and Retail Price

The p-values of all the linear regression models done between rice stocks and the retail prices of different types of rice in the market are all less than 0.05; thus, we are 95% sure that there is a significant correlation between rice stocks and the retail prices of rice. However, looking into the correlation coefficients for each model, we see that the Pearson’s correlation coefficients range between 0.491 and 0.568 and that the Spearman’s rank correlation coefficients range between 0.468 and 0.536. This means that while there is a significant positive correlation, it is only moderate. The coefficients of the models range from 0.0096 to 0.0116, which means that for every increase in one million metric tons of rice stocks, the retail price also increases by 9.60 to 11.60 pesos.

It is possible that because the rice stocks include those for household use (compared to rice sold commercially), we get a moderate correlation. Since household rice stocks do not and should not affect the retail rice prices, since they are not for commercial sale, only rice stocks for commercial use and NFA use should be considered to determine the correlation of the variables. However, because there is a positive correlation between the two variables, there may be some confounding variables affecting the correlation, which goes against the expected relation of supply and demand.

Rice Imports and Local Production

The p-value of the linear regression model between local rice production and rice imports is less than 0.05 (= 0.0067), so we are 95% sure that there is a significant correlation between the two variables. However, the correlation coefficients show that this correlation is not strong, with Pearson’s reporting a value of 0.492 and Spearman’s reporting a value of 0.510.

It is possible that the aforementioned sporadic nature of rice importation before 2019 resulted in the weak correlation between local rice production and rice imports. Hence, if we wanted to see more conclusive effects of rice imports on local rice production, it would be best to have started the scope of our data from 2019 since that was when quantitative restrictions on rice imports were replaced with tariffs instead. Furthermore, the Rice Competitiveness Enhancement Fund was created alongside the Rice Tariffication Law to bolster the local rice industry by using the tariffs to fund new equipment, better seeds, and subsidies. The NFA’s importation abilities had also been limited to buffer stocking from local farmers. These could possibly reduce or offset the negative effects that tariffed importation of rice by private traders could introduce to local production by making sure that local producers can still compete with imported rice.

Polynomial Regression

Polynomial regression was then employed to further determine the relationship between each of the independent variables (local rice production, rice imports, and rice stocks) with the dependent variable (retail price of rice). This was chosen because we believe that there may be a pattern in the data that is not necessarily linear and monotonic, given the results of the previous correlation coefficients show that the correlations of the latter two variables with retail rice prices, while significant, are only moderate.

Interpretation of Polynomial Regression Plot

The various plots drawn with respect to the data points show that there is a very strong correlation between local production and retail prices, whereas there is only a weak to moderate correlation between rice imports and retail prices and between rice stocks and retail prices.

Hypothesis Testing and Results for Polynomial Regression

To test our hypothesis built on polynomial regression models, the F-test was used to determine the significance of all the independent variables put together, which is possible for polynomial regression. The F-test checks how well the regression model predicts the data rather than individual variables.

For an alpha level of 0.05, the critical value of the F-test would be 2.45. Our calculations show that the F-statistic of our polynomial regression model is 55.45.

This is not surprising given that many of the independent variables are individually and statistically significant to the retail price. Thus, all of the independent variables— local production, rice imports, rice stocks— would jointly and significantly affect the retail price of rice.

Retail Prices, Suggested Daily Budget, and Daily Minimum Wage

We also wanted to look at how affordable rice has been over the years.

The plot shows the suggested daily budget, daily minimum wage, and the retail prices of rice from 2012 to 2023. There is an observable positive trend in the chart, which shows that daily wage has kept up with the rise of retail prices.

We also decided to look at the average daily consumption of rice and how it measures relative to the suggested daily budget and minimum wage. We computed affordability to be the percentage of the amount remaining from the suggested daily budget and minimum wage after subtracting daily cost spent on rice.

Hypothesis Testing

We used a two-sample t-test to determine if there is a significant difference between the affordability of rice relative to the suggested daily budget and relative to the minimum wage. Our obtained p-values are all less than 0.05, which indicate that there is a significant difference between them.

It can be noted that affordability relative to minimum wage has not changed much over the years, which implies that rice has not become more affordable relative to minimum wage even with the increase in the daily minimum wage.

Nutshell Plot

Rice is arguably a crucial staple food in Filipino households, yet the cost of rice has continued to steadily rise despite promises to lower grain prices. In August 2023, rice inflation increased to 8.7% from 4.2% in July 2023. Furthermore, according to the World Food Program (WFP) in October 2022, 1 out of 10 households in the Philippines faced food insecurity. Hence, we aim to explore the correlation between rice supply and prices in the Philippines to offer insights to policymakers in ensuring food security in the country.

The nutshell plot illustrates the correlation between the rice supply variables, which are the Local Rice Production, Imports, and Stocks, and the Retail Prices of different types of rice (Special, Well Milled, and Regular Milled). Spearman’s rank correlation revealed a strong positive correlation between local production and retail prices of rice with coefficients of 0.95-0.97. This means that retail price increases with local rice production, contrary to the supply and demand expectations, which could possibly be due to confounding factors like growth of demand for rice.

Moderate correlation exists between rice imports and retail prices of rice with coefficients ranging from 0.47-0.54, which could possibly be due to factors that called for increased importation and past restrictions before the Rice Tariffication Law. Similarly, moderate correlation between rice stocks and retail prices of rice with coefficients of 0.43-0.44 suggests possible existence of other factors like inclusion of household stocks that do not affect retail prices of rice.

These findings highlight the importance of this correlation analysis as this might be pivotal for gaining insights on the confounding variables and important adaptive policy frameworks in agriculture. Leveraging these insights can help policymakers in enhancing food security in the Philippines.

Old Data Correlation Heatmap

We also analyzed the correlation between the rice supply and prices using our old dataset which consists of the monthly data ranging from May 2023 to December 2023. The correlation heatmap revealed a weak to moderate correlation between local rice production and retail prices of Special and Well-Milled Rice with Spearman's rank correlation coefficient of 0.63 and 0.31 respectively, while there is a negligible correlation with Regular Rice as the coefficient is 0.063. Slightly moderate correlation exists between rice imports and retail prices of rice with coefficients ranging from 0.26-0.31. Furthermore, there is a weak to moderate correlation between total rice stocks and retail prices of Special and Well-Milled Rice with coefficients of 0.5 and 0.14 respectively, while there is a negative correlation between total stocks and retail price of Regular Rice with -0.14 coefficient.

However, the old dataset used has a narrow scope of only 8 months of data in 2023 so it is important to note that this analysis may not be entirely reliable. According to Emerging India Analytics (2024), small datasets have a lack of representativeness which hinders accurate reflection of larger sets of data and results in a limited scope of insights that can be derived. Hence, the limited range and amount of data may restrict insights into broader trends and patterns in the correlation between the rice supply variables and retail prices. This limitation prompted us to widen the scope of our dataset to an annual national data from 1995 to 2023 to gain more reliable and comprehensive insights.

Modeling

For our predictor model, we went with a random decision forest as it can effectively handle complex, non-linear relationships among multiple variables by creating multiple decision trees during training.

After training our random forest model on the dataset, the model was tested. The mean absolute error of the model is around 2.76, which means the predicted prices of rice can vary by around 2.75 pesos, which may be a small margin of error in the range of retail rice prices. Looking at the defined features of the model, local production is the feature with the highest importance, with an importance of 0.957528, compared to the importance of other features, which sit in the range of 0.01. Thus, this reinforces the idea from our exploratory data analysis that local production is the main predictor of retail rice prices.

Results

Here's what we found out.

Local rice production has been a main factor in determining retail rice prices in the country, illustrating a strong positive correlation. This highlights the importance of local agricultural production to stabilize prices and ensure consistent supply of rice.

Rice imports and stocks only showed moderate correlations with retail prices of rice. Import restrictions and reactive measures, as well as non-commercial stock inclusion might have influenced these relationships.

Further improvements can be made through exploring potential variables such as agricultural policy interventions, and regional production and market dynamics, as well as their influence on retail prices.

These insights highlight the need for strategic intervention to stabilize prices and support local farmers. Even in times when rice is being imported into the country due to national emergencies or relaxations on private traders, the state of local rice production in the country mainly determines the retail price of rice, regardless of the milling process. Hence, much care and attention must be given to our local producers and farmers, who have been underappreciated, mistreated, or even abused in history. Agricultural and economic policies must put them in the forefront because the condition of their livelihoods also dictates our own, as rice is the staple crop of the Philippines. Not only should the national government prioritize them through ways of increased financial and technological support, but the state of livelihoods should also be prioritized, especially as pressing issues such as private land development and climate change threaten them.

About Us
  • Cal Dupalco

    I have a wide array of interests not only within the field of computer science, but in other topics such as culinary history, art, and music. If I'm not working on code, I'm usually either writing music or drawing digital art.

  • Clarice Sandoval

    I'm a computer science student dedicated to solving problems and creating new possibilities through technology. When I'm not coding, you'll find me immersed in dramas, finding inspiration in the stories that unfold on screen.

  • Jared Hechanova

    I'm Jared, currently an undergraduate student studying computer science. My main interest is in web development, but when I'm not busy programming you can find me studying poker or sleeping.