Confidence vs. Credible Intervals

A Frequentist confidence interval and a Bayesian credible interval are different, even though in practice they can specify almost the same numerical interval. The example below shows both intervals for a beta-binomial coin-flipping example in which the data is specified by the no. heads/no. flips dropdown and the shape parameters of the Beta prior are specified by the shape 1 dropdown and shape 2 dropdown. The x-axis represents the value of theta, the probability that the coin produces a head on any given flip. The vertical dotted line is the MLE (maximum likelihood estimate) of theta, which is just the number of heads divided by the number of flips.

With the confidence radio button selected, drag the mouse left or right to see how the (lavender shaded) confidence interval is defined based on the consequences of assuming particular values of theta (thin vertical line). The bounds of the confidence interval correspond to the 2.5% tail regions of the distribution of estimated theta values.

With the credible radio button selected, drag the mouse down and up to find HPD (highest posterior density) credible intervals and adjust shape parameters to see the effects of the prior. The 95% credible interval represents the interval that captures 95% of the posterior distribution such that the density of any value inside the interval is higher than the density of any value outside the interval.