
im having some trouble getting around this. A little explanation would be really helpful.
-
2please share what you’ve done and we’ll help – gunes Dec 28 '19 at 15:31
-
6Most statisticians would decline to answer that exact question. They would prefer to answer the question, "Assuming the coin is fair, how unusual would be a result of 12 or more heads (or 12 or more tails) out of 20 flips?" – rolando2 Dec 28 '19 at 15:32
-
@rolando2 ok so why would they decline? secondly, lets assume that i ask the second question, here we're using the c.l.t to answer this right? – vayder Dec 28 '19 at 16:11
-
1Yes, you'd want to use a corollary of CLT (since this is a proportion). To do that, you're assuming p=0.5. That's why the question is better phrased, "Assuming the coin is fair, how unusual would be a result of 12 or more heads (or 12 or more tails) out of 20 flips?", because it's necessary to assume the probability of success to find the desired probability of the result you received. With no other information, the probability that any given coin is fair is 0. – Todd Burus Dec 28 '19 at 17:23
-
@ToddBurus can you show how using the CLT? – vayder Dec 28 '19 at 17:38
-
@vayder As was said earlier, please show what you have tried so far and myself and others would be happy to chime in on anything that needs work. For this, think about what probability distribution you would obtain with the CLT for proportions. – Todd Burus Dec 28 '19 at 18:08
-
@ToddBurus Hi, i've added an image of what i've done so far. would really appreciate if you could help where do i go from here? – vayder Dec 29 '19 at 10:26
-
You refer to $\theta$ as both the "event $\theta$: the coin is fair" but further down $\theta$ appear to be the parameter of the binomial distribution. – Jarle Tufto Dec 29 '19 at 11:35
-
@JarleTufto ok and the second image. The CLT tells us that the value of more than 12 heads has a probability equal to 0.1335 using the laplace bound? The actual probability of < than equal to 12 is 0.8650. – vayder Dec 29 '19 at 11:51
1 Answers
You appear to be using a Beta(1,1) prior on $\theta$. Since this is a continuous distribution, the prior (and posterior) probability of the event that the coin is exactly fair, $\theta=1/2$, is zero.
What would perhaps be a more sensible prior (see Lindley 1957 pp. 188-189 for a discussion of similar examples) would be a point mass at $\theta=1/2$ given the event $H_0$ that the coin is fair and $\theta\sim \mbox{Beta}(\alpha,\beta)$ given an unfair coin (the event $H_1$) and some prior probabilities $q$ and $1-q$ that $H_0$ and $H_1$ are true respectively.
The probabilities of observing $X=x$ heads out of $n$ coin flips under each hypothesis would then be, \begin{align} P(X=x|H_1)&=\int_0^1 P(X=x|\theta,H_1)f_{\theta|H_1}(\theta)d\theta \\&=\frac{n!}{x!(n-x)!B(\alpha,\beta)}\int_0^1 \theta^{x+\alpha-1}(1-\theta)^{n-x+\beta-1}d\theta \\&=\frac{n!B(x+\alpha,n-x+\beta)}{x!(n-x)!B(\alpha,\beta)}, \end{align} and $$ P(X=x|H_0)=\frac{n!}{x!(n-x)!2^n}. $$ Using Bayes theorem, the posterior probability of $H_0$ would be \begin{align} P(H_0|X=x) &=\frac{P(X=x|H_0)P(H_0)}{P(X=x|H_0)P(H_0)+P(X=x|H_1)P(H_1)} \\&=\frac{q}{q + 2^n(1-q)B(x+\alpha,n-x+\beta)/B(\alpha,\beta)} \end{align} instead of zero.
The Figure below shows typical realisations of this posterior probability for increasing sample sizes $n$ for a Beta(1,1) prior and $q=0.5$. For a truly fair coin ($\theta=1/2$, blue curve), the posterior probability of $H_0$ tends to 1 as expected. If the coin is slightly unfair ($\theta=0.55$, red curve) the hypothesis that the coin is fair appear more likely initially until the evidence against $H_0$ eventually becomes overwhelming.
- 10,939
