Research Article

Research on Predicting the Probability of Winning Basketball Games Based on Machine Learning Models

Zhiqing Zhang*
Shanghai Future Academy of Literacy and Technology, 2nd Floor, Xindongya Building No. 238, Nandan East Road, Xuhui District, Shanghai, China

* Corresponding author: [email protected]

Abstract

This study develops a robust machine learning framework to predict the outcomes of NBA games, utilizing a comprehensive dataset of 6,152 games from the 2018 to 2023 seasons. To capture the dynamic nature of team performance, we engineered an extensive feature set that includes traditional basic statistics, rolling averages that reflect recent form (e.g., over the last 5 and 10 games), and metrics quantifying relative team advantages in a given matchup. We rigorously evaluated three distinct models—Logistic Regression, Random Forest, and XGBoost—employing a time-series cross-validation method to prevent data leakage and ensure temporal realism, coupled with a grid search for hyperparameter optimization.From the experimental results, the XGBoost model demonstrated superior predictive capability on an independent test set, achieving a leading accuracy of 73.6% and an Area Under the Curve (AUC) of 0.783. This performance significantly outperformed the other benchmarked models. A subsequent analysis of feature importance within the XGBoost model revealed that a team's recent 5-game winning percentage, its overall seasonal winning percentage, and home-court advantage were the most critical predictors of victory. These were closely followed by more nuanced metrics like offensive and defensive efficiency (ORTG and DRTG).The findings confirm that machine learning methods can effectively model and predict basketball game outcomes with substantial accuracy. These models have practical value, potentially supporting strategic coaching decisions and various commercial applications, such as sports betting and fan engagement. For future work, we plan to focus on developing dynamic prediction models that update in real-time, incorporating heterogeneous data sources like player tracking and injury reports, and enhancing model interpretability for end-users.

Keywords: Machine learning; Basketball game prediction; Winning probability; XGBoost; Feature engineering
Published: December 10, 2025
DOI: 10.54254/2755-2721/2026.TJ30411
Volume: ACE Vol.211
pp. 49-58
Download PDF

References

  1. Ma Rong, Yixiong Cui. A systematic review of passing prediction and passing performance analysis in soccer [C]// Abstracts Collection of the Thirteenth National Sports Science Conference - Special Presentation (Sports Engineering Section).2023.
  2. Gui Meizeng. Research on Key Technology Forecasting Based on Intelligent Methods--Taking New Energy Vehicles as an Example [D]. Shanghai University, 2021.
  3. Wu Le, Chen Lei, Bao Junmei, et al. A fusion method for click rate prediction based on residual learning: CN202010984847.3 [P].CN112102004B [2025-09-26].
  4. Hou S , Lian B , Li W , et al.A Basketball Training Posture Monitoring Algorithm Based on Machine Learning and Artificial Intelligence [J].Mobile Information Systems, 2022.DOI: 10.1155/2022/2264659.
  5. Liu Z , Guo J .Research on NBA Event Prediction Based on Hybrid Machine Learning Model [J]. 2025, 34(1).DOI: 10.1142/S0129156425401718.
  6. Sprint G .Social Networks and Large Language Models for Division I Basketball Game Winner Prediction [J].IEEE Access, 2024, 12(000): 11.DOI: 10.1109/ ACCESS.2024.3403490.
  7. Ouyang Y , Li X , Zhou W , et al. Integration of machine learning XGBoost and SHAP models for NBA game outcome prediction and quantitative analysis methodology [J].PLoS ONE (v.1; 2006), 2024, 19(7): 25.DOI: 10.1371/journal.pone.0307478.