For independent geometric random variables supported on , put . Multiplication of their probability mass functions gives the likelihood functionThere are terminal successes and preceding failures.
The beta distribution prior density is proportional to . By Bayes' theorem, its product with the likelihood function gives the posterior densityThis is again a beta distribution, namelyThus the beta family is a conjugate prior family for the geometric distribution. The update is an instance of beta-geometric conjugacy: counts of observed successes and failures are added to the two beta parameters.
Using the expected value of a beta distribution, the posterior mean isEquivalently, it is the weighted averageof the prior mean and the maximum-likelihood estimate .
For fixed prior parameters, divide numerator and denominator by :under independent sampling from a geometric distribution with true success probability . The law of large numbers gives . In a large finite sample the posterior mean is close to , the maximum-likelihood estimate. The fixed prior's influence vanishes, and the estimate is consistent.
The two colonies with no observed cheaters are right-censored after seven days. Each contributes , not the probability of an event on day seven or eight. The four observed first events contribute four factors of and failures. Including the two censored exposures givesThe beta distribution prior therefore yieldsIts probability density function is proportional to for : it vanishes at both endpoints, is unimodal, and has its mode at . The right panel of the sketch in question 5(b) shows this moderately right-skewed density. The calculation assumes daily observations detect the first event and that stopping the experiment after seven days is independent censoring.
The trace has long, slowly changing stretches, indicating strong autocorrelation and poor exploration of the posterior distribution. The reported effective sample size of a Markov chain is only , so the number of stored draws greatly exaggerates the information in the simulation. The potential scale reduction factor is appreciably above one and does not support convergence between chains. The reported Monte Carlo standard error is also large relative to a posterior mean near .
The exact beta distribution gives posterior mean and standard deviationso the simulation's reported spread is another warning. Do not interpret its mean or interval estimates as reliable yet. Run multiple chains from dispersed starts, improve and tune the proposal or sampler, and use longer runs after adaptation. Recheck the traces, potential scale reduction factor, and effective sample size of a Markov chain. More iterations help only if the chain actually explores its target well; thinning alone does not fix poor mixing.
Direct independent sampling is preferable. The posterior distribution is the standard beta distribution , for which exact posterior moments and standard random-number generators are available. For example, draw independent and with the same rate, and return . This has the required beta distribution and avoids Markov chain Monte Carlo convergence problems. A correct, converged MCMC method could sample this target, but it is unnecessarily complicated here.
Articles by others on the same topic
There are currently no matching articles.