Statistics

 Quantitative Methods for Accounting and Finance  statistics problem need to use Rstudio and the calculation 

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

TSTA60

2

Assignment 2

September 28, 2020

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Instructions. Assignment 2 has a total of 40 marks and worths 40% of the final
grade of TSTA602. The detailed marks allocation are provided at the beginning of
each question. Unless otherwise specified, please calculate your answer to two deci-
mal places if approximation is needed. This assignment is due at 5pm on Friday
of Week

1

0 (23rd October, 2020). Please submit your assignment before the
deadline, no late submission will be accepted unless a pre-approval from Lecturer is
obtained. The assignment must be submittded via Moodle in a pdf format with the
file name ’firstname surname studentID ’. Any assignment submitted through
email (without pre-approval) will not be marked. Although this is an individual as-
signment, you are encouraged to discuss the assignment with your peers, but must
write down your own solution. Penalties will apply if two solutions have a high
similarity.

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 (2 marks for
attach R codes).

(a). (3 marks) Import the data into Rstudio, draw two scatter plots: apart price
versus rent and apart price versus cost.

(b). (4 marks) 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). (8 marks) 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). (6 marks) Produce residual plots for each model in (b), comment on each plot.

(e). (4 marks) Produce normal qq plots for each model in (b), and comment on
each plot.

1

(f). (3 marks) Fit the following linear model:

Model 3: apart price = d0 + d1rent + d2cost

Write down the equation of the model with correct coefficients.

(g). (6 marks) 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). (2 marks) Compare Model 1 and Model 3, explain which one is better.

(i). (2 marks) Given rent = 900 and cost = 650, predict prices under Model 1 and
Model 3.

2

apart_price,rent,cost_of_property
500,350,300
505,360,305
515,370,310
520,380,320
525,385,330
535,395,340
540,400,350
550,415,360
555,420,370
570,430,380
585,440,390
590,450,400
595,455,410
600,465,365
615,480,370
620,485,375
625,490,380
630,505,385
635,510,390
645,520,395
660,530,400
665,540,405
670,545,410
675,560,415
685,565,420
695,575,425
710,580,430
720,595,435
725,600,440
730,610,445
735,620,450
750,630,455
755,640,460
765,645,465
770,655,470
775,665,475
785,675,480
795,680,485
800,690,490
805,705,495
810,710,500
815,720,505
825,725,510
835,735,515
840,750,520
845,755,525
860,760,530
875,775,535
890,780,540
905,800,545

TSTA60

2

Assignment 2 Solutions

June

1

4

, 2020

Instructions. This assignment has a total of

3

0 marks and worth 30% of the final
grade of TSTA602. The detailed marks allocation are provided at the beginning of
each question. You are encouraged to discuss the assignment with your peers, but
must write down your own solution. This assignment is due at 5pm on Friday of
Week 11 (12th June, 2020). Please submit your assignment on Moodle before
the deadline.

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.

(a). (2 marks) Import the data into Rstudio, draw two scatter plots: apart price
versus rent and apart price versus cost.

400

500 600 700 800

5
5

0
6

0
0

6
5

0
7

0
0

7
5

0
8

0
0

8
5

0
9

0
0

Price vs

Rent

Rent

P
ri

c
e

500 600 700 800
5
5
0
6
0
0
6
5
0
7
0
0
7
5
0
8
0
0
8
5
0
9
0
0

Price vs

Cost

Cost
P
ri
c
e

(b). (4 marks) Fit the following two linear models:

Model 1: apart price = b0 + b1 × rent

Model 2: apart price = c0 + c1 × cost

1

Write down the equations of the two models with correct coefficients.

Model 1: apart price = 259.7 + 0.80rent

Model 2: apart price = −6.30 + 1.14cost

(c). (4 marks) Comment 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.

p− values are

< 2e−16 (significant)

< 2e−16 (significant)

0.0765 (not significant)

< 2e−16 (significant)

(d). (6 marks) Produce residual plots for each model in (b), comment on each plot.

400 500 600 700 800


4


2

0
2

4
6

Residual Plot − Rent

Rent

r

e
s
id

u
a
l

500 600 700 800


5

0
5

Residual Plot − Cost

Cost
re
s
id
u
a
l

Linearity: There are no obvious pattern in each residual plots; linear relation-
ship seems to be reasonable.

Constant Variance: Both plots show a rough band shape; constant variance
assumption did not violate.

(e). (4 marks) Produce normal qq plots for each model in (b), and comment on
each plot.

2

−2 −1 0 1 2


4

2
0
2
4
6

QQ Plot − Rent

Theoretical Normal Quantiles

R
e
s
id

u
a
ls

−2 −1 0 1 2

5
0
5

QQ Plot − Cost

Theoretical Normal Quantiles
R

e
s
id
u
a
ls

Each figure above shows a rough linear relationship in the qq plot which suggests
normality assumption on error are appropriate.

(f). (3 marks) Fit the following linear model:

Model 3: apart price = d0 + d1rent + d2cost

Write down the equation of the model with correct coefficients.

Model 3: apart price = 186.23 + 0.58rent + 0.32cost

(g). (3 marks) Comment 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.

p− values are

2.35e−10 (significant)

8.11e−11 (significant)

0.00268 (significant)

(h). (2 marks) Compare Model 1 and Model 3, explain which one is better.

From ANOVA, we see that the p-value is 0.002683 < 0.05 which suggests Model 3 is better.

(i). (2 marks) Given rent = 810 and cost = 800, predict prices under Model 1 and
Model 3.

Model 3: apart price = 259.7 + 0.80rent = 907.7

Model 3: apart price = 186.23 + 0.58rent + 0.32cost = 912.03

3

Marking Guidelines

(a). 1 mark for scatter plot apart price versus rent;
1 mark for scatter plot apart price versus cost.

(b). 1 mark for each correct coefficient.

(c). 1 mark for each correct conclusion.

(d). 1 mark for each residial plot;
1 mark for each comment on linearity; 1 mark for each comment on constant
variacne.

(e). 1 mark for each correct normal qq plot;
1 mark for each comment on normality.

(f). 1 mark for each correct coefficient.

(g). 1 mark for each correct conclusion.

(h). 1 mark for using ANOVA;
1 mark for correct conclusion.

(h). 1 mark for each correct prediction.

Note: if no codes are attached, 3 marks are taken away.

4

Calculate your order
Pages (275 words)
Standard price: $0.00
Client Reviews
4.9
Sitejabber
4.6
Trustpilot
4.8
Our Guarantees
100% Confidentiality
Information about customers is confidential and never disclosed to third parties.
Original Writing
We complete all papers from scratch. You can get a plagiarism report.
Timely Delivery
No missed deadlines – 97% of assignments are completed in time.
Money Back
If you're confident that a writer didn't follow your order details, ask for a refund.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Power up Your Academic Success with the
Team of Professionals. We’ve Got Your Back.
Power up Your Study Success with Experts We’ve Got Your Back.

Order your essay today and save 30% with the discount code ESSAYHELP