1 / 26

Chapter 11 Randomness

Chapter 11 Randomness. Randomness. Random outcomes Tossing coins Rolling dice Spinning spinners They must be fair. Randomness. Random outcomes Tossing coins Rolling dice Spinning spinners They must be fair Nobody can guess the outcome before it happens. Randomness. Random outcomes

dhallmark
Télécharger la présentation

Chapter 11 Randomness

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 11 Randomness

  2. Randomness • Random outcomes • Tossing coins • Rolling dice • Spinning spinners • They must be fair

  3. Randomness • Random outcomes • Tossing coins • Rolling dice • Spinning spinners • They must be fair • Nobody can guess the outcome before it happens

  4. Randomness • Random outcomes • Tossing coins • Rolling dice • Spinning spinners • They must be fair • Nobody can guess the outcome before it happens • Usually some underlying set of outcomes will be equally likely

  5. 1 2 3 4

  6. Result

  7. Result It is not easy to be random!

  8. It’s Not Easy Being Random • Computers have become a popular way to generate random numbers. • Even though they often do much better than humans, computers can’t generate truly random numbers either. • Since computers follow programs, the “random” numbers we get from computers are really pseudorandom. • Fortunately, pseudorandom values are good enough for most purposes.

  9. Example • A cereal manufacturer puts pictures of famous athletes on cards in boxes of cereal in the hope of boosting sales • 20% of the boxes contain a picture of Tiger woods • 30% for Lance Armstrong • 50% for Serena Williams • Get a lottery ticket when all three pictures are collected

  10. How many boxes do we need to buy? • If you are lucky, • If you are very unlucky,

  11. How many boxes do we need to buy? • If you are lucky, three boxes • If you are very unlucky, infinitely many

  12. How many boxes do we need to buy? • If you are lucky, three boxes • If you are very unlucky, infinitely many • But on average, how many? • Go ahead and buy, then count (too costly) • A cheaper solution • Use a random model • Assume that pictures are randomly placed in the boxes • Assume that the boxes are randomly distributed to stores

  13. Practical Randomness • We need an imitation of a real process so we can manipulate and control it. • In short, we are going to simulate reality.

  14. Then what? • Use the model to generate random values • Simulate the outcomes to see what happens • We call each time we obtain a simulated answer to our question a trial • How do we generate the outcomes at random?

  15. Random numbers • How to generate random numbers? • Computer software • Pseudorandom numbers • Computers follow programs! • The sequence of pseudorandom numbers eventually repeat itself • But virtually indistinguishable from truly random numbers • Books of random numbers • Not an interesting book, perhaps 

  16. How do we get random integers in TI-83? • MATH PRB • 5:randInt( • randInt(left,right, #) • This allows repetition of the same integer • randInt (0,9,100) produces 100 random digits • randInt (0,57,3) produces three random integers between 0 and 57 • Remark: The textbook’s comments are wrong. Using this function, you can possibly get (14, 41, 14), which is not suitable for the dorm room example.

  17. Back to cereal boxes • How to model the outcome? • 20%, Woods (0,1) • 30% Armstrong (2,3,4) • 50% Williams (5,6,7,8,9) • 0 to 9 are equally likely to occur • How to simulate the trial? • Open cereal boxes till we have one of each picture • Opening one box is the basic building block, called a component of our simulation. • For example, ‘29240’ corresponds to the following outcomes:

  18. Back to cereal boxes • How to model the outcome? • 20%, Woods (0,1) • 30% Armstrong (2,3,4) • 50% Williams (5,6,7,8,9) • 0 to 9 are equally likely to occur • How to simulate the trial? • Open cereal boxes till we have one of each picture • Opening one box is the basic building block, called a component of our simulation. • For example, ‘29240’ corresponds to the following outcomes: Armstrong, Williams, Armstrong, Armstrong, Woods

  19. Cereal (continue) • Response variable • What we are interested in • How many boxes it takes to get all three pictures • Length of the trial • ‘29240’ corresponds to 5 boxes • Run more trials • 89064: 5 boxes • 2730: 4 boxes • 8645681: 7 boxes • 41219: 5 boxes • 822665388587328580: 18 boxes • How many boxes do we expect to buy? • Take an average • Based on the first 5 trials: the average is 7.8 boxes • To get an objective estimate: run infinitely many trials

  20. Cautions • Simulation is different from the reality because • Model may not be 100% precise • Only limited number of trials • Run enough trials before you draw conclusions

  21. Simulation Steps • Identify the component to be repeated. • Explain how you will model the component’s outcome. • State clearly what the response variable is. • Explain how you will combine the components into a trial to model the response variable. • Run many trials. • Collect and summarize the results of all the trials. • State your conclusion.

  22. Lottery for a dorm room • 57 students participated in a lottery for a particularly desirable dorm room • A triple with a fireplace and private bath in the tower • 20 participants were members of the same varsity team • When all three winners were members of the team, the other students cried foul

  23. Is it really a foul? • Whether an all-team outcome could reasonably be expected to happen if every one is equally likely to be selected? • Simulation • Component: selection of a student • 00-56: one number for one student • 00-19: 20 varsity applicants • 20-56: the other 37 applicants • Trial: randomly select three numbers from 00-56 • Note we can’t put the same person in the room twice • If selecting the second person, the first selected person should be excluded from the lottery • Response variable: ‘all varsity’ or not • Draw conclusions by counting how often ‘all varsity’ occurs • The textbook gives 10% (only 10 trials) • If doing infinitely many trials, it should be 3.896104%

  24. What Can Go Wrong? • Don’t overstate your case. • Beware of confusing what really happens with what a simulation suggests might happen. • Model outcome chances accurately. • A common mistake in constructing a simulation is to adopt a strategy that may appear to produce the right kind of results. • Run enough trials. • Simulation is cheap and fairly easy to do.

More Related