Confidence as posterior correctness probability (source code)

= Confidence as posterior correctness probability
{title2=$P(\text{chosen answer correct}\mid E)$}

A normative <Bayesian inference> model of <retrospective confidence>. For two exhaustive alternatives with equal <prior probabilities>, let $L=\log[p(E\mid H_1)/p(E\mid H_0)]$ be the <log-likelihood ratio>. <Bayes' theorem> gives posterior odds $e^L$. Choosing the alternative with the larger posterior yields $P(\text{correct}\mid E)=(1+e^{-|L|})^{-1}$. Unequal priors add prior log odds; choosing a different action changes which posterior probability is appropriate. This calculation does not establish that an observer knows the true likelihoods.