My question is premised on this one, which I'm trying to do in a Bayesian style. I'm a Bayes noob.

In a recent poll of 755 randomly selected adults, 587 said X. Test the claim that 75% of adults think X.

I'm starting out just by working out a likelihood function (before testing any claims; I don't want to announce a prior just yet). So I did the following in Mathematica:

l[ev_] := Function[{param},
 Probability[var == ev, 
             Distributed[var, BinomialDistribution[755, param]]]

The idea being that l[evidence] is the likelihood function under that evidence, where param is the underlying probability of the binomial distribution.

I then calculated the integral of l[587] over all param between $0$ and $1$, and was a little surprised to get an integral of $0.00132$. According to my previous understanding, that means no hypothesis in my hypothesis space (i.e. no probability for the binomial distribution) makes the outcome very likely.

If I treat this function l[587] as a Bayesian update from the uniform prior (i.e. I normalise, by dividing through by that integral), I get a function which peaks at the value param == 0.777 with value 26.3756; a lot of the probability mass is now concentrated around that value of the parameter, which is basically what I expected. But I didn't want to treat any priors at this point, and normalising is effectively forcing the likelihood function to become a PMF (which it shouldn't be, because that implies a prior has been picked).

What is the One True Way(TM) of interpreting my unexpectedly-small likelihood function? Why is it so small? Does it matter?


Although I am an ignoramus in Bayesian statistics, I can explain the number $0.00132$. In fact, it is just equal to $1/756$. So this is neither small nor large; this is not unexpected.

Indeed, the probability to observe $k$ (here it is $587$, but this won't matter, as you will see that the result is independent of $k$) is
$$ L(k,p) = {n \choose k} p^{k}(1-p)^{n-k}, $$ where $n=755$ and $p$ is the success probability. Integrating, we get $$ \int_0^1 L(k,p) dp = {n \choose k} \int_0^1 p^{k}(1-p)^{n-k}dp = {n \choose k}\mathrm{B}(k+1,n-k+1), $$ where $\mathrm{B}$ is the beta function. We know that $$ \mathrm{B}(k+1,n-k+1) = \frac{\Gamma(k+1)\Gamma(n-k+1)}{\Gamma(n+2)} = \frac{k!(n-k)!}{(n+1)!}. $$ Therefore, $$ \int_0^1 L(k,p) dp = \frac{n!}{k!(n-k)!}\frac{k!(n-k)!}{(n+1)!} = \frac{1}{n+1}, $$ as claimed.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.