]> The Beta Coin Experiment

The Beta Coin Experiment

The BetaCoinExperiment applet requires the latest version of the Java plug-in. Please check your browser settings to make sure that Java applets are allowed. Visit the Java site to download and install the latest plug-in.

Description

The random experiment is to toss a coin n times, where the probability of heads is p . The probability of heads is modeled with a prior beta distribution, having left parameter a and right parameter b . The prior probability density function and the true probability of heads are shown in blue in the graph on the right. On each update, the number of heads X is recorded in the data table. On each update, the posterior beta probability density function, which has left parameter a X and right parameter b n X , is shown in red in graph on the right. Also, the Bayesian estimate of p , U a X a b n is recorded in the data table on each update. Finally, the second table gives the true bias and mean square error of U , and on each update gives the empirical bias and mean square error, based on the all of the runs of the experiment. The parameters n , p , a , and b can be varied with scroll bars.