|
Sections: 1|.Introduction 2| Designing Samples 3| Designing Experiments 4| Simulating Experiments |
Simulating Experiments Toss a coin 10 times. What is the likelihood of a run of 3 or more consecutive heads or tails? A couple plans to have children until they have a girl or until they have four children, whichever comes first. What are the chances that they will have a girl among their children? An airline knows from past experience that a certain percentage of customers who have purchased tickets will not show up to board the airplane. If the airline “overbooks” a particular flight (i.e., sells more tickets than they have seats), what are the chances that the airline will encounter more ticketed passengers than they have seats for? There are three methods we can use to answer questions involving chance like these: Try to estimate the likelihood of a result of interest by actually carrying out the experiment many times and calculating the result’s relative frequency. That’s slow, sometimes costly, and often impractical or logistically difficult. 2. Develop a probability model and use it to calculate a theoretical answer. This requires that we know something about the rules of probability and therefore may not be feasible. (We will develop a probability model in the next unit.)3. Start with a model that, in some fashion, reflects the truth about the experiment, and then develop a procedure for imitating—or simulating—a number of repetitions of the experiment. This is quicker than repeating the real experiment, especially if we can use the TI-83/89 or a computer, and it allows us to do problems that are hard when done with formal mathematical analysis.Here is an example of a simulation. A GIRL IN THE FAMILY
SIMULATION simulation. Simulation is an effective tool for finding likelihoods of complex results once we have a trustworthy model. In particular, we can use random digits from a table, graphing calculator, or computer software to simulate many repetitions quickly. The proportion of repetitions on which a result occurs will eventually be close to its true likelihood, so simulation can give good estimates of probabilities. The art of random digit simulation can be illustrated by a series of examples. Example:
Once you have gained some experience in simulation, establishing a correspondence between random numbers and outcomes in the experiment is usually the hardest part, and must be done carefully. Although coin tossing may not fascinate you, the model in the example above is typical of many probability problems because it consists of independent trials (the tosses) all having the same possible outcomes and probabilities. The coin tosses are said to be independent because the result of one toss has no effect or influence over the next coin toss. Shooting 10 free throws and observing the sexes of 10 children have similar models and are simulated in much the same way. The idea is to state the basic structure of the random phenomenon and then use simulation to move from this model to the probabilities of more complicated events. The model is based on opinion and past experience. If it does not correctly describe the random phenomenon, the probabilities derived from it by simulation will also be incorrect. Step 3 (assigning digits) can usually be done in several different ways, but some assignments are more efficient than others. Here are some examples of this step.Example:
As the last example shows, simulation methods work just as easily when outcomes are not equally likely. Consider the following slightly more complicated example. Example: FROZEN YOGURT SALES Orders of frozen yogurt flavors (based on sales) have the following relative frequencies: 38% chocolate, 42% vanilla, and 20% strawberry. The experiment consists of customers entering the store and ordering yogurt. The task is to simulate 10 frozen yogurt sales based on this recent history. Instead of considering the random number table to be made up of single digits, we now consider it to be made up of pairs of digits. This is because the relative frequencies of interest have a maximum of two significant digits. The range of the pairs of digits is 00 to 99, and since all the pairs are equally likely to occur, the pairs 00, 01, 02, . . . , 99 all have relative frequency 0.01.Thus we may assign the numbers in the random number table as follows: 00 to 37 to correspond to the outcome chocolate (C) • 38 to 79 to correspond to the outcome vanilla (V) • 80 to 99 to correspond to the outcome strawberry (S)The sequence of random numbers (starting at row 36 the Random Number Table) is as follows: 24028 03405 01178 06316 This yields the following two-digit numbers: 24 02 80 34 05 01 17 80 63 16 which correspond to the outcomes C C S C C C C S V C This small sample is not representative of the population. More trials would be needed to simulate the population distribution.
Example: A GIRL OR FOUR A couple plans to have children until they have a girl or until they have four children, whichever comes first. We will show how to use random digits to estimate the likelihood that they will have a girl. The model is the same as for coin tossing. We will assume that each child has probability 0.5 of being a girl and 0.5 of being a boy, and the sexes of successive children are independent. Assigning digits is also easy. One digit simulates the sex of one child: 0, 1, 2, 3, 4 = girl 5, 6, 7, 8, 9 = boy To simulate one repetition of this child-bearing strategy, read digits from the Random Number Table until the couple has either a girl or four children. Notice that the number of digits needed to simulate one repetition depends on how quickly the couple gets a girl. Here is the simulation, using line 38 of Random Number Table. To interpret the digits, G for girl and B for boy are written under them, space separates repetitions, and under each repetition “+” indicates if a girl was born and “–” indicates one was not. 7854 54 92 0 1 0 53 2 91 4 1 82 1 0 971 BBBG BG BG G G G BG G BG G G BG G G BBG + + + + + + + + + + + + + + + 90 4 72 4 4 682 3 93 0 4 1 981 9557 BG G BG G G BBG G BG G G G BBG BBBB + + + + + + + + + + + + – In these 28 repetitions, a girl was born 27 times. Our estimate of the probability that this strategy will produce a girl is therefore estimated probability = 27/28 = .964 Some mathematics shows that if our probability model is correct, the true likelihood of having a girl is 0.938. Our simulated answer was within reason. Unless the couple is unlucky, they will succeed in having a girl.
Simulations with the calculator or computer The calculator and computer can be extremely useful in conducting simulations because they can be easily programmed to quickly perform a large number of repetitions. Review the content of Unit 5 and proceed to the Unit 5 Exam. |