Research Article

Predicting Housing Prices in Urban Areas: Linear Regression and Random Forest

Tingyu Ma*
Dulwich International High School

* Corresponding author: [email protected]

Abstract

This study analyzes urban housing prices using multiple linear regression and Random Forest models based on 50 simulated observations. The predictors include floor area, house age, distance to the city center, number of rooms, and number of toilets. The results show that Random Forest achieves higher prediction accuracy, with an R² of about 0.90, indicating strong ability to capture complex patterns in the data. In contrast, multiple linear regression provides clearer interpretation, allowing each factor's impact to be directly understood through coefficients. Both models consistently identify floor area, house age, and distance to the city center as the most important factors affecting housing prices. Floor area has a positive effect, while house age and distance show negative effects. The findings highlight a key trade-off: Random Forest offers better predictive performance, while linear regression provides better transparency. Therefore, the choice of model should depend on whether prediction accuracy or interpretability is more important in practical applications.

Keywords: urban housing prices; multiple linear regression; random forest; prediction accuracy
Published: May 6, 2026
DOI: 10.54254/2753-8818/2026.DL33232
Volume: TNS Vol.165
pp. 43-47
Download PDF

References

  1. Kaggle. (2024). Real Estate Price Prediction Dataset. https: //www.kaggle.com/datasets.
  2. Li, X. (2022). Analysis of Influence Factors of Urban Housing Prices Based on Multiple Linear Regression. Journal of Economic Research, 15(2): 89-102.
  3. Breiman, L. (2001). Random Forests. Machine Learning, 45(1): 5-32.
  4. Zhang, Y., & Wang, H. (2023). Application of Machine Learning Models in Urban Housing Price Prediction. Journal of Real Estate Research, 28(3): 45-62.
  5. Zhang, L., Chen, Y., & Wang, H. (2018). Determinants of urban housing prices in China: A multiple linear regression approach. Journal of Urban Economics, 45(3), 212–228.
  6. James, G., Witten, D., Hastie, T., & Tibshirani, R. (2013). An Introduction to Statistical Learning (Vol. 112). New York: Springer.
  7. Chen, X., & Wang, Y. (2020). A comparative study of linear regression and random forest for housing price prediction. International Journal of Data Science, 15(2), 45–58.
  8. Brown, K., & Uyar, B. (2004). A hierarchical linear model approach for assessing the effects of house and neighborhood characteristics on housing prices. Journal of Real Estate Practice and Education, 7(1), 15-24.
  9. Amri, S., & Tularam, G. A. (2012). Performance of multiple linear regression and nonlinear neural networks and fuzzy logic techniques in modelling house prices. Journal of Mathematics and Statistics, 8(4), 419-434.
  10. Lee, C. C. (2009). Hierarchical linear modeling to explore the influence of satisfaction with public facilities on housing prices. International Real Estate Review, 12(3), 252-272.
  11. Marchese Robinson, R. L., Palczewska, A., Palczewski, J., & Kidley, N. (2017). Comparison of the predictive performance and interpretability of random forest and linear models on benchmark data sets. Journal of chemical information and modeling, 57(8), 1773-1792.
  12. Salih, A. M., & Wang, Y. (2024). Are linear regression models white box and interpretable?.  arXiv preprint arXiv: 2407.12177.