Exploring the data analytics behind rice and corn production in the Philippines, uncovering insights and trends.
The Philippine agricultural sector plays a major role in the country’s economy, society, and culture; with the most important products being rice and corn [1]. Both these products are staple foods in this country; rice is a main basis for the diet of the majority (around 80%) of the population [2] while corn is preferred by around 14 million Filipinos as a main staple on the table and is used in the production of 50% of livestock mixed feeds [3].
As important agricultural crops, they serve as some of the main sources of income for millions of Filipino farmers, corn production in particular contributing significantly to the local economy in some regions. However, even with their immense significance, both culturally and economically, the country is still far off from being self-sufficient in the production of these products. Globally, the Philippines ranks first in rice imports, with a record 3.22 metric tons imported in 2023 [4]. This has caused an increase in prices, with rice inflation reaching a record of 19.6% in December 2023. These setbacks in production can be attributed to the lack of preparation to El Nino and abrupt shifts in the weather in general, and a lack of urgency in the modernization of conventional rice production practices, with the government only focusing on investment for research in 2023 [5].
With government taking a renewed interest in improving the production of rice and corn, yield data and any analysis made could be vital to the industrialization of the farming industry, and in turn the self-sufficiency of food production in the country [6].
The data to be used can be acquired from OpenSTAT, an open data platform that aims to make the statistical data collected and compiled by the PSA publicly available for use. We've chosen to transfer the datasets to Google Sheets to facilitate easier access for applying statistical analysis methods.
Rice production in the Philippines has increased by 1.5% in 2023 compared to its previous year, reaching a record high of 20.06 million metric tons [7]. However, even with a record-high rice output and an increase in production, the country still needs to import about 4.1 million metric tons of rice in 2024, an increase of about 5.1% from last year's import [8].
Conversely, corn production experienced a notable decline, estimated at approximately 3.9% over the course of three months, ending in September 2023 [9]. Projections from the USDA's Manila office indicate a surge in corn imports during the marketing years 2024/25, attributed to a rise in feed consumption [10].
As two of the most important crops in the country, it's worth asking:
What is the trend in the volume of rice and corn production in the Philippines?
There is a significant trend in the volume of production of rice & corn in the Philippines per year, either increasing or decreasing.
There is no significant trend in the volume of production of rice & corn in the Philippines per year.
Analyze data on the volume of rice & corn production in the Philippines from 1987 to 2023
Data points were filtered out, rearranged, and aggregated for ease of use when modelling.
Using a Python-based data modelling library, models were created for each of the research questions, along with their respective graphs for better visibility.
The results were analyzed for any insight regarding the above-mentioned hypotheses.
Two-tailed T-test was used for hypothesis testing to determine whether the slope of the regression line is significantly different from zero. This helps in establishing whether there is a significant trend in the production data over the years, considering both the possibilities of an increasing trend and a decreasing trend. We used a confidence level of 95%.
Slope of Regression Line Evaluation
Rice Production
Statistical t-stat: 27.42730143107282
Statistical p-value: 0.0
Interpretation:
The high t-statistic and the p-value of 0.0 indicate that the slope of the regression line for rice production is highly statistically significant. This means there is a strong indication of a positive trend in rice production over the years. Given the p-value is essentially zero, we reject the null hypothesis and conclude that there is a significant trend in rice production at the 95% confidence level.
Slope of Regression Line Evaluation
Corn Production
Statistical t-stat: 14.533570121103102
Statistical p-value: 2.220446049250313e-16
Interpretation:
Similarly, the high t-statistic and the p-value close to zero for corn production also indicate a highly statistically significant trend. We reject the null hypothesis and conclude that there is a positive significant trend in corn production at the 95% confidence level.
Interpretation:
As additional info, the average production of corn and rice for the years 1987 to 2023 in the various regions of the Philippines are shown in the image above. The first map on the left illustrates rice production, showing that the most productive areas are regions 3 (Central Luzon), 2 (Cagayan Valley), and 1 (Ilocos Region) in order with production ranging from 0.0 to 1.2 million metric tons. The other map highlights corn production, indicating that the highest-producing regions are 2 (Cagayan Valley), 10 (Northern Mindanao), and 12 (Soccsksargen) in order, with production reaching up to 0.8 million metric tons. These maps suggest a geographical concentration of crop production, with certain regions specializing more in either corn or rice.
Linear regression was used as a machine learning model to (1) quantify the relationship between the year and production volume, (2) evaluate the strength and direction of this relationship, and (3) make predictions.
Rice Production
RMSE: 822,863.55
R²: 0.96
p-value for slope: 2.987361590609731e-25
Interpretation:
The RMSE (Root Mean Squared Error) indicates the average difference between the observed and predicted values. An RMSE of 822,863.55 indicates the model's prediction error. The R² value of 0.96 suggests that 96% of the variance in rice production can be explained by the model, indicating an excellent fit. The p-value for the predictor (yearly data) is extremely low, confirming the significant relationship between the year and rice production.
Corn Production
RMSE: 582,724.28
R²: 0.86
p-value for slope: 2.143194688062296e-16
Interpretation:
For corn, the RMSE of 582,724.28 indicates the model's prediction error. The R² value of 0.86 means that 86% of the variance in corn production is explained by the model, which is still a good fit but slightly less than the model for rice. The extremely low p-value for the predictor confirms the significant relationship between the year and corn production.
A thorough examination was conducted to identify the trends in rice and corn production over a period of time, given what was possible with the data at hand. It was found that there is a significant positive relationship between the annual production values and their corresponding years. In other words, the Philippines as a country produces more and more units of rice and corn each year, and it's not slowing down any time soon as shown by above-mentioned linear regression model. While there is some degree of error as to what could be the country's next annual production quota reached for each crop, the rate of production for both rice and corn looks positive for the country as a whole.
Here are some recommendations for any future studies looking to possibly further refine the model so that a clearer picture of the country's rate of production of both rice and corn can be made:
Extended Data Collection
Add more recent data points and extend the time series to ensure that the observed trend remains consistent s time goes by. This would help to confirm what has been found so far, and highlight any possible variations in these trends.
Factor Analysis
Look at other variables such as the introduction of improved technology, weather patterns, changes in government policies, and economic factors which could contribute to changes in the production of rice and corn. To better understand the country's rate of production of these crops, these other factors can be included in a multivariate regression model.
Regional Analysis
Perform analyses specifically for regions so as to identify local trends on the rate of production of rice and corn. This may explain regional disparities hence help in identifying specific areas for improvement.
Yo! I'm a 5th Year Computer Science student at the University of the Philippines, Diliman. I've been interested in programming all the way back in high school where we were introduced to C++ and since then, I have not slowed down in learning other programming languages and frameworks, all of which have their use cases.
Aside from coding, I play video games such as Valorant with friends and have a pretty extensive Steam library that I've been building up over the years. I am also a huge movie buff that has been keeping up with the recent movies that have been released so far.
✉ bbmartin@up.edu.ph
Hello! I'm currently a second-year Computer Science student at UP Diliman, with aspirations to specialize in Software Engineering after graduation. My goal is to join and contribute to tech startups that focus on Environmental and Energy Management, Finance, and Medicine and Health.
In my free time, I enjoy playing video games like Teamfight Tactics and League of Legends while listening to music genres such as K-pop and alternative pop. I also have a passion for cooking and baking, and I love experimenting with new dishes.
✉ lpandres1@up.edu.ph