SOCR EduMaterials Activities BallotExperiment
Ballot Experiment
- Description:
The ballot experiment involves candidate A receiving a votes and candidate B receiving b votes. Assuming randomly ordered votes, a must be greater than b. The event of interest is for A to be equal to or greater than B in the vote count. Graphically, the first diagram will illustrate the difference between the number of votes between A and B during the trials, thus it is always above the horizontal axis, except at the origin. The indicator variable I of every event is recorded on the left most table of the experiment. In the distribution graph, the probability density function of I is shown, as well as its recording in the distribution table on the right. The empirical density of I is illustrated in the second graph as red on each update and recorded in the second table.
- Goals:
To provide an insightful method for probability between two distinct events (e.g. A/B, weekday/weekend, chocolate/vanilla, etc.) and create a general perception about presumption and chance.
- Experiment:
Go to the SOCR Experiments [[1]] and select the Ballot Experiment from the drop-down list of experiments on the top left. The image below shows the initial view of this experiment:
[[2]]
Parameters a and b can be modified by adjusting the two scrolls on top of the graphs, where W represents the number of trials won, and L represents the number of trials lost. Above the scrolls are two categories. The left denotes the number of trials that are to be executed when pressing the fast-forward symbol and the right denotes the number of trials to be carried out within an experiment. When pressing the play button, the experiment will run exactly one trial. The outcome is then displayed in the tables below, where 1 symbolizes success and 0 as failure. Selecting the fast-forward button will automatically update the experiment every 1, 10, 100, or 1000 trial as selected by the experimenter. It will then stop once it has reached 10, 100, 1000, or 10000 trials, or continue until the experimenter clicks on the stop symbol. The fourth represents a reset button in which it will clear all data and information of the current experiment. Lastly, the most right button, illustrated with an “I” informs users of the summary and main purpose of the ballot experiment.
When setting the parameter a and b where the distribution table (right) displays the probability outcome of 1 to be greater than 0, the probability density function will also graphically display the settings of the parameter in which 1 will be greater than 0.After many trials, the empirical density of I (red) will eventually ‘match’ the probability density function (blue), as shown in the figure below:
[[3]]
Similarly, when parameters are set in which the probability distribution of 0 is greater than 1, graphically, 0 will also be greater than 1. After many trials, the empirical density will begin to ‘match’ the probability density function.
All the trials are kept in record and it is helpful when executing large numbers of trials with no specified maximum number of runs.
- Applications:
This applet will not only develop a process to predict outcomes of ballots but it also relates to real life experiences. For instance, in order to determine what kinds of materials are suitable to develop a structure in a tropical environment may be analyzed by this applet. The specific material strength for building will either break (failure) or not (success) after every hurricane (trial). The SOCR Ballot Experiment allows us to simulate natural phenomena on the computer.