Computer Generated Random Numbers: difficulty 4

Mark Yourself Question

  1. Grab a piece of paper and try this problem yourself.
  2. When you're done, check the "I have answered this question" box below.
  3. View the solution and report whether you got it right or wrong.

Part A. A student generates 10001000 pseudorandom values on [0,1)[0,1) and bins them into ten equal-width intervals. For the chi-square inference, assume the draws are independent and uniform under the null hypothesis. The observed counts, in order, are

104, 88, 97, 113, 95, 106, 91, 102, 99, 105.

Part B. The same student needs integers from 1 to 7. For Part B, assume each call to their generator gives an independent uniform integer from 0 to 99 inclusive. They compute the outcome as (x mod 7)+1(x \bmod 7) + 1.

Answer all five parts.

  1. State the expected count per bin under uniformity, and compute the chi-square goodness-of-fit statistic. Give it to two decimal places, with its degrees of freedom.
  2. The upper 5% critical value of the chi-square distribution with those degrees of freedom is 16.92. State the conclusion, phrased precisely.
  3. Name one dependence pattern that bin counts alone cannot diagnose, and say how you would look for it instead.
  4. For the scheme in Part B, compute the probability of each possible outcome and state by what factor the most likely outcome exceeds the least likely. Give probabilities exactly and the factor to four decimal places.
  5. Give a correct method for obtaining integers 1 to 7 from this generator, and show that it removes the bias.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Computer Generated Random Numbers Questions: