Write a program in (mathrm{R}) that simulates 1000 samples of size (n) from a UNI(operatorname{FORm}left(theta_{1}, theta_{2}ight)) distribution

Question:

Write a program in \(\mathrm{R}\) that simulates 1000 samples of size \(n\) from a UNI\(\operatorname{FORm}\left(\theta_{1}, \theta_{2}ight)\) distribution where \(n, \theta_{1}\), and \(\theta_{2}\) are specified below. For each sample compute \(Z_{n}=n^{1 / 2} \sigma^{-1}\left(\bar{X}_{n}^{2}-\mu^{2}ight)\) where \(\bar{X}_{n}\) is the mean of the observed sample and \(\mu\) and \(\sigma\) correspond to the mean and standard deviation of a \(\operatorname{UnIfORm}\left(\theta_{1}, \theta_{2}ight)\) distribution. Plot a histogram of the 1000 observed values of \(Z_{n}\) for each case listed below and compare the shape of the histograms to what would be expected.

a. \(\theta_{1}=-1, \theta_{2}=1\).

b. \(\theta_{1}=0, \theta_{2}=1\).

Step by Step Answer:

Related Book For  answer-question
Question Posted: