My Math Forum (http://mymathforum.com/math-forums.php)
-   -   Bayesian hypothesis testing (http://mymathforum.com/advanced-statistics/345614-bayesian-hypothesis-testing.html)

 zollen January 12th, 2019 10:21 AM

Bayesian hypothesis testing

Suppose you are flipping a coin. You are considering the following hypothesis:

The coin is weigthed so it comes up head 1/4 of the time and tail 3/4 of the time.

Assume that the prior probability is 1/3. You now flip the coin ten times and get seven heads.
What are the probabilities of this hypothesis given the result of the coin flips?

Definition of Bayesian Prior
P(F = t | X = k) = P(X = k | F = t ) * P(F = t) / P(X = k)
P(F = t) is called the prior. It expresses our preconceptions about the relative likeihood
of different values of the fraction of the population that yields head *before* we even see
the poll result.

I am not sure how to approach this problem using Bayesian hypothesis testing.
Any tips would be greatly appreciated.

Thanks.

 romsek January 12th, 2019 10:10 PM

$P\left[\left . p_H = \dfrac 1 4 \right| \text{observe 7 heads in 10 tries}\right] =$

$\dfrac{P\left[\text{observe 7 heads in 10 tries } | p_H = \dfrac 1 4\right]P\left[p_H = \dfrac 1 4\right]}{P[\text{observe 7 heads in 10 tries}]} =$

$\dfrac{\dbinom{10}{7}\left(\dfrac 1 4\right)^7\left(\dfrac 3 4\right)^3\cdot \dfrac 1 3}{\dbinom{10}{7}\left(\dfrac 1 4\right)^7\left(\dfrac 3 4\right)^3 + \dbinom{10}{7}\left(\dfrac 1 2\right)^{10}} = \dfrac{9}{1051}$

 zollen January 13th, 2019 12:38 AM

one last question....

Should the following be considered?

$\displaystyle [\text{observe 7 heads in 10 tries } \cup not( p_H = \dfrac 1 4 ) ] = \dbinom{10}{7}\left( 1 - \left(\dfrac 1 4\right)^7\left(\dfrac 3 4\right)^3 \right)$

$\displaystyle \dbinom{10}{7}\left(\dfrac 1 2\right)^{10}$

 romsek January 13th, 2019 07:44 AM

Quote:
 Originally Posted by zollen (Post 604392) Should the following be considered? $\displaystyle [\text{observe 7 heads in 10 tries } \cup not( p_H = \dfrac 1 4 ) ] = \dbinom{10}{7}\left( 1 - \left(\dfrac 1 4\right)^7\left(\dfrac 3 4\right)^3 \right)$ instead of $\displaystyle \dbinom{10}{7}\left(\dfrac 1 2\right)^{10}$
well... if $p_H$ can be anything between 0 and 1 then

$P[\text{observe 7/10 heads}] = \displaystyle \int_0^1 \dbinom{10}{7}p^7(1-p)^3~dp = \dfrac{1}{11}$

 All times are GMT -8. The time now is 07:09 PM.