Question: Problem 2: (a)(5 pts) Write an R function called my_rexp( that generates n random numbers from Exp(1), and: 1. it takes one actual (non-optional) argument

Problem 2: (a)(5 pts) Write an R function called my_rexp( that generates n random numbers from Exp(1), and: 1. it takes one actual (non-optional) argument n, 2. it takes one optional argument /am with the default value 1. 3. it uses R function runif(, and 4. it does NOT use rexp() nor any other R function that generates exponentially distributed random numbers. (b)(5 pts) Plot the histogram of the vector obtained by my_rexp() call for n = 100,000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
