logo Hurry, Grab up to 30% discount on the entire course
Order Now logo
539 Times Downloaded

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

expert
Drake WeberPhilosophy
(5/5)

853 Answers

Hire Me
expert
Clinton Kibaki MuneneNursing
(/5)

814 Answers

Hire Me
expert
Andrei KrushenkoMarketing
(5/5)

721 Answers

Hire Me
expert
Henry BehrensAccounting
(5/5)

805 Answers

Hire Me
R Programming
(5/5)

Enter the numerical results in the forms. Round to 2 decimal places.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

A. General Use and Operation of R #1-18 at 1 point each; #19 at 5 points; #20 at 2 points, #21-28 at 1 point each 33 points

for data, statistics, graphs

The lines of R code below, simulate Resting Heart Rate (beats/minute) in N=98 adults who arrived for a physical examination during one week, at White Plains Hospital, NY.

From the top down, submit these 4 lines of R code to the R Console. You should use the R Editor. You must submit these lines of code ex- actly as given below and in top-down order, as below. Comments are not needed. Do not email me your .R file for this problem.

> set.seed(sample(1:501, 1)) # 'seed' the random number generator

> N <- 98 # sample size

> y <- rnorm(N, 85, 7) # N random numbers from normal distribution: mean=85, SD=7

> y <- round(y) # round-off y to whole numbers

 

After submitting the 4 lines of code above, you should immediately execute the code for problems 1 to 19. Once you get started with problems 1 to 19, do not go back and run any of the 4 lines above, for if you do, you will get a completely different, numeric vector y.

 

Evaluate the function calls and the operations below. Enter the numerical results in the forms. Round to 2 decimal places.

 

1. mean(y) 2. sd(y)

3. sd(y)/sqrt(N) 4. 100 * sd(y)/mean(y)

5. min(y) 6. max(y)

7. skw(y)

 8. krt(y)

skw() and krt() are

from: K funs UNIVARIATE.R

 

 

9. mean(y) - qt(.975, N-1) * sd(y)/sqrt(N)

 

 

 

10. mean(y) + qt(.975, N-1) * sd(y)/sqrt(N)

11. shapiro.test(y)$p.value

 12. y[1:2]

 13. hist(y, plot=FALSE)$counts

14. median(y) 15. IQR(y)

16. quantile(y, .75) - quantile(y, .25)

 17. y[N-1]

 

 

 

 

18. stem(y)

 

Copy-paste, into the form, the text returned at the R Console.

 

Invented by John Tukey in the early 1970s a stem plot is a text version of a histogram.

19. Paste graph image below or save/submit as abc Arlo.pdf but use your name not Arlo.

h <- hist(y, plot=FALSE)$density dens <- density(y)

hist(y, freq=FALSE, main=NULL,

ylim=range(c(0, h, dens$y)), border="white", col="lightblue", xlab="Resting Heart Rate, beats/minute", cex.lab=1.5, cex.axis=1.3

)

lines(dens, col="red", lwd=3) # kernel mtext(paste("White Plains Hospital, NY",

"\nN = 98 adults"), line=.8, cex=1.8, font=2, col="darkred")

mtext("red: Kernel density", line=-1, adj=.98, cex=1, col="red")

box()

Paste graph image into the form or save/submit graph as abc Arlo.pdf if Arlo is your name else

use your name. Paste image, click on it, click on a corner, then resize to fit the form.

 

(5/5)
Attachments:

Expert's Answer

539 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