1. Write an R function named “abs.shift” to calculate the function value |x|-1 of a real number x, where |x| is the absolute value of x. Do not use the abs() function.
2. Which of the following method is for simulating discrete random variables?
A) The Rejection method with uniform envelope.
B) The Inverse CDF method.
C) The rnorm() function.
D) The sample() function in R.
question 2.
Answer is option D sample() in R
Get Answers For Free
Most questions answered within 1 hours.