Excel Data: Random number generation. The use of simulations and simulation tech
ID: 3062522 • Letter: E
Question
Excel Data:
Random number generation. The use of simulations and simulation techniques can be very important in research fields as diverse as astrophysics to economics. All effective simulation techniques begin with the generation of “good” random numbers. What would be needed for a good random number generator? One important characteristic is that the outputs of a random number generator should follow a uniform distribution—i.e. there should be no range of numbers “more likely” to be generated than others. Another characteristic of true randomness is that each number should be independent of the others (For example, if my random number generates a “3” that outcome should have no impact on the next number generated, another 3 should be as likely as all other outcomes.)
While in graduate school I took a class from a statistician who had developed his own random number generator. He was so serious about the issue that he made me re-write a simulation-based research paper I had written because he didn’t believe the default random number generator I used in the software (GAUSS) was “random enough.” For this question you are going to use a Goodness of Fit test to test whether the random number generator in EXCEL creates numbers that truly follow a uniform distribution. For this question you will use the random numbers I generated in EXCEL in the worksheet marked “uniform.” n = 50 in this sample.
(a) Please conduct a four-step Chi-square goodness of fit test, = 0.04, for:
Ho: population has a uniform distribution [0, 10].
To construct your test please use k = 5 intervals, 0-2, 2-4 and so on. Please fill in the table below to help set-up your test: (Hint: I would sort the data in EXCEL to help count your observed values)
Interval
Expected
Observed
0-2
2-4
4-6
6-8
8-10
(b) Discuss what a Type I and Type II Error would be for this hypothesis test.
(c) Say you work for NASA and are interested in using random numbers for an important simulation and are therefore testing the “randomness” of a particular random number generator, do the errors you described in (b) seem to follow the general guidelines that a Type I Error is more serious than a Type II Error? Explain. (Note that you cannot “reverse” the Ho and Ha here because there is not one specific distribution in the Ha specified that could generate an “under the null” analysis.)
U1 0.681478317 6.618854335 0.032044435 5.602893155 7.996154668 8.886684774 0.848414563 9.533066805 9.35544908 8.507950072 1.453901791 7.608874783 0.547807245 3.375347148 7.394634846 0.521866512 2.51350444 6.631977294 6.355174413 8.875392926 7.471846675 4.534134953 5.821405683 6.446424757 0.383312479 8.318124943 8.731040376 9.486373486 2.305978576 0.381481368 6.174810022 4.86404004 7.206946013 0.097964415 1.210974456 4.873195593 8.794824061 9.567247536 2.857142857 1.511581774 8.935514389 4.623859371 4.31714835 8.042542802 4.209112827 1.410870693 4.511246071 0.657979064 2.177190466 3.830988495Explanation / Answer
a)
Interval
Expected
Observed
(expected-observed)^2/expected
0-2
=0.2*50=10
=COUNTIF(A1:A50,"<2")=13
0.9
2-4
=0.2*50=10
=COUNTIF(A1:A50,"<2")-H2 =6
1.6
4-6
=0.2*50=10
=COUNTIF(A1:A50,"<2")-H2-H3=9
0.1
6-8
=0.2*50=10
=COUNTIF(A1:A50,"<2")-H2-H3-H4=10
0
8-10
=0.2*50=10
=COUNTIF(A1:A50,"<2")-H2-H3-H4-H5=12
0.4
TOTAL
50
50
3
Critical value
10.02552
Since calculated chi-square statistic = 3 < critical value,we accept the null hypothesis and conclude that the population has significant uniform distribution.
b)Type I error is the probability when we reject the null hypothesis when it is true and Type II error is the probability when we accept the null hypothesis when it is false.
c)Type II error is more serious since if we accept the false null hypothesis, many more important simulations or calculations may go wrong.
Interval
Expected
Observed
(expected-observed)^2/expected
0-2
=0.2*50=10
=COUNTIF(A1:A50,"<2")=13
0.9
2-4
=0.2*50=10
=COUNTIF(A1:A50,"<2")-H2 =6
1.6
4-6
=0.2*50=10
=COUNTIF(A1:A50,"<2")-H2-H3=9
0.1
6-8
=0.2*50=10
=COUNTIF(A1:A50,"<2")-H2-H3-H4=10
0
8-10
=0.2*50=10
=COUNTIF(A1:A50,"<2")-H2-H3-H4-H5=12
0.4
TOTAL
50
50
3
Critical value
10.02552
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.