Guest User

Q2

a guest
Oct 24th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. #PART A
  2. plot(auction$Price~auction$Age)
  3. model <- lm(auction$Price~auction$Age)
  4. summary(model)
  5. abline(model)
  6.  
  7. #PART B
  8. #Least squares estimate of the intercept:-381.860
  9. #Least squares estimate of the slope: 11.808
  10. #estimated error variance: 249.6^2 = 62300.16
  11.  
  12. #PART C
  13. # When age if the clock increases by one year, the price increases or decreases by 11.808 pounds sterling.
  14.  
  15. #PART D
  16. # 62.37% of variation in the response is explained by the values of the predictor.
  17.  
  18. #PART E
  19. #The F-statistic is 46.42 (2dp) for testing H0: beta1 = 0 versus H1: beta1 is the slope term in the model.
  20. # very large F statistic means
  21. #The corresponding p-value is 2.115e-07, hence we have very strong evidence against the null meaning
  22. # This
  23.  
  24. #PART F
  25. sqrt(46.42)
  26. # = 6.813222 = observed t test statistic that is equivalent to the Ftest considered in part e
  27. # the computation ofthe p value for the test to be modified to the one sided alternative H1: beta1 > 0
  28. #
  29. 6.813222/2
  30.  
  31. anova(model)
  32.  
  33. -381.860 + 11.808*170
  34. confint()
Advertisement
Add Comment
Please, Sign In to add comment