The Relationship Between Socioeconomic Factors and Crime : Exploring the Associations Between Socioeconomic Features and Reported Crime Rates Using Machine Learning Algorithms
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.
Institutions
- Uppsala University (SE)
Publication Details
- Journal
- KTH Publication Database DiVA (KTH Royal Institute of Technology)
- Published
- 2025-01-01
- Primary Topic
- Crime Patterns and Interventions
- Type
- article
- Field-Weighted Citation Impact
- 0.00