Question: MUST BE DONE ON R STUDIO USING R CODE. NEED CODE AND OUTPUT. (2 pts) If Z follows a standard normal distribution, then X =
MUST BE DONE ON R STUDIO USING R CODE. NEED CODE AND OUTPUT.

(2 pts) If Z follows a standard normal distribution, then X = Z has the density function: 2 f(x) = , for r > 0. Write a R function to generate a random sample of size n from X by the acceptance-rejection method. Name this function rhalfNorm. The rhalfNorm should have only one argument, n. for the number of observations. Print summary (rhalfNorm (1000) )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
