Do problems: 9.1, 9.3, 9.4, 9.6, 9.7, 9.8, 9.11

9.1

A coin is tossed independently 10 times to test the hypothesis that the probability of heads is 1/2 versus the alternative that the probability is not 1/2. The test rejects if either 0 or 10 heads are observed.

  1. What is the significance level of the test?
  2. If in fact the probability of heads is .1, what is the power of the test?

Solutions

  1. We know the level of significance is given by \(\alpha\) which we know to be the probability of a Type I error \[P(\text{Type I Error}) = \alpha\] So in our case we seek the probability of observing either 0 or 10 heads given that the null hypothesis \(H_0\) is true. We write this mathematically as, \[\mathbf{Pr}_0(X = 0 | H_0) + \mathbf{Pr}_0(X = 10| H_0)\] At this point we note that the experiment of tossing ten independent coins is that of the a binomial type. So \(X\) defined as the number of heads in the experiment is \(X\sim Binom(10, .5)\) under the null. And so we can write the above expression in terms of binomial probabilities, \[\mathbf{Pr}_0(X = 0 | H_0) + \mathbf{Pr}_0(X = 10| H_0) =\] \[\binom{10}{0}(.5)^0(.5)^{10} + \binom{10}{10}(.5)^{10}(.5)^0 = 0.0020\]

  2. If we have that the true probability of heads is .1 then the power of test becomes the probability of obtaning 0 or 10 heads given the alternative is true. Like we did above we can write out the probabilities using the binomial distribution under the alternative. \[1 - \beta = \binom{10}{0}(.1)^0(.9)^{10} + \binom{10}{10}(.1)^{10}(.9)^0 = .3487\]

9.3

Suppose that \(X\sim Binom(100, p)\). Consider the test that rejects \(H_0: p = .5\) in favor of \(H_A: p\neq .5\) for \(|X - 50| > 10\). Use the normal approximation to the binomial distribution to answer the following:

  1. What is \(\alpha?\)
  2. Graph the power as a function of \(p\).

Solutions

  1. We know that \(\alpha\) is the prbability of rejecting the null when it is true. Since we have that \(H_0\) is true then \(X\sim \text{Bin}(100, .5)\), and so we can write the following: \[\alpha = \mathbf{Pr}_0(|X - 50| > 10)\] Using the normal to approximate this we have that \(\mu = np = 50\) and \(\sigma^2 = npq = 25\) and so \(X\) is approximated by \(N(50, 25)\), and so we have: \[\alpha = \mathbf{Pr}_0(|X - 50| > 10) = \mathbf{Pr}_0\Big(\frac{|X - 50|}{5} > 2\Big) \approx 2\Phi(-2)\]
2*pnorm(-2)
## [1] 0.04550026
  1. The power is the probability of correctly rejecting the null given \(H_A\) is true. We write this as \[1- \beta = \mathbf{Pr}_A(|X-50|>10) = 1 - \mathbf{Pr}_A(40 \leq X \leq 60)\], we use R to complete the problem
x <- seq(0, 1., by = .01)
curve( 1 - ( pnorm(60, mean=100*x, sd=sqrt(100*x*(1-x))) -
pnorm(40, mean=100*x, sd=sqrt(100*x*(1-x))) ), ylab = "Power")

9.4

Let \(X\) have one of the following distributions

\(X\) \(H_0\) \(H_A\)
\(x_1\) .2 .1
\(x_2\) .3 .4
\(x_3\) .3 .1
\(x_4\) .2 .4
  1. Compare the likelihood ratio, \(\Lambda\), for each possible value \(X\) and order the \(x_i\) according to \(\Lambda\).

  2. What is the likelihood ratio test of \(H_0\) versus \(H_A\) at level \(\alpha = .2?\) What is the test at level \(\alpha = .5?\)

  3. If the prior probabilties are \(P(H_0) = P(H_A)\), which outcomes favor \(H_0?\)

  4. What prior probabilities correspond to the decision rules with \(\alpha = .2\) and \(\alpha = .5?\)


Solutions