Question: please use R Please answer the following questions and submit both R codes and the results. Make all results reproducible. (a) Generate a random sample

please use R
Please answer the following questions and submit both R codes and the results. Make all results reproducible. (a) Generate a random sample from standard normal distribution with size n = 200 and draw a histogram. (b) Generate a random sample from standard normal distribution with size n = 200 and calculate sample mean, sample variance, and sample median. (c) Define a function which returns sample mean, sample variance and sample median as a list with an input of a vector (d) Generate a random sample from t distribution (df=2) with size n=200 and draw a histogram. (e) Generate a random sample from t distribution (df=2) with size n = 200, and use (c) to calculate sample mean, sample variance, and sample median. (f) Repeat (e) 1,000 times and draw histograms for sample mean and sample median, respectively
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
