We have discussed determination of probabilities of events by enumeration and tree diagrams. These are useful for some small problems but are very limited. For example, the probability of opening with a pair in 5 card poker is impossible to obtain by these methods. We could turn to the theory of probability but that would involve higher mathematics. Fortunately, with ever increasing speed of computers we have another way, resampling . Using resampling we can estimate the probability of the event and, further, we can increase the accuracy of the estimation by simply increasing the number of resamples.
Another advantage of resampling is that you have to build a model to accomplish it and you can only build a correct model if you understand the problem. There are basically 4 steps to resampling. We outline the steps in general and then give several examples.
Let A be the event of interest.
Lets do 30 repetitions of this experiment. We will use the table of random numbers. To make sure we are all on the same wavelength, I will use numbers in the first column, starting at the top. Remember to skip
the digits 0, 7, 8, and 9.
Here are 30 trials:
5 5 1 4 3 2 6 2 2 2 4 1 6 1 6 3 6 3 6 5 6 3 4 1 4 2 6 2 1 4Notice that a 1 or 2 came up 11 times. Hence our estimate of the probability of a 1 or 2 is 11/30 = .3667. Close to the true value.
Hey, we are on a roll! Lets try the urn problem of the previous chapter. Tough problem, but here is a resampling model:
59, 58, 12; 02, 41, 30; 29, 60, 20; 01, 21, 04; 07, 24, 06; 42, 15, 65; 19, 09, 06 ; 66, 38, 63; 31, 61, 55; 63, 73, 30; 47, 15, 49; 25, 62, 29; 75, 18, 48; 60, 53, 25; 29, 53, 21.Lets turn them into colored balls:
R, R, B; B, R, B; B, R, B; B, B, B; B, B, B; R, B, R; B, B, B ; R, R, R; R, R, R; R, R, B; R, B, R; B, R, B; R, B, R; R, R, B; B, R, B.
So our estimate of the probability that all the balls are of the same color is: 5/15.
What's the error here? In the next two chapters, we will consider this in some detail. But for now, lets just state the error as follows. Denote our estimate of the probability of interest by
. It is read "p hat". Then our error of estimation is
Notice that the error decreases proportionally by
;
hence, the more repetitions the smaller the error. For the urn problem,
and the error is 0.2434262. Notice that the interval
traps the true probability of .2880. This error is huge, because N is so small. Alas, I got very bored doing 15 repetitions of this experiment. But guess what? Yep, you got it. The computer will not get bored doing 10,000 reps. In which case the error is about 0.0091. (I used the correct value .2880 for this calculation. In practice, use the estimate
).
Using the random number table, model this problem. (Hint: Use 0,1 for first pair; 2,3 for second pair; etc. Now the length of the trial is 2 (that's all she grabs
and remember it's sampling without replacement).
Next resample 10 trials of your model. For each trial record success (got a matched pair) or failure (did not get a matched pair). Obtain
your estimate
of the desired probability. Calculate the error of estimation.
Next resample 10 trials of your model. For each trial record the extra sleep John got (for example, suppose the trial is 4, 6 ,9. Then John slept for an extra
20 minutes which is a success for the event we want). Obtain
your estimate of the desired probability. Calculate the error of estimation.
Using the random number table, model this problem.
Next resample 10 trials of your model. For each trial record the success or failure for each of (a), (b),
and (c). Obtain
your estimate of the desired probability for each event. Calculate the error of estimation.
Using the random number table, model this problem.
Next resample 10 trials of your model. For each trial record the success or failure for the desired event.
Obtain
your estimate of the desired probability. Calculate the error of estimation.
Using the random number table, model this problem.
Next resample 10 trials of your model. For each trial record the success or failure for the desired event.
Obtain
your estimate of the desired probability. Calculate the error of estimation.