# RECORD a072fb43e67fcc553e457777f0c68324ace19eb7 # TITLE: Factors influencing housing prices: A comparative study using multiple linear regression and random forest # YEAR: 2024.0 VENUE: Theoretical and Natural Science DOI: 10.54254/2753-8818/51/2024ch0174 # AUTHORS: Shutong Zhong # PAGES: 7 CANDIDATE TABLE PAGES (1-based): [4] # ABSTRACT: Abstract. The method is to construct a multiple linear regression model to examine the variables that significantly affect US home prices. The dataset has 13 variables and 545 observations, and it was obtained via Kaggle. This paper also considers comparing the multiple linear regression models and random forest model for predicting house prices and thus concludes which model can most accurately predict house prices. The result indicates that the factors including area, quantity of bedrooms and bathrooms, the existence of a basement, and state of the furnishings, etc. significantly impact housing prices. By comparing Root Mean Squared Error (RMSE) and Mean Absolute Percentage Error (MAPE), the conclusion suggests that the multiple linear regression model marginally surpasses the random forest regarding the accuracy of the predictions, despite the fact that both models function similarly. This research offers practical applications for enhancing real estate market strategies and provides valuable insights into the factors influencing housing prices. ===== PAGE 1 (score 14, numeric-paren 0, table-words 1, var-words 12) ===== Factors influencing housing prices: A comparative study using multiple linear regression and random forest Shutong Zhong Mathematics Faculty, University of Waterloo, Waterloo, N2L 3G1, Canada s47zhong@uwaterloo.ca Abstract. The method is to construct a multiple linear regression model to examine the variables that significantly affect US home prices. The dataset has 13 variables and 545 observations, and it was obtained via Kaggle. This paper also considers comparing the multiple linear regression models and random forest model for predicting house prices and thus concludes which model can most accurately predict house prices. The result indicates that the factors including area, quantity of bedrooms and bathrooms, the existence of a basement, and state of the furnishings, etc. significantly impact housing prices. By comparing Root Mean Squared Error (RMSE) and Mean Absolute Percentage Error (MAPE), the conclusion suggests that the multiple linear regression model marginally surpasses the random forest regarding the accuracy of the predictions, despite the fact that both models function similarly. This research offers practical applications for enhancing real estate market strategies and provides valuable insights into the factors influencing housing prices. Keywords: Multiple linear regression, random forest, housing prices. 1. Introduction The price of housing has always been a hot topic in every country. Accurate forecasting of house prices is a key undertaking in the real estate market and has a major impact on buyers, sellers, and policymakers. In addition, identifying which factors affect housing prices is the most popular research topic among the stakeholders. Jiang and Qiu analyzed the price of land acquisition had a significant positive impact on housing prices, and disposable income had a smaller positive effect on housing prices [1]. Dong used the data on housing prices in New York City to conduct an analysis. The result concluded from his study was the appreciation rate of average home prices is mostly influenced by the volume of real estate transactions after the component of real estate location is eliminated [2]. Zhao and Liu analyzed the impact of housing policy using a methodical quantitative literature analysis. [3]. Their research identified three distinct forms of housing policies that have an impact on the real estate market: monetary policies, tax policies, and macro-prudential policies [3]. There are many models and methods that can be used in the process of predicting house prices. Sagala and Cendriawan developed a linear regression model using a dataset from the Maribelajar company to predict housing prices [4]. The data analysis and testing conducted in this research demonstrate that the multiple linear regression model can predict and assess home prices to a specific extent [4]. Nevertheless, the algorithm might be enhanced further by including more sophisticated machine-learning techniques. Wang et al. provided a comprehensive joint self-attention model for predicting property prices [5]. The Proceedings of CONF-MPCS 2024 Workshop: Quantum Machine Learning: Bridging Quantum Physics and Computational Simulations DOI: 10.54254/2753-8818/51/2024CH0174 © 2024 The Authors. This is an open access article distributed under the terms of the Creative Commons Attribution License 4.0 (https://creativecommons.org/licenses/by/4.0/). 73 ===== PAGE 4 (score 36, numeric-paren 0, table-words 7, var-words 15) ===== There is only one remaining outlier after the dependent variable (housing price) is checked in the boxplot below. It is advantageous to eliminate this observation in order to enhance the precision of subsequent experiments. The number of observations is reduced from 545 to 544 by employing the Interquartile Range (IQR) method, which eliminates 0.02% of the original dataset (Figure 3). Figure 3. Boxplot of Log Housing Price 3.2. Model results Using the transformed data set, a multiple linear regression model (MLRM) was fitted to determine the significant factors influencing housing prices. The model below is defined as a full model: 𝑌= 𝛽0 + 𝛽1𝑥1 + ⋯+ 𝛽12𝑥12 + ϵ (2) Where 𝑥1, 𝑥2, … , 𝑥12 correspond to the independent variables in the transformed dataset, 𝛽0 is a constant term, and ϵ is an error term. Table 2. Regression Coefficient Table 𝛽 SE T-statistics P-vaule VIF Intercept 14.350 0.051 281.662 < 0.0001 Area 0.00005 < 0.0001 10.579 < 0.0001 1.150 Bedrooms 0.029 0.014 2.046 0.041 1.169 Bathrooms 0.262 0.020 8.121 < 0.0001 1.133 Stories 0.090 0.012 7.264 < 0.0001 1.214 Main Road 0.118 0.027 4.312 < 0.0001 1.083 Guestroom 0.071 0.025 2.812 0.005 1.102 Basement 0.091 0.021 4.293 < 0.0001 1.151 Hot Water Heating 0.164 0.043 3.814 0.0002 1.021 Airconditioning 0.173 0.021 8.298 < 0.0001 1.099 Parking 0.044 0.011 3.872 0.0001 1.100 Prefer area 0.123 0.022 5.500 < 0.0001 1.072 Semi-furnished 0.021 0.023 0.920 0.358 1.026 Unfurnished -0.108 0.024 -4.416 < 0.0001 1.026 Table 2 presents the estimated coefficients (β), standard errors (SE), t-statistics, p-values, and variance inflation factors (VIF) for each independent variable in the multiple linear regression model predicting the log-transformed housing prices. The baseline log price is indicated by the intercept term, which is significantly positive (β0 = 14.350, p ≈ 0.000) when all factors are zero. Furthermore, Table 2 indicates that the existing variables are statistically significant since p-values of 12 independent Proceedings of CONF-MPCS 2024 Workshop: Quantum Machine Learning: Bridging Quantum Physics and Computational Simulations DOI: 10.54254/2753-8818/51/2024CH0174 76 ===== PAGE 5 (score 17, numeric-paren 0, table-words 7, var-words 2) ===== variables are less than 0.05. All VIF values are lower than 4, which suggests that all variables are individually reliable in explaining variations in log-transformed housing prices. As a result, all variables in the dataset have a significant effect on the dependent variable Y. According to data from the Regression Coefficient Table, the multiple regression model function structures as below: 𝑌= 14.350 + 0.0000495𝑥1 + ⋯+ 0.021𝑥12 + 0.10813𝑥13 + ϵ (3) The other method to select significant variables for the fitted model is stepwise regression with AIC. In a regression model, variables are added or removed iteratively based on their AIC value. By using this method, the selected variables are identical to those selected based on the p-value. For this model, the residual standard error (RSE) of 0.2059 indicates that the typical deviation is roughly 0.2059 based on the predicted values of this model and the observed log-transformed housing prices. As evidenced by the relatively low RSE, the predictions for this model and the actual data points are fairly close. The multiple R-squared value is 0.697. It represents the independent variables in the model account for roughly 69.7% of the variability in the log-transformed housing prices. The adjusted R-squared is 0.6896. Overall, the model is well-fitted. 3.3. Diagnostics analysis In the quantile-quantile (Q-Q) plot shown in Figure 4, the actual data points almost follow the red straight line. It indicates that the residuals from the fitted model are approximately normally distributed, which is essential to the validity of linear regression. Figure 4. Q-Q Plot The linearity and homoscedasticity assumptions of the linear regression model are ostensibly met, according to the Residuals vs. Fitted Values plot in Figure 5. The residuals are distributed uniformly throughout the fitted value range in a random manner. Nonetheless, the existence of a few outliers indicates that more research is necessary to make sure that these data points do not significantly impact the performance of the model. In conclusion, the diagnostic plot demonstrates that the linear regression model is valid for the provided data. Proceedings of CONF-MPCS 2024 Workshop: Quantum Machine Learning: Bridging Quantum Physics and Computational Simulations DOI: 10.54254/2753-8818/51/2024CH0174 77