The Relationship Between Socioeconomic Factors and Crime: Exploring the Associations Between Socioeconomic Features and Reported Crime Rates Using Machine Learning Algorithms
2025 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE credits
Student thesis
Abstract [en]
Understanding the socioeconomic drivers of crime is crucial for designing effective prevention strategies and providing a basis for evidence-based policy decisions. This thesis applies machine learning algorithms to examine how socioeconomic factors influence crime rates across Swedish municipalities.
Crime rates in four categories: economic, property, violent, and total are predicted using Random Forest models trained on a broad set of demographic and socioeconomic variables, including unemployment, education levels, income inequality, family structure, and age dis- tribution. Model performance is assessed using both out-of-sample forecasting and 5-fold cross-validation, with results benchmarked against traditional linear regression models.
The models perform well for property, violent, and total crime, suggesting that these categories are more systematically associated with the observed socioeconomic indicators. In contrast, economic crime is more difficult to predict, likely due to its complexity, lower visibility and weaker connection to structural disadvantage.
To improve interpretability, the analysis incorporates Cross-Validated Permutation Fea- ture Importance (CVPFI) and SHapley Additive exPlanations (SHAP). These methods re- veal the most influential predictors and determine their directional effects. Variables such as education levels, unemployment, and family structure are consistently important for ex- plaining property, violent, and total crime. In contrast, economic crime shows weaker and less consistent associations with structural disadvantage and appears more closely linked to opportunity-related factors that may not be fully captured in the available data.
Overall, the findings demonstrate that combining machine learning with interpretability techniques offers valuable insights into the complex, non-linear relationships between socioe- conomic structures and crime. The findings highlight the potential of data-driven methods in supporting both academic research and policy development.
Place, publisher, year, edition, pages
2025. , p. 50
Keywords [en]
Crime prediction, machine learning algorithms, Random Forest, Cross-Validated Permutation Feature Importance (CVPFI), SHapley Additive exPlanations Values (SHAP), socioeconomic factors, Swedish municipalities
National Category
Economics
Identifiers
URN: urn:nbn:se:uu:diva-563587OAI: oai:DiVA.org:uu-563587DiVA, id: diva2:1983252
Subject / course
Economics
Educational program
Master Programme in Economics
Supervisors
Examiners
2025-08-042025-07-102025-08-04Bibliographically approved