Question: R Programming: Use preexisting functions in R to write a function called ourhist that produces a pro- portion histogram of a numerical vector x such

R Programming:

  1. Use preexisting functions in R to write a function called ourhist that produces a pro- portion histogram of a numerical vector x such that the number of breaks is determined by the Scott method and the histogram is overlaid with the density line. Test it on 100 randomly generated observations from the Exp(3) distribution.

  2. Using the ifelse() function, write a function that adds 1 to all the positive entries of a vector and subtracts one from all the non-positive entries. Test it on 100 randomly generated observations from the N(0,1) distribution, and use the function from the previous problem to create a histogram of the modified sample.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!