Problem 19.6 Easy Free 1 variation

Error Rates of a Binomial Test

A coin is tossed 3636 times, and XX denotes the number of heads observed. To test the null hypothesis that the coin is fair (p=1/2p=1/2) against the alternative that it is not, you adopt the rejection region ∣X−18∣≥4|X-18|\geq 4. Find the significance level α\alpha of this test (the probability of rejecting H0H_0 when the coin is in fact fair), to the nearest thousandth.

Work it out, then compare with the answer.

SolutionShow the worked solution

Under H0H_0 we have X∼Bin(36,12)X\sim\mathrm{Bin}(36,\tfrac12). The test rejects when X≤14X\le 14 or X≥22X\ge 22, so it is simplest to compute the complement:

α=P(∣X−18∣≥4)=1−P(15≤X≤21)=1−2−36∑k=1521(36k).\alpha=\mathbb{P}(|X-18|\ge 4)=1-\mathbb{P}(15\le X\le 21)=1-2^{-36}\sum_{k=15}^{21}\binom{36}{k}.

The distribution is symmetric about 1818. The coefficients follow from (3618)=9075135300\binom{36}{18}=9075135300 by the ratio (36k−1)=(36k)k37−k\binom{36}{k-1}=\binom{36}{k}\frac{k}{37-k}:

(3617)=8597496600,(3616)=7307872110,(3615)=5567902560.\binom{36}{17}=8597496600,\qquad \binom{36}{16}=7307872110,\qquad \binom{36}{15}=5567902560 .

Hence

∑k=1521(36k)=(3618)+2[(3617)+(3616)+(3615)]=52021677840.\sum_{k=15}^{21}\binom{36}{k}=\binom{36}{18}+2\Bigl[\binom{36}{17}+\binom{36}{16}+\binom{36}{15}\Bigr]=52021677840 .

Since 236=687194767362^{36}=68719476736,

α=68719476736−52021677840236=16697798896236=1043612431232≈0.24299.\alpha=\frac{68719476736-52021677840}{2^{36}}=\frac{16697798896}{2^{36}}=\frac{1043612431}{2^{32}}\approx 0.24299 .
α=1043612431232≈0.243\boxed{\alpha=\frac{1043612431}{2^{32}}\approx 0.243}

Key idea. The significance level is the H0H_0-probability of the rejection region. The normal approximation with continuity correction gives 2 P(Z≥3.5/3)≈0.2432\,\mathbb{P}(Z\ge 3.5/3)\approx 0.243 and confirms the result.

Variations

The same idea with a twist. Each solution gives only the changed step.

Variation 19.6a

A coin is tossed 3636 times, and XX denotes the number of heads observed. To test the null hypothesis that the coin is fair against the alternative that it is biased, you use the rejection region ∣X−18∣≥4|X-18|\geq 4. Suppose the true heads probability is actually p=0.7p=0.7. Find the probability β\beta of failing to reject H0H_0 (i.e. ∣X−18∣<4|X-18|<4) in this case, to the nearest ten-thousandth.

Work it out, then compare with the answer.

Solution

Now X∼Bin(36,0.7)X\sim\mathrm{Bin}(36,0.7). We fail to reject exactly when 15≤X≤2115\le X\le 21, so

β=∑k=1521(36k)(0.7)k(0.3)36−k.\beta=\sum_{k=15}^{21}\binom{36}{k}(0.7)^k(0.3)^{36-k}.

The largest term is p21=(3615)(0.7)21(0.3)15≈0.0446241p_{21}=\binom{36}{15}(0.7)^{21}(0.3)^{15}\approx 0.0446241.

Each smaller term follows from the ratio pk−1/pk=k37−k⋅37p_{k-1}/p_k=\frac{k}{37-k}\cdot\frac37. Writing every term as a multiple of p21p_{21}, the multipliers for k=21,20,…,15k=21,20,\dots,15 are

1, 0.5625, 0.28361, 0.12830, 0.05209, 0.01898, 0.00620.1,\ 0.5625,\ 0.28361,\ 0.12830,\ 0.05209,\ 0.01898,\ 0.00620 .

They sum to 2.051682.05168, so

β≈0.0446241×2.05168≈0.091554.\beta\approx 0.0446241\times 2.05168\approx 0.091554 .

The value 0.0915540.091554 lies just above 0.091550.09155, so it rounds up.

β≈0.0916\boxed{\beta\approx 0.0916}