Research Article

Using Regression and Machine Learning to Forecast Customer Spending Patterns and Turnover

Hao Zhang*
Palo Alto High School, Palo Alto, 94301, United States

* Corresponding author: [email protected]

Abstract

The study is based on a customer database with 440,832 valid data and uses the following methods: Matrix based Regression and Machine Learning. The first goal is to see if there is a correlation between the customer's age and the number of dollars spent, and if there is a correlation, is there any gender trend? The mathematical underpinning is introduced via the least squares residual minimization, matrix conditioning and the full-column-rank condition for uniqueness. Using the entire cleaned dataset, different linear and quadratic models are fit for female customers and male customers. Age trends are small and negative in both linear models (R-squared values less than 0.01); quadratic models do not help much. A separate computational-cost exercise checks the first 1, 000 observations and finds a balanced gender composition of 51.4% female and 48.6% male. The second will involve prediction of turnover based on age, gender, duration of engagement, purchases, number of interactions for support, and amount spent. The ROC-AUC for logistic regression is 0.906 and the ROC-AUC for random forest is 0.967. The best practical indicator is the turnover rate which rises sharply when support contacts become more numerous. Results show that the age spending regression has weak explanatory structure, whereas turnover is strongly modeled in a multivariate framework.

Keywords: Least squares; Customer churn; Logistic regression; Random forest; Customer support
Published: November 10, 2026
DOI: 10.54254/2755-2721/2026.38785
Volume: ACE Vol.280
pp. 149-162
Download PDF

References

  1. Wathen, A. J. (2025). Least squares and the not-normal equations.SIAM Review, 67(4), 865–872. https://doi.org/10.1137/23M161851X
  2. Meier, M., Nakatsukasa, Y., Townsend, A., & Webb, M. (2024). Are sketch-and-precondition least squares solvers numerically stable?SIAM Journal on Matrix Analysis and Applications, 45(2), 905–929. https://doi.org/10.1137/23M1551973
  3. Prabadevi, B., Shalini, R., & Kavitha, B. R. (2023). Customer churning analysis using machine learning algorithms.International Journal of Intelligent Networks, 4, 145–154. https://doi.org/10.1016/j.ijin.2023.05.005
  4. Suh, Y. (2023). Machine learning based customer churn prediction in home appliance rental business.Journal of Big Data, 10, article 41. https://doi.org/10.1186/s40537-023-00721-8
  5. Imani, M., & Arabnia, H. R. (2023). Hyperparameter optimization and combined data sampling techniques in machine learning for customer churn prediction: A comparative analysis.Technologies, 11(6), article 167. https://doi.org/10.3390/technologies11060167
  6. Chang, V., Hall, K., Xu, Q. A., Amao, F. O., Ganatra, M. A., & Benson, V. (2024). Prediction of customer churn behavior in the telecommunication industry using machine learning models.Algorithms, 17(6), article 231. https://doi.org/10.3390/a17060231
  7. Mena, G., Coussement, K., De Bock, K. W., De Caigny, A., & Lessmann, S. (2024). Exploiting time-varying RFM measures for customer churn prediction with deep neural networks.Annals of Operations Research, 339, 765–787. https://doi.org/10.1007/s10479-023-05259-9
  8. El Koufi, N., & Belangour, A. (2024). Toward a recommender system for assisting customers at risk of churning in e-commerce platforms based on a combination of Social Network Analysis (SNA) and deep learning.Journal of Open Innovation: Technology, Market, and Complexity, 10(4), article 100425. https://doi.org/10.1016/j.joitmc.2024.100425
  9. Zhang, H., & Zhang, W. (2024). Application of GWO-attention-ConvLSTM model in customer churn prediction and satisfaction analysis in customer relationship management.Heliyon, 10(17), article e37229. https://doi.org/10.1016/j.heliyon.2024.e37229
  10. Golub, G. H., & Van Loan, C. F. (2013).Matrix computations(4th ed.). Johns Hopkins University Press.
  11. Trefethen, L. N., & Bau, D., III. (1997).Numerical linear algebra. Society for Industrial and Applied Mathematics.
  12. Higham, N. J. (2002).Accuracy and stability of numerical algorithms(2nd ed.). Society for Industrial and Applied Mathematics.
  13. Hastie, T., Tibshirani, R., & Friedman, J. (2009).The elements of statistical learning: Data mining, inference, and prediction(2nd ed.). Springer.