Electrical Engineering > Quiz > ESE503 - University of Pennsylvania _ Simulation Modeling & Analysis (Homework #8) _ Spring Semester (All)
ESE503 - Introduction to Simulation (Homework #8) Spring Semester, 2022 Problem #1 (20 points) - Is This a Good Idea? Suppose you have a random number generator that generates two-digit random n... umbers at a speed of one million per second, and suppose that this generator produces a sample of random numbers that pass the chi-squared test with the ten classes 0.00,0.10,0.10,0.20,0.20,0.30,… ,0.90,1.00 and level of significance . A student proposes that the speed of this scheme can be doubled in the following way. Whenever the two-digit number 0.ab is generated then include the two-digit number 0.ba as well and if a b, then the number 0.ab 0.ba is to be included twice. The student claims that as long as the original set of random numbers passes the chi-squared described above so will the new set having double the amount of numbers. Is this claim valid? Explain. Problem #2 (20 points) - Let’s Speed Things Up In some applications, it is useful to be able to quickly skip ahead in a pseudo-random number sequence without actually generating all of the intermediate values. a.) (6 points) For a linear congruential generator with c 0, prove that Xin anXimodm. Hint: Here you may use the fact that x ymodm xmodm ymodm and if u vmodm, then u v km for some integer k. b.) (8 points) Next, prove that anXimodm an modmXimodm. This result is useful because an modm can be precomputed, making it easy to skip ahead n random numbers from any point in the sequence. c.) (6 points) Assuming Xi1 19Ximod100 and X0 63 compute X5 by first computing X1, X2, X3, and X4, and then compute X5 using the result in part (b) to see that they are equal. Problem #3 (20 points) - Is It Random Or Not? A student purposes the following scheme for generating a sequence of two-digit random numbers from 00 to 99. 1.) Flip a fair coin 7 times and record the resulting ordered sequence of 1’s (heads) and 0’s (tails). 2.) Use this ordered sequence of seven numbers to generate a single number via base two representation. 3a.) If this number is less that 100, record this as R. 3b.) If the number generated in step (2) is 100 or larger, discard it and return to step (1). 4.) Continue until the desired number of random numbers is formed. For example, if a given set of 7 flips leads to this will generate the number and so R 49. On the other hand if a given set of 7 flips leads to this will generate the number and we discard the result and construct 7 more flips. Determine whether the student’s claim that the resulting sequence will be random is valid or not. ——————————————————————————————————————— Problem #4 (20 points) - Is It Random or Not? Consider a generator of random numbers of the form Rn sin2n for n 1,2,… . Generate the sequence R1,R2,R3,… ,RN up to N 100, and test this sequence for uniformity using the Kolmogorov-Smirnov and chi-squared frequency tests. Assume a significance level of 0.05. Assume the ten equally-spaced intervals 0.00,0.10 , 0.10,0.20 , 0.20,0.30 , … , 0.90,1.00. in the chi-squared frequency test. ————————————————— [Show More]
Last updated: 2 years ago
Preview 1 out of 8 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Apr 12, 2023
Number of pages
8
Written in
This document has been written for:
Uploaded
Apr 12, 2023
Downloads
0
Views
58
In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·