Estimating the density of X_i for the dataset: Spending per high-school student (X_i) and graduation rates (Y_i) for 50 states Table 8.6 p380 in Hollander and Wolfe 1999 Data: 1. 7971 65.5 26. 3998 79.6 2. 7151 62.3 27. 3943 85.4 3. 6564 77.4 28. 3919 69.1 4. 6230 84.9 29. 3858 77.3 5. 5471 74.4 30. 3840 65.9 6. 5329 69.8 31. 3794 76.3 7. 5207 78.7 32. 3786 74.0 8. 5201 74.1 33. 3744 61.1 9. 5051 88.3 34. 3691 71.9 10. 5017 71.7 35. 3623 75.8 11. 4989 78.4 36. 3608 65.3 12. 4789 73.0 37. 3519 88.3 13. 4747 84.9 38. 3434 61.0 14. 4692 73.6 39. 3408 64.6 15. 4462 74.7 40. 3368 66.7 16. 4457 74.1 41. 3249 79.6 17. 4386 90.9 42. 3138 61.4 18. 4369 75.6 43. 3093 71.7 19. 4246 74.4 44. 3068 69.3 20. 4246 87.3 45. 3011 69.0 21. 4164 77.1 46. 2989 77.2 22. 4149 71.6 47. 2718 74.9 23. 4124 85.8 48. 2667 75.4 24. 4092 58.0 49. 2548 66.9 25. 4076 80.2 50. 2454 79.4 X-values (n=50): 2454 2548 2667 2718 2989 3011 3068 3093 3138 3249 3368 3408 3434 3519 3608 3623 3691 3744 3786 3794 3840 3858 3919 3943 3998 4076 4092 4124 4149 4164 4246 4246 4369 4386 4457 4462 4692 4747 4789 4989 5017 5051 5201 5207 5329 5471 6230 6564 7151 7971 Estimating the density f_X(x) for bandwidths: h=10 h=50 h=200 h=500 Approximating Int(0,10000) by Sum(1,10000): Int = Int(0,10000) f(x)dx Intsq = Int(0,10000) f(x)^2 dx Intsqsc is after scaling (0,10000) --> (0,1) h= 10 Int=1.0000 Intsq=0.00074016 Intsqsc=7.4016 h= 50 Int=1.0000 Intsq=0.00035331 Intsqsc=3.5331 h=200 Int=1.0000 Intsq=0.00029768 Intsqsc=2.9768 h=500 Int=1.0000 Intsq=0.00025865 Intsqsc=2.5865