next up previous
Next: About this document ...

Lab 3: Probability and a Computer Simulation of Drawing Tickets from Boxes

1.
Suppose you have 30 chocolate kisses, 17 of which are silver and 13 of which are red. Consider the (theoretical) situation where you draw one kiss from the bag, and then you draw another one. The important ideas in this situation are that: (i) you do not replace the first kiss before you draw the second one, and (ii) you draw each time from the bag in such a way that every kiss in the bag is equally likely to be selected (the idea of a random sample). In questions a-c and e-g, you will be asked to calculate probabilities associated with outcomes of this theoretical situation, and in questions d and h you will be asked to verify these probabilities experimentally.

2.
For the second part of this lab, we are going to use Systat to simulate the results of the following experiment:

Experiment: Suppose that a box contains 4 tickets. These 4 tickets have the numbers 1, 3, 3, and 9 written on them. Our experiment is to draw a ticket from the box, record the result, and then replace the ticket (we assume that each of the 4 tickets is equally likely to be drawn). Then we draw another ticket from the box, record the result, replace that ticket, and so on. We continue until we have done this 100 times. Then we let Y be the sum of the 100 numbers which we recorded. We want to ask what is P(370<Y<430)?

Simulation: Observe that the probability that we draw any of the 4 tickets from the box on any given draw is 1/4, since we have assumed that each of the tickets is equally likely to be drawn. We will generate 100 U(0,1) random numbers. We will say that we have drawn the ticket labelled ``1'' for all the random numbers which are less than or equal to 0.25. We will say that we have drawn a ``3'' for all the random numbers which are greater than 0.25 and less than or equal to0.5. We will also say that we have drawn a ``3'' for all the random numbers which are greater than 0.5 and less than or equal to 0.75. And lastly, we will say that we have drawn a ``9'' for all the random numbers which are greater than 0.75 and less than or equal to 1. Then we will add up these simulated draws to get one simulated value of Y.

We will repeat this many times so that when we are through, we will have generated many simulated values of Y. Once we are done generating these simulated values of Y, we will find the proportion of the number of Y's which fall in the interval (370,430). This will be our simulated estimate for P(370<Y<430). You will see in class that the true probability is approximately 0.6826.

We now proceed to the simulation. Please follow the instructions carefully.



 
next up previous
Next: About this document ...
Dennis Cox
2/9/1998