Q. In this question, you will do some resampling and showresults in graphics. This is related to bootstrap technique. Thepopulation distribution is a normal with µ = 10 and σ^2 = 4. Thestatistic is the sample mean. Hence in theory we know exactly whatthe density function of the sample mean is.
(a) Simulate a sample, say x, with sample size n=100. Report itsmean, sd, min, and max.
(b) Use R functions sample and replicate to resample x 50000times with replacement. The statistic is the sample mean and theoutput is booted.data. Find the mean, sd, min, and max ofbooted.data.
(c) Plot the histogram of booted.data. Please double the cellsof histogram since the default one is too small. Please plot as adensity plot since the theoretical density will be added in thenext step. Comment the shape and center of this distribution.
(d) Plot the histogram of booted.data-mean(x) with twice numberof default cells. Please plot as a density plot. Add thetheoretical density function of the X¯ −µ to the histogram withdifferent line type and color. Comment out your findings.
(e) Repeat the procedures from (a) to (d) two additional timesto check consistency.