ESYE501 Optional Final Problem Set Problem 1: Below is the USD/TRY conversion rates for April and May XXXXXXXXXXIt will prove practical to use the date number as your independent variable rather than...

1 answer below »
The problems given in attached files should be solved clearly and solution of each step should be shown in a word file and should be readable. PS: pdf and txt files are exactly the same, txt file will provide convenience for copying. Please be careful on the time difference between Turkey and Austraila. The solution is needed until Thursday evening (24.05.2018) in Turkey time.


ESYE501 Optional Final Problem Set Problem 1: Below is the USD/TRY conversion rates for April and May 2018. (It will prove practical to use the date number as your independent variable rather than the date.) (a) Get the data into R. (b) Plot the data. (c) Choose a reasonable polynomial to fit the data. (d) Predict the price of the US Dollars on election day, June 24th. Hints in R: lm() is the function to use for regression. Although the name is  “linear model”, it can be used for general regression.    Try the following commands:    x <- c(1,="" 2,="" 3,="" 4,="" 5)="" ​x="" values ="" y=""><- c(1.5,="" 2.1,="" 3.7,="" 4.2,="" 5.5)="" ​y="" values ="" z=""><- data.frame(x)="" ​create="" a="" data="" frame ="" z="" ​see="" what="" it="" looks="" like ="" z$y=""><- y="" ​add="" the="" values="" column ="" z="" ​look="" at="" it="" again ="" model=""><- lm(y="" ~="" x,="" data="z)" ​linear="" model,="" y="" “described="" by”="" x =""  ="" summary(model)="" ​see="" model="" parameters ="" model2=""><- lm(y ~ poly(x, 2), data=z) ​quadratic model  summary(model2) ​see model parameters    the data (real!): day number date price 2 02-apr-18 3.9735 3 03-apr-18 3.9887 4 04-apr-18 3.9991 5 05-apr-18 4.0515 6 06-apr-18 4.0449 9 09-apr-18 4.0737 10 10-apr-18 4.1121 11 11-apr-18 4.136 12 12-apr-18 4.1102 13 13-apr-18 4.0969 16 16-apr-18 4.0963 17 17-apr-18 4.0976 18 18-apr-18 4.0086 19 19-apr-18 4.0403 20 20-apr-18 4.0766 23 23-apr-18 4.1079 24 24-apr-18 4.086 25 25-apr-18 4.0809 26 26-apr-18 4.0664 27 27-apr-18 4.0422 30 30-apr-18 4.0617 31 01-may-18 4.103 32 02-may-18 4.1771 33 03-may-18 4.2131 34 04-may-18 4.226 37 07-may-18 4.2669 38 08-may-18 4.3327 39 09-may-18 4.2876 40 10-may-18 4.2352 41 11-may-18 4.3136 44 14-may-18 4.3674 45 15-may-18 4.445 46 16-may-18 4.4139 47 17-may-18 4.4606 48 18-may-18 4.4917 51 21-may-18 4.5774 problem 2: below is a table of x and y values. (a) get the data into r (b) plot the data (c) peform regression analysis to find a good fit for the data. x y 1.2 1.488 1.4 2.275 1.5 2.845 1.6 3.168 1.9 4.960 2.4 8.839 2.6 10.882 2.7 11.960 3.1 16.895 3.2 18.298 3.4 21.379 3.6 24.626 4.2 36.229 4.5 42.941 4.6 45.341 4.8 50.517 4.9 53.118 5.2 61.646 5.3 64.658 5.5 70.943 lm(y="" ~="" poly(x,="" 2),="" data="z)" ​quadratic="" model ="" summary(model2)="" ​see="" model="" parameters =""  ="" the="" data="" (real!):="" day="" number="" date="" price="" 2="" 02-apr-18="" 3.9735="" 3="" 03-apr-18="" 3.9887="" 4="" 04-apr-18="" 3.9991="" 5="" 05-apr-18="" 4.0515="" 6="" 06-apr-18="" 4.0449="" 9="" 09-apr-18="" 4.0737="" 10="" 10-apr-18="" 4.1121="" 11="" 11-apr-18="" 4.136="" 12="" 12-apr-18="" 4.1102="" 13="" 13-apr-18="" 4.0969="" 16="" 16-apr-18="" 4.0963="" 17="" 17-apr-18="" 4.0976="" 18="" 18-apr-18="" 4.0086="" 19="" 19-apr-18="" 4.0403="" 20="" 20-apr-18="" 4.0766="" 23="" 23-apr-18="" 4.1079="" 24="" 24-apr-18="" 4.086="" 25="" 25-apr-18="" 4.0809="" 26="" 26-apr-18="" 4.0664="" 27="" 27-apr-18="" 4.0422="" 30="" 30-apr-18="" 4.0617="" 31="" 01-may-18="" 4.103="" 32="" 02-may-18="" 4.1771="" 33="" 03-may-18="" 4.2131="" 34="" 04-may-18="" 4.226="" 37="" 07-may-18="" 4.2669="" 38="" 08-may-18="" 4.3327="" 39="" 09-may-18="" 4.2876="" 40="" 10-may-18="" 4.2352="" 41="" 11-may-18="" 4.3136="" 44="" 14-may-18="" 4.3674="" 45="" 15-may-18="" 4.445="" 46="" 16-may-18="" 4.4139="" 47="" 17-may-18="" 4.4606="" 48="" 18-may-18="" 4.4917="" 51="" 21-may-18="" 4.5774="" problem="" 2:="" below="" is="" a="" table="" of="" x="" and="" y="" values.="" (a)="" get="" the="" data="" into="" r="" (b)="" plot="" the="" data="" (c)="" peform="" regression="" analysis="" to="" find="" a="" good="" fit="" for="" the="" data.="" x="" y="" 1.2="" 1.488="" 1.4="" 2.275="" 1.5="" 2.845="" 1.6="" 3.168="" 1.9="" 4.960="" 2.4="" 8.839="" 2.6="" 10.882="" 2.7="" 11.960="" 3.1="" 16.895="" 3.2="" 18.298="" 3.4="" 21.379="" 3.6="" 24.626="" 4.2="" 36.229="" 4.5="" 42.941="" 4.6="" 45.341="" 4.8="" 50.517="" 4.9="" 53.118="" 5.2="" 61.646="" 5.3="" 64.658="" 5.5="">
Answered Same DayMay 22, 2020

Answer To: ESYE501 Optional Final Problem Set Problem 1: Below is the USD/TRY conversion rates for April and...

Pooja answered on May 23 2020
152 Votes
1)
a)
    > x <- c(2,3,4,5,6,9,10,11,12,13,16,17,18,19,20,23,24,25,26,27,30,31,32,33,34,37,38,39,40,41,44,45,46,47,48,51)
>
> y <- c(3.9735, 3.9887,3.9991,
4.0515, 4.0449, 4.0737, 4.1121, 4.136, 4.1102, 4.0969, 4.0963, 4.0963, 4.0086, 4.0403, 4.0766,
+ 4.1079, 4.086, 4.0809, 4.0664, 4.0422, 4.0617, 4.103, 4.1771, 4.2131, 4.226, 4.2669,
+ 4.3327, 4.2876, 4.2352, 4.3136, 4.3674, 4.445, 4.4139, 4.4606, 4.4917, 4.5774)
>
> z <- data.frame(x)
> z$y <- y
> z
x y
1 2 3.9735
2 3 3.9887
3 4 3.9991
4 5 4.0515
5 6 4.0449
6 9 4.0737
7 10 4.1121
8 11 4.1360
9 12 4.1102
10 13 4.0969
11 16 4.0963
12 17 4.0963
13 18 4.0086
14 19 4.0403
15 20 4.0766
16 23 4.1079
17 24 4.0860
18 25 4.0809
19 26 4.0664
20 27 4.0422
21 30 4.0617
22 31 4.1030
23 32 4.1771
24 33 4.2131
25 34 4.2260
26 37 4.2669
27 38 4.3327
28 39 4.2876
29 40 4.2352
30 41 4.3136
31 44 4.3674
32 45 4.4450
33 46 4.4139
34 47 4.4606
35 48 4.4917
36 51 4.5774
    
        >
b)
> library(Publish)
> library(dplyr)
> plot(x, y,
+ xlab="day",
+ ylab="price", main="Scatter Plot")
There is a fluctuating trend from day 2 corresponding to 02-Apr-18 till day 30 corresponding to 30-Apr-18. After day 30 which corresponds to date 30-Apr-18, there is a continuous rising trend in the price till day 51 corresponding to date 21-May-18.
c)
> model <- lm(y ~ x, data=z)
> summary(model)
Call:
lm(formula = y ~ x, data = z)
Residuals:
Min 1Q Median 3Q Max
-0.152626 -0.059618 ...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here