Q&A 8 How do I analyze GDP growth using Econometrics vs Machine Learning?

8.1 Explanation

We often want to know not just how GDP is growing, but also why.
Two common approaches:

  • Econometrics (Regression)
    • Focus: causality and interpretation
    • Example: How much does a 1% increase in investment affect GDP growth?
  • Machine Learning (Prediction)
    • Focus: forecasting and accuracy
    • Example: Given past investment, inflation, and population growth, can we predict next year’s GDP growth?

We’ll use a sample dataset with Kenya’s GDP growth and explanatory factors:
- investment (% of GDP)
- inflation (% annual CPI)
- population_growth (% annual)


8.2 SQL/MySQL Code (Econometrics style)

If you load this CSV into a table gdp_growth_factors, you can explore correlations before running regressions:

-- Preview data
SELECT year, gdp_growth_rate, investment, inflation, population_growth
FROM gdp_growth_factors
ORDER BY year;

-- Simple correlation check: GDP growth vs investment
SELECT year, gdp_growth_rate, investment,
       (gdp_growth_rate / investment) AS growth_investment_ratio
FROM gdp_growth_factors
ORDER BY year;