Write a program in (mathrm{R}) that generates (b) samples of size (n) from a specified distribution (F)

Question:

Write a program in \(\mathrm{R}\) that generates \(b\) samples of size \(n\) from a specified distribution \(F\) (specified below). For each sample compute the statistic \(Z_{n}=n^{1 / 2} \sigma^{-1}\left(\bar{X}_{n}-\muight)\) where \(\mu\) and \(\sigma\) correspond to the mean and standard deviation of the specified distribution \(F\). Produce a plot of the empirical distribution function of the \(b\) values of \(Z_{n}\). On each plot overlay a plot of the standard normal distribution function and the function given by the one-term Edgeworth expansion for each case studied. Discuss how these functions compare to what would be expected for large \(n\) as regulated by the underlying theory given by Theorems 4.20 and 7.4. Run this simulation for \(n=10,25,50\), and 100 for each of the distributions listed below.

a. \(F\) corresponds to a \(\mathrm{N}(0,1)\) distribution.

b. \(F\) corresponds to an ExpOnEntial(1) distribution.

c. \(F\) corresponds to a \(\operatorname{Gamma}(2,2)\) distribution.

d. \(F\) corresponds to a \(\operatorname{UnIFORm}(0,1)\) distribution.

image text in transcribed

Step by Step Answer:

Related Book For  answer-question
Question Posted: