Week04-Lecture (20100914)

# Week04-Lecture (20100914) - Simulation Modeling and...

This preview shows pages 1–7. Sign up to view the full content.

1 Simulation Modeling and Analysis (ORIE 4580/5580/5581) Week 4: Generating Samples of Uniformly Distributed Random Variables (09/14/10 - 09/16/10)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Announcement and Agenda HW 3 is available on Blackboard and will be due by 11am on 9/23. For ORIE 5581 Students ONLY: There will be a mid-midterm at 7:30pm on Thursday, September 30 at Rhodes 471. Sample mid-midterm will be given on 9/23. Quiz Generating samples of uniformly distributed random variables 2
Motivation Performing Monte Carlo or Discrete Event simulation requires generating events having certain random characteristics. Capacity Allocation Game Example: We might need to generate samples of demands having binomial distribution. Simplest and Most Fundamental Question: How do we simulate a number that is uniformly distributed over the interval [0,1]? Basis for all randomness in simulations In theory, we can transform a Uniform[0,1] RV into a random variable with any arbitrary distribution. Why should you care? Just use RAND() command in Excel? RAND() in earlier versions of Excel sometimes produces unacceptably short cycles. Need to be careful! Terminology: For the remainder of this lecture, we will refer to samples from the uniform distribution over [0,1] as “random numbers”. 3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Physical Methods Earliest approach for generating random numbers were manual Earlier Example: throwing dice, tossing a coin, drawing number from an urn, or picking cards from a deck. Later Examples: Use objects that “appear” to behave randomly such as digits in the phone book, digits in the expansion of π , or reading the milliseconds from your computer clock. Advantages: If the physical device is indeed random, then we obtain a sequence of “true” random numbers! Drawbacks of Physical Methods: Slow Expensive (need to store these numbers before simulation study) Bias: construction defect associated with the physical device Cannot replicate the random input sequence 4
Mathematical Algorithms Virtually all computer simulations today use mathematical algorithms to generate the required random numbers. Mid-Square Method: An example of a mathematical algorithm for generating random numbers proposed by von Neumann: STEP 1: Start with a k-digit integer STEP 2: Square the integer. If necessary, pad 0’s to the left of the number so that the result is a (2k)-digit integer STEP 3: Extract the middle k digits and return to STEP 2 Example: Suppose we start with 8234. Then, we have the following sequence of “random” integers: 8234 × 8234 = 67(7987)56 7987 × 7987 = 63(7921)69 7921 × 7921 = 62(7422)41 7422 × 7422 = 55(0860)84 5 To obtain a random number, we divide the elements in the sequence by 10000

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Criticism: Pros and Cons of Math Alg for RNG Pros: Speed and replication Cons: The random numbers generated are NOT random at all!
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern