Use R to complete the following questions. You should includeyour R code, output and plots in your answer.
1. Two methods of generating a standard normal random variableare:
a. Take the sum of 5 uniform (0,1) random numbers and scale tohave mean 0 and standard deviation 1. (Use the properties of theuniform distribution to determine the required transformation).
b. Generate a standard uniform and then apply inverse cdffunction to obtain a normal random variate (Hint: use qnorm).
For each method generate 10,000 random numbers and check thedistribution using
a. Normal probability plot
b. Mean and standard deviation
c. The proportion of the data lying within the theoretical 2.5and 97.5 percentiles and the 0.5 and 99.5 percentiles. (Hint: Theifelse function will be useful)