The Hidden Tax

A Data Scientist's Look at How Inflation Impacts Global Poverty. An analysis by Peter Macharia.

The "Why": Beyond the Headlines

We all feel it at the grocery store and the gas pump. Inflation has become a global headline, eroding our savings and shrinking our budgets. But while for some it means cutting back on luxuries, for the world's most vulnerable, it can mean something far more dire.

This raises a crucial question: Does rising inflation actually lead to higher rates of extreme poverty? This project moves past anecdotes to build a quantitative model that measures the relationship between these powerful economic forces.

Key Insight

Inflation acts as a hidden tax, especially for the poor. Understanding its impact is crucial for effective policy.

The "What": Sourcing the Truth

The foundation of this project required merging two distinct pictures of the world: one of human well-being and one of economic health.

Key Metrics

I defined poverty as the percentage of a country's population living on less than $2.15 a day, using World Bank data. This was analyzed against key economic indicators like the annual inflation rate, economic growth, and the unemployment rate for 19 countries from 2010 onwards.

After careful cleaning and merging, the final dataset contained 167 observations, each a snapshot of a country's economic health and poverty level in a given year.

The "How": Finding the Patterns

With clean data, the search for relationships began. I moved from simple correlation to a more sophisticated machine learning approach, training three different models (Linear Regression, Decision Tree, and Random Forest) to predict the poverty rate based on the economic indicators.

The models were trained on 80% of the data and then validated on the remaining 20% to test their real-world predictive power.

The "So What?": A Clear Verdict

The results were fascinating. The simple Linear Regression model completely failed (R² of 0.00), proving this relationship is not a straight line. The Random Forest model, however, performed best, explaining a significant portion of the changes in poverty.

Model Performance

Model R-squared (R²) Interpretation
Linear Regression 0.00 No predictive power
Decision Tree 0.25 Modest predictive power
Random Forest 0.40 Winner: Good predictive power

Insight 1

Random Forest models can capture complex, non-linear relationships in economic data.

Insight 2

Stable monetary policy is a key pillar for reducing poverty and improving social welfare.

The Most Important Factor

The true power of the Random Forest model is its ability to rank which factors were most important for its predictions. The result was unambiguous.

The "What's Next?": The Bigger Picture

This analysis reinforces that stable monetary policy is not just an abstract economic goal; it is a fundamental pillar of social welfare. For the millions living on the edge, inflation acts as a regressive, hidden tax that invisibly steals what little they have.

While this model shows a strong predictive link, future work could incorporate factors like government social policies or education levels to build an even more complete picture.