Write a program in (mathrm{R}) that simulates a sequence of independent and identically distributed random variables (X_{1},

Question:

Write a program in \(\mathrm{R}\) that simulates a sequence of independent and identically distributed random variables \(X_{1}, \ldots, X_{100}\) where \(X_{n}\) follows a distribution \(F\) that is specified below. For each \(n=1, \ldots, 100\) compute \(\bar{X}_{n}\) on \(X_{1}, \ldots, X_{n}\) along with \(\left|\bar{X}_{n}-\muight|^{2}\) where \(\mu\) is the mean of the distribution \(F\). Repeat the experiment five times and plot each sequence \(\left\{\left|\bar{X}_{n}-\muight|^{2}ight\}_{n=1}^{\infty}\) against \(n\) on the same set of axes. Describe the behavior observed in each case and compare it to whether \(X_{n} \xrightarrow{q m} \mu\) as \(n ightarrow \infty\).

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

b. \(F\) is a \(\operatorname{CAuchy}(0,1)\) distribution, where \(\mu\) is taken to be the median of the distribution.

c. \(F\) is a Exponential(1) distribution.

d. \(F\) is a \(\mathrm{T}(2)\) distribution.

e. \(F\) is a \(\mathrm{T}(3)\) distribution.

Step by Step Answer:

Related Book For  answer-question
Question Posted: