logo Use SA10RAM to get 10%* Discount.
Order Now logo
739 Times Downloaded

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Adrian ReedFinance
(5/5)

615 Answers

Hire Me
expert
Cameron CollinsEnglish
(5/5)

714 Answers

Hire Me
expert
Jesse RossResume writing
(5/5)

825 Answers

Hire Me
expert
Anthony BidiniiData mining
(5/5)

809 Answers

Hire Me
R Programming
(5/5)

Using R Markdown in R Studio, complete the following questions Write an R function for computing the value of f (x) = e−x2

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Directions

Using R Markdown in R Studio, complete the following questions. Launch RStudio and open a new RMarkdown file or use the class RMarkdown template provided and save it on your working directory as a.Rmd file. At the end of the activity, save your pdf generated from RMarkdown+Knitr and submit your homework on the Blackboard.

If you have questions, please post them on the lesson’s Discussion Board.

All questions are mandatory. R code and output must be clearly shown.

Homework submitted after the due date will attract a penalty of 10 points per day after the due date.

1.    Write an R function for computing the value of f (x) = e−x2 and test it for a vector x = c(0, 1, 100).

2.    Write an R function to compute the sample excess kurtosis given by for a given vector x = (x1, xn), where x¯ is the average of the elements of x.  Test the function for a vector x = 1:10.

3.    Suppose Jane wishes to take out a mortgage on a house. She wants to know what her periodic payments will be. If P is the initial amount mortgaged, r is the effective interest rate, and n is the length of the mortgage, then the periodic payment R is given by R=Pr1 − (1 + r)−n

(a)      Construct a function which employs this formula

(b)      Calculate Jane’s monthly payments, if the initial amount is $100, 000, the interest rate is 1% and the number of interest conversion periods is 300.

4.    Suppose payments of P dollars are deposited annually into a bank account that earns constant interest r per year. What is the accumulated value of the account at the end of n years, supposing deposits are made at the end of each year? The total amount at the end of n years is given by the expression Amount = P (1 + r)n−1 + · · · + P (1 + r) + P = P  (1 + r)n − 1r

(a)     Write an R function to compute the accumulated amounts after n = 10 years, with periodic payments P = $400 with a vector of interest rates r ranging from

0.01 to 0.2 by increments of 0.01.

(b)      Produce a line plot of the amounts (y-axis) against the interest rates (x-axis)

(c)     Optional question: Write a single function to perform both parts (a) and (b) above.

(5/5)
Attachments:

Expert's Answer

739 Times Downloaded

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme

Get Free Quote!

315 Experts Online