Write a program in (mathrm{R}) that simulates 1000 observations from a Multino(operatorname{MIAL}(n, 3, mathbf{p})) distribution where (mathbf{p}^{prime}=left(frac{1}{4},

Question:

Write a program in \(\mathrm{R}\) that simulates 1000 observations from a Multino\(\operatorname{MIAL}(n, 3, \mathbf{p})\) distribution where \(\mathbf{p}^{\prime}=\left(\frac{1}{4}, \frac{1}{4}, \frac{1}{2}ight)\). On each observation compute \(T_{n}=\sum_{k=1}^{3} n p_{k}^{-1}\left(X_{n k}-n p_{k}ight)^{2}\) where \(\mathbf{X}^{\prime}=\left(X_{n 1}, X_{n 2}, X_{n 3}ight)\). Make a density histogram of the 1000 values of \(T_{n}\) and overlay the plot with a plot of CHISquAREd(2) distribution for comparison. Repeat the experiment for \(n=5,10,25,100\) and 500 and describe how both sequences converge to a ChiSquared(2) distribution.

Step by Step Answer:

Related Book For  answer-question
Question Posted: