In: Statistics and Probability
Building type | Average floor area (m2) | Total floor area (m2) | avg story height(cms) | COST (HK$) | |||||||||
1 | 1852 | 81478 | 410 | 1467000000 | |||||||||
1 | 1608 | 64313 | 411 | 1150000000 | |||||||||
1 | 1430 | 55783 | 403 | 1028000000 | |||||||||
1 | 1562 | 57794 | 390 | 1100000000 | |||||||||
1 | 1109 | 37695 | 391 | 728000000 | |||||||||
1 | 905 | 28048 | 382 | 558000000 | |||||||||
1 | 1852 | 81478 | 410 | 1467000000 | |||||||||
1 | 901 | 30617 | 391 | 631000000 | |||||||||
1 | 1727 | 69062 | 400 | 1223000000 | |||||||||
1 | 1161 | 37148 | 394 | 761000000 | |||||||||
1 | 1004 | 37141 | 400 | 713000000 | |||||||||
1 | 1216 | 38912 | 390 | 784000000 | |||||||||
1 | 2007 | 88302 | 422 | 1593000000 | |||||||||
1 | 2983 | 173000 | 440 | 2649000000 | |||||||||
2 | 1523 | 70080 | 372 | 1210000000 | |||||||||
2 | 912 | 28286 | 370 | 607000000 | |||||||||
2 | 1343 | 53715 | 382 | 977000000 | |||||||||
2 | 1175 | 32908 | 381 | 700000000 | |||||||||
2 | 1203 | 40902 | 393 | 811000000 | |||||||||
2 | 1393 | 52951 | 392 | 1001000000 | |||||||||
2 | 713 | 20681 | 375 | 468000000 | |||||||||
2 | 1047 | 37681 | 411 | 747000000 | |||||||||
2 | 1506 | 63270 | 421 | 1156000000 | |||||||||
2 | 1642 | 70624 | 423 | 1268000000 | |||||||||
2 | 1848 | 73936 | 403 | 1333000000 | |||||||||
2 | 1627 | 60190 | 402 | 1162000000 | |||||||||
2 | 1301 | 40321 | 384 | 864000000 | |||||||||
2 | 905 | 25330 | 405 | 561000000 | |||||||||
2 | 1727 | 72514 | 400 | 1303000000 | |||||||||
2 | 1414 | 52318 | 392 | 1013000000 | |||||||||
2 | 2001 | 76022 | 431 | 1487000000 | |||||||||
2 | 400 | 9200 | 380 | 263000000 | |||||||||
2 | 3100 | 102190 | 454 | 2112000000 | |||||||||
2 | 1677 | 83860 | 410 | 1519000000 | |||||||||
2 | 2415 | 130032 | 420 | 2045000000 | |||||||||
2 | 1555 | 46637 | 410 | 1025000000 | |||||||||
2 | 792 | 20596 | 420 | 540000000 | |||||||||
|
|||||||||||||
2 | Steel |
1 |
Import the data into R and store into a data frame dat
1)Option A (Adjusted R-squared: 0.9786)
R Code:
reg<-lm(dat$`COST (HK$)`~dat$`avg story height(cms)`+dat$`Total floor area (m2)`)
summary(reg)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.007e+09 3.234e+08 -3.115 0.003724 **
dat$`avg story height(cms)` 3.185e+06 8.511e+05 3.742 0.000674 ***
dat$`Total floor area (m2)` 1.397e+04 5.043e+02 27.694 < 2e-16 ***
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 72020000 on 34 degrees of freedom
Multiple R-squared: 0.9798, Adjusted R-squared: 0.9786
F-statistic: 824.8 on 2 and 34 DF, p-value: < 2.2e-16
2)Yes,avg story height is a significant predictor at level 0.05 since pvalue=0.003724 < 0.05
3)Yes,Total floor area is a significant predictor at level 0.05 since pvalue< 2e-16 < 0.05.
4)c)The expected cost of a building with a total area of 1 m2 is HK$13,965
5)c). The expected cost of a building with a story height of 0 cms is HK$3,185,038
6)Option A (Adjusted R-squared: 0.9792)
R Code:
reg<-lm(dat$`COST (HK$)`~dat$`avg story height(cms)`+dat$`Total floor area (m2)`+dat$`Building type`)
summary(reg)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.034e+09 3.197e+08 -3.234 0.00277 **
dat$`avg story height(cms)` 3.101e+06 8.420e+05 3.683 0.00082 ***
dat$`Total floor area (m2)` 1.406e+04 5.025e+02 27.987 < 2e-16 ***
dat$`Building type` 3.375e+07 2.434e+07 1.387 0.17480
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 71060000 on 33 degrees of freedom
Multiple R-squared: 0.9809, Adjusted R-squared: 0.9792
F-statistic: 565.5 on 3 and 33 DF, p-value: < 2.2e-16
7)d.) It is the expected cost of a reinforced concrete building with an average story height and a total area of 0 m2.
8)No it is not significantly more expensive since p value=0.17480>0.05.
9)c.) Has a negative relationship with the cost of building
10)c.) Has a negative relationship with the cost of building