Objective:
To
develop a procedure for randomly allocating bacteria to a fixed number
of droplets from a total of 100 droplets using a probability experiment
employing the Monte Carlo technique. (For a general description of the
Monte Carlo technique go to the
Elementary
Probability Demo Collection.)
Level: High
school or precalculus, or probability courses for math majors.
Prerequisites:
Basic
probability concepts; knowledge of equally likely chance and the chance
of winning a lottery.
Platform: A
calculator or computer which has a function that
generates random numbers. There is an accompanying JAVA
applet which performs simulations discussed in this demo:
javabacteriasimulation.
Instructor's
Notes:
This demo uses the Monte Carlo technique to simulate
a count of bacteria that are present as a result of a certain sampling
process. The process extracts a fixed number of droplets N from
a sample of contaminated liquid in which bacteria are randomly distributed.
It is observed that (on the average) only a certain percent K of
the droplets contain the bacteria. We want to approximate (on the average)
the number of bacteria that are present in the droplets.
A scientist collects N droplets from a sample
of a liquid containing bacteria. When the scientist studied the droplets,
she found that only K% of the N droplets collected contained
bacteria. This process was repeated a number of times and it was found
that on the average only K% of the droplets were contaminated with
bacteria, but the total number of bacteria from those droplets varied.
To approximate the average number of bacteria contained in the contaminated
droplets of this particular liquid the following simulation was devised.
For experimental purposes set N = 100 and
K
= 50. Imagine that the 100 droplets are arranged in a set of containers
that form a square, 10 containers by 10 containers. Each of the containers
is assigned a number from 1 to 100. (See the numbers in black in the lower
left corner of the containers in Figure 1.) We randomly generate integers
from 1 to 100. When a particular container's number is generated we add
1 "bacteria" to the container. We repeat this process until 50 containers
contain at least one bacteria and we keep a running total of the number
of bacteria that are allocated to the containers. In Figure 1 below we
show a result of this simulation. In this particular experiment 73 bacteria
were needed to have 50 of the 100 droplets contain at least one bacteria.

Figure 1.
By repeating the procedure a large number
of times with N = 100 and K = 50 we can obtain a good estimate
of the average number of bacteria that occur in the 50 droplets.
The MATLAB routine bacteriasim.ZIP (click
to download) implements the strategy outlined above. (Figure 1 and the
animation below were obtained from this routine.) We have also developed a
JAVA applet for this demo which has the
same functionality :
javabacteriasimulation.
(The displays of the applet may vary slightly because of the browser you use
and the screen resolution of your monitor.) We repeated the simulation
10 times and the results are displayed in the following table.

The theoretical solution of this Monte Carlo
process is 69. The average of the 10 experiments reported in the preceding
table is 70.2, a close approximation. We expect the average number
of bacteria in the 50 droplets to approach 69, when a large number of experiments
are performed.
The animation below shows a typical simulation
of the random allocation process for N = 100 and K = 50.

This simulation could be modified to
perform other experiments. The MATLAB routine bacteriasim (cited above) and the
applet
javabacteriasimulation
lets the user specify the number of droplets to contaminate from the 100
collected. Selecting a different number of droplets to contaminate will
alter the (average) number of bacteria expected in those droplets. Table
1 below shows the average number of bacteria needed to contaminate K% of
N = 100 droplets from a set of 10 experiments performed for each value
of K.

The averages for a set of experiments you perform like
those reported in Table1 will vary somewhat. In order to obtained very
accurate estimates of theoretical probabilities involved quite a large
number of experiments should be performed. To see details of the experiments
summarized in Table 1 click on bacdataset.
Credits:
This demo was adapted from
W.E. Haigh, "Using Microcomputers
to Solve Probability Problems", Mathematics Teacher, v78,
No.2, 1985, pp124-126
and portions are reprinted with permission
from Mathematics Teacher, copyright 1985 by the National Council of Teachers
of Mathematics. All rights reserved.
We also appreciate the cooperation of
Professor W.E.
Haigh
Department of Mathematics
Northern State University
in its development.
We also acknowledge contributions by Un
Jung Sin , student at Temple University. The MATLAB routine bacteriasim
was written by David R. Hill. The Java applet was developed by Philip Nicastro
and Michael Shelmet, both students at Temple University.