1# RECORD a072fb43e67fcc553e457777f0c68324ace19eb72# TITLE: Factors influencing housing prices: A comparative study using multiple linear regression and random forest3# YEAR: 2024.0 VENUE: Theoretical and Natural Science DOI: 10.54254/2753-8818/51/2024ch01744# AUTHORS: Shutong Zhong5# PAGES: 7 CANDIDATE TABLE PAGES (1-based): [4]6# 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.789===== PAGE 1 (score 14, numeric-paren 0, table-words 1, var-words 12) =====1011 12 13Factors influencing housing prices: A comparative study using 14multiple linear regression and random forest 15Shutong Zhong 16Mathematics Faculty, University of Waterloo, Waterloo, N2L 3G1, Canada 17s47zhong@uwaterloo.ca 18Abstract. The method is to construct a multiple linear regression model to examine the variables 19that significantly affect US home prices. The dataset has 13 variables and 545 observations, and 20it was obtained via Kaggle. This paper also considers comparing the multiple linear regression 21models and random forest model for predicting house prices and thus concludes which model 22can most accurately predict house prices. The result indicates that the factors including area, 23quantity of bedrooms and bathrooms, the existence of a basement, and state of the furnishings, 24etc. significantly impact housing prices. By comparing Root Mean Squared Error (RMSE) and 25Mean Absolute Percentage Error (MAPE), the conclusion suggests that the multiple linear 26regression model marginally surpasses the random forest regarding the accuracy of the 27predictions, despite the fact that both models function similarly. This research offers practical 28applications for enhancing real estate market strategies and provides valuable insights into the 29factors influencing housing prices. 30Keywords: Multiple linear regression, random forest, housing prices. 311. Introduction 32The price of housing has always been a hot topic in every country. Accurate forecasting of house prices 33is a key undertaking in the real estate market and has a major impact on buyers, sellers, and policymakers. 34In addition, identifying which factors affect housing prices is the most popular research topic among the 35stakeholders. Jiang and Qiu analyzed the price of land acquisition had a significant positive impact on 36housing prices, and disposable income had a smaller positive effect on housing prices [1]. Dong used 37the data on housing prices in New York City to conduct an analysis. The result concluded from his study 38was the appreciation rate of average home prices is mostly influenced by the volume of real estate 39transactions after the component of real estate location is eliminated [2]. Zhao and Liu analyzed the 40impact of housing policy using a methodical quantitative literature analysis. [3]. Their research 41identified three distinct forms of housing policies that have an impact on the real estate market: monetary 42policies, tax policies, and macro-prudential policies [3]. 43There are many models and methods that can be used in the process of predicting house prices. Sagala 44and Cendriawan developed a linear regression model using a dataset from the Maribelajar company to 45predict housing prices [4]. The data analysis and testing conducted in this research demonstrate that the 46multiple linear regression model can predict and assess home prices to a specific extent [4]. Nevertheless, 47the algorithm might be enhanced further by including more sophisticated machine-learning techniques. 48Wang et al. provided a comprehensive joint self-attention model for predicting property prices [5]. The 49Proceedings of CONF-MPCS 2024 Workshop: Quantum Machine Learning: Bridging Quantum Physics and Computational Simulations50DOI: 10.54254/2753-8818/51/2024CH0174 51© 2024 The Authors. This is an open access article distributed under the terms of the Creative Commons Attribution License 4.0 52(https://creativecommons.org/licenses/by/4.0/). 5373 545556===== PAGE 4 (score 36, numeric-paren 0, table-words 7, var-words 15) =====5758 59 60There is only one remaining outlier after the dependent variable (housing price) is checked in the 61boxplot below. It is advantageous to eliminate this observation in order to enhance the precision of 62subsequent experiments. The number of observations is reduced from 545 to 544 by employing the 63Interquartile Range (IQR) method, which eliminates 0.02% of the original dataset (Figure 3). 64 65Figure 3. Boxplot of Log Housing Price 663.2. Model results 67Using the transformed data set, a multiple linear regression model (MLRM) was fitted to determine the 68significant factors influencing housing prices. The model below is defined as a full model: 69𝑌= 𝛽0 + 𝛽1𝑥1 + ⋯+ 𝛽12𝑥12 + ϵ70(2) 71Where 𝑥1, 𝑥2, … , 𝑥12 correspond to the independent variables in the transformed dataset, 𝛽0 is a 72constant term, and ϵ is an error term. 73Table 2. Regression Coefficient Table 74 75𝛽 76SE 77T-statistics 78P-vaule 79VIF 80Intercept 8114.350 820.051 83281.662 84< 0.0001 85 86Area 870.00005 88< 0.0001 8910.579 90< 0.0001 911.150 92Bedrooms 930.029 940.014 952.046 960.041 971.169 98Bathrooms 990.262 1000.020 1018.121 102< 0.0001 1031.133 104Stories 1050.090 1060.012 1077.264 108< 0.0001 1091.214 110Main Road 1110.118 1120.027 1134.312 114< 0.0001 1151.083 116Guestroom 1170.071 1180.025 1192.812 1200.005 1211.102 122Basement 1230.091 1240.021 1254.293 126< 0.0001 1271.151 128Hot Water Heating 1290.164 1300.043 1313.814 1320.0002 1331.021 134Airconditioning 1350.173 1360.021 1378.298 138< 0.0001 1391.099 140Parking 1410.044 1420.011 1433.872 1440.0001 1451.100 146Prefer area 1470.123 1480.022 1495.500 150< 0.0001 1511.072 152Semi-furnished 1530.021 1540.023 1550.920 1560.358 1571.026 158Unfurnished 159-0.108 1600.024 161-4.416 162< 0.0001 1631.026 164Table 2 presents the estimated coefficients (β), standard errors (SE), t-statistics, p-values, and 165variance inflation factors (VIF) for each independent variable in the multiple linear regression model 166predicting the log-transformed housing prices. The baseline log price is indicated by the intercept term, 167which is significantly positive (β0 = 14.350, p ≈ 0.000) when all factors are zero. Furthermore, Table 1682 indicates that the existing variables are statistically significant since p-values of 12 independent 169Proceedings of CONF-MPCS 2024 Workshop: Quantum Machine Learning: Bridging Quantum Physics and Computational Simulations 170DOI: 10.54254/2753-8818/51/2024CH0174 17176 172173174===== PAGE 5 (score 17, numeric-paren 0, table-words 7, var-words 2) =====175176 177 178variables are less than 0.05. All VIF values are lower than 4, which suggests that all variables are 179individually reliable in explaining variations in log-transformed housing prices. As a result, all variables 180in the dataset have a significant effect on the dependent variable Y. According to data from the 181Regression Coefficient Table, the multiple regression model function structures as below: 182 𝑌= 14.350 + 0.0000495𝑥1 + ⋯+ 0.021𝑥12 + 0.10813𝑥13 + ϵ183(3) 184The other method to select significant variables for the fitted model is stepwise regression with AIC. 185In a regression model, variables are added or removed iteratively based on their AIC value. By using 186this method, the selected variables are identical to those selected based on the p-value. 187For this model, the residual standard error (RSE) of 0.2059 indicates that the typical deviation is 188roughly 0.2059 based on the predicted values of this model and the observed log-transformed housing 189prices. As evidenced by the relatively low RSE, the predictions for this model and the actual data points 190are fairly close. The multiple R-squared value is 0.697. It represents the independent variables in the 191model account for roughly 69.7% of the variability in the log-transformed housing prices. The adjusted 192R-squared is 0.6896. Overall, the model is well-fitted. 1933.3. Diagnostics analysis 194In the quantile-quantile (Q-Q) plot shown in Figure 4, the actual data points almost follow the red 195straight line. It indicates that the residuals from the fitted model are approximately normally distributed, 196which is essential to the validity of linear regression. 197 198Figure 4. Q-Q Plot 199The linearity and homoscedasticity assumptions of the linear regression model are ostensibly met, 200according to the Residuals vs. Fitted Values plot in Figure 5. The residuals are distributed uniformly 201throughout the fitted value range in a random manner. Nonetheless, the existence of a few outliers 202indicates that more research is necessary to make sure that these data points do not significantly impact 203the performance of the model. In conclusion, the diagnostic plot demonstrates that the linear regression 204model is valid for the provided data. 205Proceedings of CONF-MPCS 2024 Workshop: Quantum Machine Learning: Bridging Quantum Physics and Computational Simulations 206DOI: 10.54254/2753-8818/51/2024CH0174 20777 208