Beta-Binomial Experiment

In the beta-binomial experiment, a random probability \( P \) has a beta distribution with left parameter \( a \) and right parameter \( b \). Given \( P = p \), we conduct \( n \) Bernoulli trials with success probability \( p \). Random variable \( Y \) is the number of successes, and has the beta-binomial distribution with parameters \( n \), \( a \), and \( b \). The outcomes of the trials are shown in the timeline graph (red for success and green for failure). Random variable \( M = Y / n \) is the proportion of successes and random variable \( Z = (a + Y) / (a + b + n) \) is the Bayesian estimator of the success parameter \( p \) when \( p \) is modeled by \( P \). As a function of \( n \), it is a martingale. The variables \(P\), \(Y\), \(M\), and \(Z\) are recorded in the data table. The distribution of \(P\) is described in the first distribution graph, and the distribution of \(Y\) is described in the second distribution graph and in the distribution table. The parameters \( n \), \( a \), and \( b \) can be varied with input controls.