Question: Write a program in (mathrm{R}) that generates a sample (X_{1}, ldots, X_{n}) from a specified distribution (F), computes the empirical distribution function of (X_{1}, ldots,
Write a program in \(\mathrm{R}\) that generates a sample \(X_{1}, \ldots, X_{n}\) from a specified distribution \(F\), computes the empirical distribution function of \(X_{1}, \ldots, X_{n}\), and plots both the empirical distribution function and the specified distribution function \(F\) on the same set of axes. Use this program with \(n=\) \(5,10,25,50\), and 100 to demonstrate the consistency of the empirical distribution function given by Theorem 3.16. Repeat this experiment for each of the following distributions: \(\mathrm{N}(0,1)\), \(\operatorname{Binomial}(10,0.25), \operatorname{Cauchy}(0,1)\), and \(\operatorname{Gamma}(2,4)\).

Theorem 3.16. Let X1,..., Xn be a set of independent and identically dis- tributed random variables from a distribution F, and let n be the empir- ical distribution function computed on X1,..., Xn. Then for each t R, Fn(t) F(t) as n . a.c.
Step by Step Solution
3.47 Rating (163 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
