Jurnal Kridatama Sains dan Teknologi
Vol 8 No 01 (2026): Jurnal Kridatama Sains dan Teknologi

Pemodelan dan Prediksi Pengeluaran Bulanan Mahasiswa Berbasis Algoritma Ordinary Least Squares dalam Bahasa Pemrograman C++

Alisha Zulfa Salsabila (UIN K.H. Abdurrahman Wahid Pekalongan, Pekalongan, Indonesia)
Talitha Falakh Tasya (UIN K.H. Abdurrahman Wahid Pekalongan, Pekalongan, Indonesia)
Lina Azaria (UIN K.H. Abdurrahman Wahid Pekalongan, Pekalongan, Indonesia)
Ilham Dwijokangko (UIN K.H. Abdurrahman Wahid Pekalongan, Pekalongan, Indonesia)
Imam Prayogo Pujiono (UIN K.H. Abdurrahman Wahid Pekalongan, Pekalongan, Indonesia)



Article Info

Publish Date
30 Jun 2026

Abstract

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.

Copyrights © 2026






Journal Info

Abbrev

KST

Publisher

Subject

Agriculture, Biological Sciences & Forestry Civil Engineering, Building, Construction & Architecture Computer Science & IT Education Social Sciences

Description

Jurnal KRIDATAMA SAINS DAN TEKNOLOGI diterbitkan oleh Universitas Ma’arif Nahdlatul Ulama (UMNU) Kebumen Pendidikan (Education). Teknologi (technology), Penelitian (research). Bahasa Inggris (Language English), Bahasa Indonesia (Language Indonesian), Olahraga (Sport), Anak Usia Dini (early ...