Simulation
Simulation Simulation imitation of chance behavior based on a model that accurately reflects the phenomenon under consideration By observing simulated outcomes, researchers gain insight on the real world.
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.
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 below: 1. State the problem or describe the random phenomenon. 2. State the assumptions. 3. Assign digits to represent outcomes (die, spinner, random digit table, calc.) 4. Simulate many repetitions (until outcome shows stable pattern) 5. State your conclusions.
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.
Solution Use five steps required to produce a useful Simulation: 1. Problem: –Estimate the likelihood that the player will hit 2 home runs in consecutive at bats 2. State Assumptions: –at bats are independent of each other (that is, what happens during one at bat does not influence the next at bat) –Homerun occurs 10% of at bats 3. Assign Digits: –two possible outcomes: home run or no home run –“2” represents a home run and other digits represent no home run –“22” represents back to back home runs –Any other two digit combination represents failure to hit back to back homeruns 4. Simulate Many Repetitions: –Stat Trek’s random digit generator was utilized for this example –In this example, the list of random numbers consists of digit pairs 5. State Conclusions –In the list, we found 6 occurrences of "22", which are highlighted in red in the table
Random Numbers
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 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.
Orders of frozen yogurt flavors have the following relative frequencies: 38% chocolate, 42% vanilla, 20% strawberry. 1. State problem. –Simulate 10 frozen yogurt sales based on this recent history. 2. State assumptions. –Frequencies are the same as stated –Assume that customers order one flavor only –Customers’ choices of flavors do not influence one another 3. Assign digits. –00-37 chocolate –38-79 vanilla –80-99 strawberry 4. Simulate. 5. State your conclusions.
Simulate: Use Calculator to simulate –Results: Run 20 numbers State Conclusions: –Chocolate: –Vanilla: –Strawberry:
A couple plans to have children until they have a girl or until they have four children, whichever comes first. Problem: –Simulate and estimate probability that the strategy will produce girl Assumptions: –Probability of obtaining girl.5 and boy.5 –Sexes of successive children independent Assign Digits (or flip coin): –0, 1, 2, 3, 4 = girl –5, 6, 7, 8, 9 = boy Simulate using line 130 of table B: Conclusions:
Homework 6.1-4, 8-9, 12