Write a program in (mathrm{R}) that simulates a sequence of independent random variables (X_{1}, ldots, X_{100}) where

Question:

Write a program in \(\mathrm{R}\) that simulates a sequence of independent random variables \(X_{1}, \ldots, X_{100}\) where \(X_{n}\) is a \(\mathrm{N}\left(0, \sigma_{n}^{2}ight)\) random variable where the sequence \(\left\{\sigma_{n}ight\}_{n=1}^{\infty}\) is specified below. Repeat the experiment five times and plot each sequence \(X_{n}\) against \(n\) on the same set of axes. Describe the behavior observed for the sequence in each case, and relate the behavior to the results of Exercise 17.

a. \(\sigma_{n}=n^{-1}\) for all \(n \in \mathbb{N}\).

b. \(\sigma_{n}=n\) for all \(n \in \mathbb{N}\).

c. \(\sigma_{n}=10+(-1)^{n}\) for all \(n \in \mathbb{N}\).

d. \(\left\{\sigma_{n}ight\}_{n=1}^{\infty}\) is a sequence of independent random variables where \(\sigma_{n}\) has an Exponential \((\theta)\) distribution for each \(n \in \mathbb{N}\).

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: