Theory of estimation. Laboratory 4 (due 08/12/2010). 1. Generate 50 observations from a Beta(5,2) distribution. a) Draw a graph of the density function. b) Draw histogram of this data, with the number of bins selected by the Sturges, Scott and and Friedman-Diaconis method. If you are not happy with these selections, choose the number of bins by ``eye’’. Describe the results. c) Draw a nearest neighbor estimate of this density. Try several choices of k and point at the one which is the most satisfying. Describe the results. d) Draw a kernel density estimator based on this data. Use all possible methods for the choice of bandwidth. If none of them is satisfying, choose the bandwidth by ``eye’’. Compare the results. e) Use the local polynomial of degree 2 to estimate the density. Try several choices of bandwidth and choose the best by ``eye’’. f) Estimate the density by the orthogonal series expansion based on trigonometric functions and Legendre polynomials. Try several different choices of K and choose the best by ``eye’’. g) Estimate the density by a ``universal’’ orthogonal series expansion. h) Briefly summarize the results. i) Repeat this execise two times, using only the ``best’’ smoothing parameters, selected before. Compare the resulting density estimators with the true density. 2. Repeat this exercise for observations generated from a following distribution: 0.3 x Beta (2,5) + 0.7 x Beta (8,2). 3. Estimate the density for the salaries of men and women based on the data contained in the file dane1. Try several different estimators (histograms, kernels, nearest neighbor, orthogonal series). Which one is the most satisfactory ?