Download presentation
Presentation is loading. Please wait.
Published byAlvin Nicholson Modified over 8 years ago
1
Simulation
2
Simulation is a way to model random events, such that simulated outcomes closely match real-world outcomes. By observing simulated outcomes, researchers gain insight on the real world.
3
Simulation Why use simulation? Some situations do not lend themselves to precise mathematical treatment. Others may be difficult, time-consuming, or expensive to analyze. In these situations, simulation may approximate real-world results; yet, require less time, effort, and/or money than other approaches.
4
How to Conduct a Simulation A simulation is useful only if it closely mirrors real- world outcomes. The steps required to produce a useful simulation are presented below. 1.Describe the possible outcomes. 2.Link each outcome to one or more random numbers. 3.Choose a source of random numbers.
5
4. Choose a random number. 5. Based on the random number, note the "simulated" outcome. 6. Repeat steps 4 and 5 multiple times; preferably, until the outcomes show a stable pattern. 7. Analyze the simulated outcomes and report results. Note: When it comes to choosing a source of random numbers (Step 3 above), you have many options. Flipping a coin and rolling dice are low-tech but effective. Tables of random numbers (often found in the appendices of statistics texts) are another option. And good random number generators can also be used.
6
Simulation Example In this section, we work through an example to show how to apply simulation methods to probability problems. Problem Description On average, suppose a baseball player hits a home run once in every 10 times at bat. Using simulation, estimate the likelihood that the player will hit 2 home runs in consecutive at bats.
7
Solution Earlier we described seven steps required to produce a useful simulation. Let's apply those steps to this problem. Describe the possible outcomes. For this problem, there are two outcomes - the player hits a home run or he doesn't. Link each outcome to one or more random numbers. Since the player hits a home run in 10% of his at bats, 10% of the random numbers should represent a home run. For this problem, let's say that the digit "2" represents a home run and any other digit represents a different outcome. Choose a source of random numbers. For this problem, we used Stat Trek's Random Number Generator to produce a listRandom Number Generator of 500 two-digit numbers.
8
Choose a random number. The list on the next page shows the random numbers that we generated. Based on the random number, note the "simulated" outcome. Since the digit "2“ represents a home run, the number "22“ represents consecutive home runs. Any other 2-digit number represents a failure to hit consecutive home runs. Repeat steps 4 and 5 multiple times; preferably, until the outcomes show a stable pattern. In this example, the list of random numbers consists of 500 2-digit pairs; i.e., 500 repetitions of steps 4 and 5. Analyze the simulated outcomes and report results. In the list, we found 6 occurences of "22", which are highlighted in red in the table. In this simulation, each occurence of "22“ represents a pair of at bats in which the player hit consecutive home runs.
9
Random Numbers 42 99 02 65 04 14 30 09 70 88 89 85 95 40 53 67 25 50 48 79 86 92 76 24 53 39 08 73 78 17 72 81 08 01 68 94 43 43 95 12 36 90 28 88 34 69 18 69 91 79 14 82 26 94 15 26 19 41 74 02 17 20 38 84 74 30 34 96 09 46 61 41 02 93 94 90 00 71 84 98 30 82 80 11 92 97 81 29 85 44 40 05 83 22 04 86 13 33 00 99 74 75 27 43 68 22 59 20 66 00 24 01 96 84 19 14 57 26 47 58 51 73 06 08 49 52 70 15 79 35 65 28 40 77 93 73 33 24 25 22 32 03 89 03 62 13 85 16 23 28 12 61 16 75 45 37 15 54 36 18 45 64 31 31 06 80 32 75 99 27 91 25 98 05 55 32 27 16 51 45 89 31 78 90 82 05 11 39 80 83 01 20 10 67 97 33 72 09 98 78 39 56 57 54 63 35 21 35 93 18 17 48 55 60 44 92 21 07 77 42 46 86 41 49 76 96 36 62 38 11 64 07 04 58 23 56 29 37 87 37 59 47 83 77 21 63 10 95 87 10 42 71 12 88 06 52 42 99 02 65 04 14 30 09 70 88 89 85 95 40 53 67 25 50 48 79 86 92 76 24 53 39 08 73 78 17 72 81 08 01 68 94 43 43 95 12 36 90 28 88 34 69 18 69 91 79 14 82 26 94 15 26 19 41 74 02 17 20 38 84 74 30 34 96 09 46 61 41 02 93 94 90 00 71 84 98 30 82 80 11 92 97 81 29 85 44 40 05 83 22 04 86 13 33 00 99 74 75 27 43 68 22 59 20 66 00 24 01 96 84 19 14 57 26 47 58 51 73 06 08 49 52 70 15 79 35 65 28 40 77 93 73 33 24 25 22 32 03 89 03 62 13 85 16 23 28 12 61 16 75 45 37 15 54 36 18 45 64 31 31 06 80 32 75 99 27 91 25 98 05 55 32 27 16 51 45 89 31 78 90 82 05 11 39 80 83 01 20 10 67 97 33 72 09 98 78 39 56 57 54 63 35 21 35 93 18 17 48 55 60 44 92 21 07 77 42 46 86 41 49 76 96 36 62 38 11 64 07 04 58 23 56 29 37 87 37 59 47 83 77
10
This simulation predicts that the player will hit consecutive home runs 6 times in 500 at bats. Thus, the simulation suggests that there is a 1.2% chance that a randomly selected pair of at bats would consist of two home runs. The actual probability, based on the multiplication rule, states that there is a 1.0% chance of hitting consecutive home runs.multiplication rule While the simulation is not exact, it is very close. And, if we had generated a list with more random numbers, it likely would have been even closer.
11
On the average, how many girls would you expect in a family of three children? Use the random digit table: 0 3 5 0 9 0 0 1 4 3 3 6 7 4 9 7 7 2 7 1 9 9 6 7 5 8 2 7 6 1 1 9 1 5 9 6 5 4 5 8 0 8 1 5 0 7 2 7 1 0 2 5 6 0 2 7 5 4 4 7
12
0 3 5 0 9 0 0 1 4 3 3 6 7 4 9 7 7 2 7 1 9 9 6 7 5 8 2 7 6 1 1 9 1 5 9 6 5 4 5 8 0 8 1 5 0 7 2 7 1 0 2 5 6 0 2 7 5 4 4 7 Let Odd = Boy Even = Girl 0 = G3 = B5 = B Trial # of Girls
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.