SOCR EduMaterials Activities BallAndRunExperiment
Ball and Urn Experiment
Description
The ball and urn experiment is a general java applet that displays the effects of replacement in an event. With a total of n balls chosen at random from an urn, R are red and (N-R) are green. For every trial, the number (Y) or the proportion (M) of red balls Y that have been selected are recorded numerically in the distribution table (on the right) and graphically in the distribution graph (blue). On each update, the empirical density and moments of Y or M are displayed in the distribution graph as red, and are recorded in the distribution table. The experimenter has the abilities to manipulate trials by choosing with replacement or without replacement in the list box and varying parameters N, R, and n with scroll bars.
Goals
To provide a method for events being randomly chosen without bias and develop a common sense about the behaviors of the variables.
Experiment
Go to the SOCR Experiments and select the Ball and Urn Experiment from the drop-down list of experiments on the top left. The image below shows the initial view of this experiment:
When pressing the play button, one trial will be executed and recorded in the distribution table below. The fast forward button symbolizes the nth number of trials to be executed each time. The stop button ceases any activity and is helpful when the experimenter chooses “continuous,” indicating an infinite number of events. The fourth button will reset the entire experiment, deleting all previous information and data collected. The “update” scroll indicates nth number of trials (1, 10, 100, or 1000) performed when selecting the fast forward button and the “stop” scroll indicates the maximum number of trials in the experiment.
When parameter N is increased, the distribution graph remains normal but is shifted left—the distribution table numerically shows this as well—and when is shifted right when parameter N is decreased. When R is increased, the distribution graph remains normal and is shifted to the right; when R is decreased, the distribution graph is shifted to the left. But when R is set to the extreme boundaries, the distribution graph will eventually take shape of a rectangle. The normality of the distribution graph is dependent upon n as it takes upon a normal shape when n is large and an inaccurate normal shape when n is small.
Every trial is recorded with Y = the number of red balls in the sample, M = the proportion of red balls in the sample, U = estimate of R, and V = estimate of N. In the distribution table, the values of Y range from 0 to n and it indicates the mean value for Y as well as the standard deviation.
Because the ball and urn experiment is a general example of replacement in statistics, it is best to discuss the differences between experimenting with replacement and without replacement.
Sampling without replacement will require more time and trials for the distribution graph to take shape of a normal curve and sampling with replacement does not require as much time and trials because it eventually takes shape of a normal curve.
Applications
The ball and urn experiment is applicable in daily lives.
For instance, at a supermarket, the manager may determine if removing damaged oranges from the produce section will create a better image of the market as customers will randomly select oranges in good condition, or if removing damaged oranges will waste time and effort as customers will continue to randomly select oranges that may either be in good condition or damaged.
The ball and urn java applet may also be applied to situations when one is looking for a penny in the coin bag. Will the probability of randomly selecting a penny be higher when removing coins that are not pennies from the bag, or replacing them back into the bag after every try?
Similarily, a pet owner is trying to fish out a goldfish in his feeding tank of goldfishes and guppies. He is in a rush so he wants to determine if removing the caught guppy would increase his chances of catching the goldfish on the next try. Using this applet may be of some assist to him by demonstrating the effects of runs with or without replacement.
Translate this page: