In: Statistics and Probability
5. The following is house price ($ thousands) and annual crime rate in different neighborhoods of a midwestern city 130 150 200 230 250 280 300 350 320 200 100 220 95 85 60 55 67 35 22 40 10 20 35 15 a. Write the linear regression equation b. Explain the intercept and the slope in practical terms c. How much of the variation in prices is explained by crime rate? d. Are we missing other important determinants of house price? like what?
5. We will solve the regression via simple R-codes. The data input commands would be as below.
> y <- c(130,150,200,230,250,280,300,350,320,200,100,220) > x <- c(95,85,60,55,67,35,22,40,10,20,35,15)
(a) The R-code and the results are as below.
> lm(y~x) Call: lm(formula = y ~ x) Coefficients: (Intercept) x 290.087 -1.393
Hence, the regression equation would be .
(b) The intercept $290.087 is the expected/average house price when the annual crime rate is zero. The slope is the ratio change in price and change in annual crime rate , ie the change in price due to a unit increase in annual crime rate.
(c) The R-code for the r-squared and the result is as below.
> summary(lm(y~x))$r.squared [1] 0.2496607
That means, r-squared, which is the percent of variation explained by annual crime rate, is 0.2496607 or 24.96607%.
(d) Yes, we are missing other important determinants of house prices, as the R-square is quite low, there might be more variables that would explain the house prices. We may add variables like construction costs, per-capita income of the people in the region/nation, population growth, etc. Construction costs primarily affect the price of houses, wile the income of the people would be decisive about their purchasing power and ability to buy the houses, and more the population grows, the more houses are demanded.