The questions involve the data set for asking prices of Richmond townhouses obta
ID: 3044974 • Letter: T
Question
The questions involve the data set for asking prices of Richmond townhouses obtained on 2014.11.03 For your subset, the response variable is asking price divided by 10000 askpr-c(58.39, 65.99, 86.8, 55.8, 25.9, 57.8, 47.8, 40.8, 26.99, 51.68, 71.99, 44.8, 58.8, 33.7, 51.99, 79.99, 61.5, 68.5, 62.8888, 78.8, 50.8, 50.5, 81.9, 68.8, 79.8, 41.99, 53.8, 68.8, 60.8, 40.9, 108.8, 53.8, 40.8, 47.9, 53.9, 52.4, 56.88, 59.8, 74.8, 49.9) The explanatory variables are (i) finished floor area divided by 100 farea-c(15.09, 22.78, 15.08, 13.06, 6.1, 13.84, 13.34, 14, 10.5, 15.1, 15.05, 9.4, 17.37, 12, 12.09, 22, 14.5, 15.76, 15.77, 19.48, 16.6, 12.26, 20.95, 15.95, 15.25, 12.9, 10.95, 16.9, 13.2, 16.06, 23.98, 12.22, 12.26, 12.1, 11.84, 16.22, 15.78, 17.63, 17.48, 15.6) (ii) age age-c(8, 35, 1, 0, 11, 10, 32, 38, 37, 20, 8, 14, 26, 28, 7, 20, 7, 4, 6, 11, 23, 3, 19, 18, 3, 44, 18, 8, 3, 25, 16, 9, 29, 7,15, 25, 17, 26, 5, 20) You are to fit a multiple regression model with the response variable askpr and two explanatory variables farea, age richmondtownh-data.frame(askpr,ffarea,age) After fitting the regression model, get the vector of fitted or predicted values ý Please use 3 significant digits for the answers below which are not integer-valued Part a) The values of R2 for the regression model with 2 explanatory variables is: 2 explanatory: Part b) Let yi be the values of askpr and let ý, be the fitted values fori -1,...,n - 40 The sample mean of the yi IS and the sample SD of the yi is The sample mean of the ý, is and the sample SD of the ý, isExplanation / Answer
Part a)
R-squared: 0.8156
Part b)
yi = askpr and yi^ is it's predicted value :
Part c : Covariance between Yi and Yi^
Cov (Yi , Yi^) = 224.7405
Correlation between Yi and Yi^ is
Corr(Yi , Yi^) = 0.9030794
Part d) : Correlation of Yi and Yi^ (0.903079) and R^2 (0.8156) are not match
Part e) : The correlation between Yi and Wi is 0.897518
Part f) : Yes , the correlation in C is large
R Code for your referance :
Yi = askpr
Yi^ = pred
askpr=c(58.39, 65.99, 86.8, 55.8, 25.9, 57.8, 47.8, 40.8, 26.99, 51.68, 71.99, 44.8, 58.8, 33.7, 51.99, 79.99, 61.5, 68.5, 62.8888, 78.8, 50.8, 50.5, 81.9, 68.8, 79.8, 41.99, 53.8, 68.8, 60.8, 40.9, 108.8, 53.8, 40.8, 47.9, 53.9, 52.4, 56.88, 59.8, 74.8, 49.9)
ffarea=c(15.09, 22.78, 15.08, 13.06, 6.1, 13.84, 13.34, 14, 10.5, 15.1, 15.05, 9.4, 17.37, 12, 12.09, 22, 14.5, 15.76, 15.77, 19.48, 16.6, 12.26, 20.95, 15.95, 15.25, 12.9, 10.95, 16.9, 13.2, 16.06, 23.98, 12.22, 12.26, 12.1, 11.84, 16.22, 15.78, 17.63, 17.48, 15.6)
age=c(8, 35, 1, 0, 11, 10, 32, 38, 37, 20, 8, 14, 26, 28, 7, 20, 7, 4, 6, 11, 23, 3, 19, 18, 3, 44, 18, 8, 3, 25, 16, 9, 29, 7, 15, 25, 17, 26, 5, 20)
model = lm(askpr~ffarea+age)
aov(model)
summary(model)
pred = 14.1104+3.7329*ffarea-0.7170*age
mean(pred)
sqrt(var(pred))
mean(askpr)
sqrt(var(askpr))
cov(askpr,pred)
cor(askpr,pred)
wi = 15.8943+3.83288*ffarea-0.916983*age
cor(wi,askpr)
>>>>>>>>>>> Best Luck >>>>>>>>>>>
Estimate Yi Yi^ Mean 58.19947 16.60017 Standered Deviation 58.19522 14.99142Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.