Do problems: 9.1, 9.3, 9.4, 9.6, 9.7, 9.8, 9.11
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.
Solutions
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\]
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\]
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:
Solutions
2*pnorm(-2)
## [1] 0.04550026
R
to complete the problemx <- 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")
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 |
Compare the likelihood ratio, \(\Lambda\), for each possible value \(X\) and order the \(x_i\) according to \(\Lambda\).
What is the likelihood ratio test of \(H_0\) versus \(H_A\) at level \(\alpha = .2?\) What is the test at level \(\alpha = .5?\)
If the prior probabilties are \(P(H_0) = P(H_A)\), which outcomes favor \(H_0?\)
What prior probabilities correspond to the decision rules with \(\alpha = .2\) and \(\alpha = .5?\)
Solutions