1
$\begingroup$

There is the following task: Suppose we toss a coin $ N = 10$ times and observe $m = 9$ heads. Let the null hypothesis be that the coin is fair,and the alternative be that the coin can have any bias, so $p() = U(0; 1)$. Derive the Bayes factor $BF_{1;0}$ in favor of the biased coin hypothesis. What if $N = 100$ and $m = 90$?

What I did so far:

Prior likelihood if coin is biased or unbiased is $0.5$ For the unbiased coin I used binomial distribution:

$p^m (1-p)^{(N-m)}$ = $(0.5)^{10}$

But how to count for the biased coin? With what probabilities should I count?

$\endgroup$

1 Answer 1

0
$\begingroup$

I think that the wikipedia article about Bayes factor presents an example at the end that is exactly the same as yours (https://en.wikipedia.org/wiki/Bayes_factor).

This is how I understand it and would apply it to your problem: if $H_0$ is the unbiased coin hypothesis then $P(N=10\ m=9\ | H_0) = \binom{10}{9}\frac{1}{2}^{9}\frac{1}{2}^{10-9}$

If $H_1$ is the hypothesis that the coin has a bias $p \in [0,1]$ and that $p$ can have any value in $[0,1]$ with uniform probability ($U(0;1)$) then $P(N=10\ m=9\ | H_1) = \int_0^1 \binom{10}{9} p^9(1-p)^{10-9}dp$

Then the Bayes factor is given by the ration of the two probabilities.

Note: by integration by parts $\int_0^1 p^a(1-p)^{b}dp = \frac{b}{a+1}\int_0^1 p^{a+1}(1-p)^{b-1}dp = ... = \frac{b!}{(a+1)...(a+b)}\int_0^1p^{a+b}dp = \frac{1}{(a+b+1)\binom{a+b}{b}}$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .