Scenario. You, as a property investor, are interested in understanding which factor (or factors) drives the prices of investment properties. A dataset is collected which contains the prices (in thousand dollars, as denoted by apart price) for 50 one- bedroom apartments in city X, their corresponding rents per week (in dollars, as denoted by rent) and the costs to hold each of these properties per week (in dollars, as denoted by cost of property). Following the procedures below to analyse the dataset ’assign2 data.csv’ by using Rstudio. Please only include relevant outputs from Rstudio in your solution and attach the R codes as appendice ( for attach R codes). (a). Import the data into Rstudio, draw two scatter plots: apart price versus rent and apart price versus cost. (b). Fit the following two linear models: Model 1: apart price = b0 + b1 × rent Model 2: apart price = c0 + c1 × cost Write down the equations of the two models with correct coefficients. (c). Written down the p-values from the output of your R codes. Com- ment on the significance of all coefficients obtained from (b) based on the p- values (from the outputs of Rtudio). The significance level is 0.05. (d). Produce residual plots for each model in (b), comment on each plot. (e). Produce normal qq plots for each model in (b), and comment on each plot. (f). Fit the following linear model: Model 3: apart price = d0 + d1rent + d2cost Write down the equation of the model with correct coefficients. (g). Written down the p-values from the output of your R codes. Com- ment on the significance of all coefficients obtained from (f) based on the p- values (from the outputs of Rtudio). The significance level is 0.05. (h). Compare Model 1 and Model 3, explain which one is better. (i).Given rent = 900 and cost = 650, predict prices under Model 1 and Model 3. apart_price rent cost_of_property 500 277 55 505 282 60 515 297 65 520 309 70 525 313 72 535 319 75 540 326 72 550 333 71 555 342 70 570 358 68 585 371 63 590 379 60 595 396 71 600 401 73 615 407 78 620 414 80 625 426 82 630 434 85 635 441 81 645 443 80 660 455 91 665 473 93 670 479 95 675 483 97 685 487 96 695 508 95 710 519 93 720 523 92 725 531 91 730 537 94 735 546 97 750 557 99 755 563 100 765 572 104 770 582 103 775 597 101 785 602 101 795 608 97 800 618 90 805 627 95 810 634 101 815 641 103 825 653 104 835 662 96 840 665 98 845 673 91 860 686 87 875 697 110 890 711 112 905 728 115
Unitary Method
The word “unitary” comes from the word “unit”, which means a single and complete entity. In this method, we find the value of a unit product from the given number of products, and then we solve for the other number of products.
Speed, Time, and Distance
Imagine you and 3 of your friends are planning to go to the playground at 6 in the evening. Your house is one mile away from the playground and one of your friends named Jim must start at 5 pm to reach the playground by walk. The other two friends are 3 miles away.
Profit and Loss
The amount earned or lost on the sale of one or more items is referred to as the profit or loss on that item.
Units and Measurements
Measurements and comparisons are the foundation of science and engineering. We, therefore, need rules that tell us how things are measured and compared. For these measurements and comparisons, we perform certain experiments, and we will need the experiments to set up the devices.
Scenario. You, as a property investor, are interested in understanding which factor
(or factors) drives the prices of investment properties. A dataset is collected which
contains the prices (in thousand dollars, as denoted by apart price) for 50 one-
bedroom apartments in city X, their corresponding rents per week (in dollars, as
denoted by rent) and the costs to hold each of these properties per week (in dollars,
as denoted by cost of property). Following the procedures below to analyse the
dataset ’assign2 data.csv’ by using Rstudio. Please only include relevant outputs
from Rstudio in your solution and attach the R codes as appendice ( for
attach R codes).
(a). Import the data into Rstudio, draw two
versus rent and apart price versus cost.
(b). Fit the following two linear models:
Model 1: apart price = b0 + b1 × rent
Model 2: apart price = c0 + c1 × cost
Write down the equations of the two models with correct coefficients.
(c). Written down the p-values from the output of your R codes. Com-
ment on the significance of all coefficients obtained from (b) based on the p-
values (from the outputs of Rtudio). The significance level is 0.05.
(d). Produce residual plots for each model in (b), comment on each plot.
(e). Produce normal qq plots for each model in (b), and comment on
each plot.
(f). Fit the following linear model:
Model 3: apart price = d0 + d1rent + d2cost
Write down the equation of the model with correct coefficients.
(g). Written down the p-values from the output of your R codes. Com-
ment on the significance of all coefficients obtained from (f) based on the p-
values (from the outputs of Rtudio). The significance level is 0.05.
(h). Compare Model 1 and Model 3, explain which one is better.
(i).Given rent = 900 and cost = 650, predict prices under Model 1 and
Model 3.
apart_price | rent | cost_of_property |
500 | 277 | 55 |
505 | 282 | 60 |
515 | 297 | 65 |
520 | 309 | 70 |
525 | 313 | 72 |
535 | 319 | 75 |
540 | 326 | 72 |
550 | 333 | 71 |
555 | 342 | 70 |
570 | 358 | 68 |
585 | 371 | 63 |
590 | 379 | 60 |
595 | 396 | 71 |
600 | 401 | 73 |
615 | 407 | 78 |
620 | 414 | 80 |
625 | 426 | 82 |
630 | 434 | 85 |
635 | 441 | 81 |
645 | 443 | 80 |
660 | 455 | 91 |
665 | 473 | 93 |
670 | 479 | 95 |
675 | 483 | 97 |
685 | 487 | 96 |
695 | 508 | 95 |
710 | 519 | 93 |
720 | 523 | 92 |
725 | 531 | 91 |
730 | 537 | 94 |
735 | 546 | 97 |
750 | 557 | 99 |
755 | 563 | 100 |
765 | 572 | 104 |
770 | 582 | 103 |
775 | 597 | 101 |
785 | 602 | 101 |
795 | 608 | 97 |
800 | 618 | 90 |
805 | 627 | 95 |
810 | 634 | 101 |
815 | 641 | 103 |
825 | 653 | 104 |
835 | 662 | 96 |
840 | 665 | 98 |
845 | 673 | 91 |
860 | 686 | 87 |
875 | 697 | 110 |
890 | 711 | 112 |
905 | 728 | 115 |
Step by step
Solved in 2 steps with 6 images