Test whether a coin is fair, M0:θ=0.5, against a coin of unknown bias, M1:θ∼Beta(a1,a0), from one particular sequence with N1 heads and N0 tails. Use natural logs.
log_evidence_fair(N): logp(D∣M0) for N tosses.
log_evidence_beta(N1, N0, a1=1.0, a0=1.0): logp(D∣M1)=logB(a1+N1,a0+N0)−logB(a1,a0).
bayes_factor(N1, N0, a1=1.0, a0=1.0): B1,0=p(D∣M1)/p(D∣M0).
jeffreys_label(bf): read a Bayes factor on Jeffreys' scale. Return "decisive M0" if bf<0.01, "strong M0" if bf<0.1, "moderate M0" if bf<1/3, "weak M0" if bf<1, "weak M1" if bf<3, "moderate M1" if bf<10, "strong M1" if bf<100, and "decisive M1" otherwise (check the conditions in this order).
bic_log_evidence(N1, N0): the BIC approximation of logp(D∣M1), logp(D∣θ^)−2DlogN with the MLE θ^=N1/N, D=1 free parameter, and the convention 0log0=0.
Return floats (strings for the labels).