]>
The ballot experiment concerns an election in which candidate receives votes and candidate receives votes, where . The votes are assumed to be randomly ordered. The first graph shows the difference between the number of votes for and the number of votes for , as the votes are counted. This process is a random walk in which the initial and terminal points are fixed.
The event of interest is that is always ahead of in the vote count, or equivalently, that the graph is always above the horizontal axis (except of course at the origin). The indicator variable of this event is recorded in the first table on each update. The probability density function of is shown in blue in the distribution graph and is recorded in the distribution table. On each update, the empirical density function of is shown as red in the distribution graph and recorded in the distribution table. The parameters and can be varied with scroll bars.