Using regression analysis and visual exploration, the study evaluates the role of money supply growth, credit to government, and crude oil price changes in explaining movements in headline inflation.
# An Analysis of Inflation Drivers in Nigeria (2006–2025)
## 🎯 Why This Project?
**Every day on Nigerian Twitter (X), people debate why prices keep rising. "It's the government!" "It's oil prices!" "CBN is printing too much money!"
But these are just opinions without data.
As someone who sees these debates daily and watches Nigerians struggle with rising costs, I wanted to move beyond guesswork and understand what actually drives inflation using real data from the Central Bank of Nigeria.
This project uses 19 years of economic data (2006-2025) to answer: What really causes Nigerian inflation?**
## 🔍 Key Findings (TL;DR)
**Surprising Results:**
1. ✅ Money supply growth is the PRIMARY driver of inflation (correlation: 0.44, p 0.10 (Not significant)
**Prediction Formula**
```
Predicted Inflation = 10.70% + (0.21 × Money_Supply_Growth) + (0.01 × Credit_to_Govt) + (0.01 × Oil_Price_Change)
```
**Example:** If money supply grows 20%, credit to government is 0%, and oil prices don't change:
```
Inflation = 10.70 + (0.21 × 20) + 0 + 0 = 14.9%
```
## 🎨 Visualizations
1. Time Series Analysis
**Insights:**
- 2024 saw the highest inflation (32%), coinciding with fuel subsidy removal and the unification of the exchange rate
- 2007 had the lowest inflation (5%) despite 932% government borrowing spike
- Money supply shows the clearest correlation with inflation trends
2. Correlation Analysis
**Ranking:**
- Money Supply: +0.44 (Moderate positive)
- Credit to Govt: -0.37 (Moderate negative - surprising!)
- Oil Price: +0.06 (Essentially zero)
3. Model Performance
**Model performance**
- ✅ Tracks general trends well (2010-2020)
- ❌ Underpredicts 2024 spike (subsidy shock not in model)
- ❌ Overpredicts 2020 (COVID demand destruction not captured)
4. Scatter Plots
- Money Supply: Clear upward trend (R² = 0.20)
- Credit to Govt: Weak downward trend (R² = 0.14)
- Oil Price: No pattern (R² = 0.00)
## 🔮 Scenario Analysis
**Inflation Forecasts Under Different Conditions**
| …