Write a program in (mathrm{R}) that generates independent (operatorname{UnIFORM}(0,1)) random variables (U_{1}, ldots, U_{n}). Define two sequences
Question:
Write a program in \(\mathrm{R}\) that generates independent \(\operatorname{UnIFORM}(0,1)\) random variables \(U_{1}, \ldots, U_{n}\). Define two sequences of random variables \(X_{1}, \ldots, X_{n}\) and \(Y_{1}, \ldots, Y_{n}\) as \(X_{k}=\delta\left\{U_{k} ;\left(0, k^{-1}ight)ight\}\) and \(Y_{k}=\delta\left\{U_{k} ;\left(0, k^{-2}ight)ight\}\). Plot \(X_{1}, \ldots, X_{n}\) and \(Y_{1}, \ldots, Y_{n}\) against \(k=1, \ldots, n\) on the same set of axes for \(n=25\). Is it apparent from the plot that \(X_{n} \xrightarrow{p} 0\) as \(n ightarrow \infty\) but that \(Y_{n} \xrightarrow{c} 0\) as \(n ightarrow \infty\) ? Repeat this process five times to get an idea of the average behavior in each plot.
Step by Step Answer:
Related Book For
Question Posted: