Calculate probabilities using Monte-Carlo simulation

Problem

Use Monte-Carlo simulations to approximate \(χ_{0.05,4}^2\) in Eviews

  1. Create a new empty workfile with 1000 observations
  2. Simulate 1000 random numbers from \(χ_{0.05,4}^2\) (use @rchisq(4))
  3. Estimate \(χ_{0.05,4}^2\) . Hint: If you have named your random numbers s then ”Sort s” is useful. To pick out an element of s at position p, use “scalar cv = s(p)”

Solution

95% of 1000 is 950. That is, 5% of the random numbers are greater than 9.454. This is our estimate of \(χ_{0.05,4}^2\) . The correct critical value is 9.4877.