Pemodelan dan Prediksi Pengeluaran Bulanan Mahasiswa Berbasis Algoritma Ordinary Least Squares dalam Bahasa Pemrograman C++ - Alisha Zulfa Salsabila; Talitha Falakh Tasya; Lina Azaria; Ilham Dwijokangko; Imam Prayogo Pujiono (Universitas Ma'arif Nahdlatul Ulama Kebumen, 2026)
Financial management is a common challenge faced by students living away from home, especially those who often run out of pocket money before the end of the month. This condition is not always caused by consumptive behavior, but also due to a lack of planning and a structured expenditure prediction system. This study developed a financial analysis program based on the C++ programming language with an object-oriented programming (OOP) approach that implements the Ordinary Least Squares (OLS) algorithm to model and predict students' monthly expenses based on the amount of pocket money they receive. The research data were obtained from 30 students with pocket money ranging from Rp 1,100,000 to Rp 3,500,000 per month, which reflects the real conditions of students in medium-large cities in Indonesia. Descriptive statistical analysis shows that on average, students spend approximately 82.9% of their pocket money each month. The modeling results show a regression equation Ŷ = Rp 119,867 + 0.8221 × X with a correlation coefficient of r = 0.9979 and a determination coefficient of R² = 0.9957, meaning that the pocket money variable is able to explain 99.57% of the variation in student expenditure. The F-test produces F-calculated = 6,732.45, which far exceeds F-table = 4.20 at a significance level of 5%, proving the model is statistically significant. Accuracy evaluation using MAE produces a value of Rp 18,142 (approximately 1% of the average expenditure) and an RMSE of Rp 23,457. It was also found that the marginal propensity to consume (MPC) phenomenon decreases with increasing pocket money, consistent with the economic theory of consumption. This study proves that the OLS algorithm implemented in C++ is an effective, accurate, and efficient tool for analyzing and predicting student financial patterns computationally.