Solution

A Lopsided Coin and Its Two Tails

Show the problem again

A coin is claimed to land heads with probability 1/3. It is tossed 8 times and lands heads 6 times. Use the exact binomial test of $H_0: p = 1/3$ with the two-sided p-value defined as the total probability, under $H_0$, of all outcomes whose probability is **at most** the probability of the observed outcome (the convention used by R's `binom.test`; it is not "double the smaller tail"). Give the p-value as a reduced fraction.

Worked solution

Under $H_0$, $P(X=k)=\binom8k 2^{8-k}/3^8$, so in units of $1/6561$ the probabilities for $k=0,\dots,8$ are 256, 1024, 1792, 1792, 1120, 448, 112, 16, 1. The observed outcome $k=6$ has probability 112/6561. The outcomes at most as likely as that are $k=6,7,8$, with weights $112+16+1=129$. The other tail is far from them: $k=0$ already has weight 256 > 112, so it contributes nothing. The p-value is $129/6561 = 43/2187 \approx 0.0197$. Doubling the upper tail would give $258/6561$, which is wrong here because the null distribution is skewed and the lower tail is much heavier than the mirror image of the upper one.

Source: Original problem written for AxiomIQ.