# Segment 14 Sanmit Narvekar

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

## Segment 14

#### To Calculate

1. Suppose the stopping rule is "flip exactly 10 times" and the data is that 8 out of 10 flips are heads. With what p-value can you rule out the hypothesis that the coin is fair? Is this statistically significant?

$\displaystyle \text{Pr(8 or more heads)} = \frac{\binom{10}{8} + \binom{10}{9} + \binom{10}{10}}{2^{10}} = \frac{45 + 10 + 1}{2^{10}} = 0.5469$

If you want a 2 tailed test, since it is symmetric, the pvalue is 0.5469 x 2 = 0.1094. This result is not statistically significant at the 5% or 1% significance levels.

2. Suppose that, as a Bayesian, you see 10 flips of which 8 are heads. Also suppose that your prior for the coin being fair is 0.75. What is the posterior probability that the coin is fair? (Make any other reasonable assumptions about your prior as necessary.)

$\displaystyle P(p | data) = P(data|p) P(p) =$

3. For the experiment in the segment, what if the stopping rule was (perversely) "flip until I see five consecutive heads followed immediately by a tail, then count the total number of heads"? What would be the p-value?