Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm sorry in advance for rather long questions. This is an example in "Bayesian logical data analysis for physical sciences" by P. C. Gregory and I have some questions about the example.

In a poll of 800 decided voters, 440 voters supported the political party A. Let's denote the poll result as $D$. The quantity of interest is the probability that the party A will achieve a majority of at least 51% in the upcoming election, assuming the poll will be representative of the population at the time of the election.

The book regards the problem as a model selection problem.
$M_1$ : The party A will achieve a majority with a parameter $H$ that has uniform prior in the range $0.51 \le H \le 1$.
$M_2$ : The party A will not achieve a majority with a parameter $H$ that has uniform prior in the range $0 \le H < 0.51$.

If we have no prior reason to prefer $M_1$ over $M_2$, we can write the odds ratio $$\begin{aligned} O_{12}&=p(M_1|D,I)/p(M_2|D,I)\\ &=p(D|M_1,I)/p(D|M_2,I)\\ &=\frac{\int_{0.51}^1 p(H|M_1,I)p(D|H,M_1,I) dH }{\int_{0}^{0.51} p(H|M_2,I)p(D|H,M_2,I) dH}\\ &=\frac{\int_{0.51}^1 (1/0.49)p(D|H,M_1,I) dH }{\int_{0}^{0.51} (1/0.51)p(D|H,M_2,I) dH}\\ &=87.68 \end{aligned}$$

Here are my questions. The book don't give explicit expressions for $p(D|H,M_1,I)$ and $p(D|H,M_2,I)$. If I use binomial distribution $$p(D|H,M_1,I)=p(D|H,M_2,I)=\frac{800! H^{440}(1-H)^{800-440}}{440!(800-440)!}$$ I get $87.03$ as a result. It is not same to the value $87.68$ of the Book. What probability distribution should I use for the likelihoods?

I have another question. Why do I have to introduce the models $M_1$ and $M_2$? Is

$$ O_{12}=\frac{\int_{0.51}^1 p(H|D,I) dH}{\int_{0}^{0.51} p(H|D,I) dH} $$ not an appropriate aproach for the problem? It does not have the factor $(1/0.49)/(1/0.51)$ introduced with the models $M_1$ and $M_2$.

share|cite|improve this question

$87.03$ looks reasonable to me as the ratio of the integrals.

The reason for the models and the $p(H|M,I)$ terms is to avoid rewarding uncertain hypotheses for their uncertainty. You may disagree, arguing that uncertain hypotheses are more likely to be true.

For example, if one hypothesis was that $H=0.55$ exactly and the other was $0 \le H \lt 0.1$, then your final suggestion would always give $O_{12}=0$ no matter what data was supplied, since the numerator would always be an integration over a zero-length interval, while the denominator would always be positive.

The Bayes factor example on Wikipedia may help illustrate this. The question your book is trying to answer seems to be quantifying the extent to which the observations support the hypothesis over its alternative.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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