Chapter 6: calculation using the incomplete beta function
Chapter 6: calculation using the incomplete beta function
If we are prepared to use the uniform prior over the possible rates of the first model, we have the option of using the incomplete beta function to evaluate the evidence. We require the uniform prior in this instance because this prior allows us to simply scale the result of the integral rather than integrate the product of the likelihood and prior over the rate parameter.
%%% prelim
a=S+1; b=N-S+1;
%%% solution using the incomplete beta
like1=2*betainc(.5,a,b)/(N+1);
EV(3)=10*(log10(like1)-log10(like2))