Least Squares Estimate Using a Monte Carlo Method

Using normally distributed errors with a high variance and a simple linear regression model, this Demonstration performs a Monte Carlo study. The frame on the left shows the response variables for a sample from the error distribution on the vertical axis. Joining each response visually captures the high error variance. You can set the sample size () for the exogenous variable, but these stay fixed for each drawing of the error term. So on the horizontal axis you can see the sample size () of the exogenous variable, which is shown as a number () of fixed 's.
In the frame on the right, an estimate is made of the true slope and intercept for each repeated random sample. It is well-known that the covariance between intercept and slope estimates is negative. In this frame, you can observe this well-known relationship by observing the general motion of the "blue dot" as you vary the sample size and repeated random samples.

 
Powered by Wolfram Mathematica
Give us your feedback
Give us your feedback

Source page:




 often  occasionally  never

Note: Please do not include anything you consider confidential or proprietary. Your message and contact information may be shared with the author of any specific Demonstration for which you give feedback, but will not otherwise be published or distributed.
Privacy Policy »

Note: To run this Demonstration you need the free
Mathematica Player
or Mathematica 7+
Download or upgrade to Mathematica Player 7
I already have Mathematica Player or Mathematica 7+