# Segment 14

## Calculation Problems

1. P-value to rule out the hypothesis that a coin is fair when 8 out 10 flips were heads. Is this statistically significant?

p value = $\frac{(1 + 10 +45 + 45 + 10 + 1)}{2^{10}} = 0.109375$ which is not statistically significant.

2. As a Bayesian if the prior that the coin is fair is 0.75, what is the posterior prior that the coin is fair?

If the event of the coin being fair be $K_0$ and that the coin is unfair be $K_1$. Assuming that being a fair and an unfair are mutually exclusive and exhaustive, the probability of $K_1 = 0.25$

\begin{align} P(K_0|Data) &= \frac{P(Data|K_0)\cdot P(K_0)}{P(Data|K_0)\cdot P(K_0) + P(Data|K_1)\cdot P(K_1)}\\ &= \frac{\left(\frac12 \right)^{10} \cdot 0.75}{\left(\frac12 \right)^{10} \cdot 0.75 + \int_0^1 p^2(1-p)^8 dp}\\ &= 0.591 \end{align}

3.