Question: Write a program in (mathrm{R}) that simulates five samples of size (n) from a distribution (F), where (n) and (F) are specified below. For each

Write a program in \(\mathrm{R}\) that simulates five samples of size \(n\) from a distribution \(F\), where \(n\) and \(F\) are specified below. For each sample compute a histogram estimate of the density \(f=F^{\prime}\) using the bin-width bandwidth estimator of Wand (1997), which is supplied by R. For each sample size and distribution plot the original density, along with the five histogram density estimates. Discuss the estimates and how well they are able to capture the characteristics of the true density. What type of characteristics appear to be difficult to estimate? Does there appear to be areas where the kernel density estimator has more bias? Are there areas where the kernel density estimator appears to have a higher variance? Repeat the experiment for \(n=50,100,250,500\), and 1000 .

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

b. \(F\) is a \(\operatorname{Uniform}(0,1)\) distribution.

c. \(F\) is a \(\operatorname{Cauchy}(0,1)\) distribution.

d. \(F\) is a Triangular \((-1,1,0)\) distribution.

e. \(F\) corresponds to the mixture of a \(\mathrm{N}(0,1)\) distribution with a \(\mathrm{N}(2,1)\) distribution. That is, \(F\) has corresponding density \(\frac{1}{2} \phi(x)+\frac{1}{2} \phi(x-2)\).

Step by Step Solution

3.35 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction To Statistical Investigations Questions!