Testing the null hypothesis $H_0$ : $p = .6$ vs. the alternative $H_1$ : $p < .6$ for a binomial model

544 Views Asked by At

In testing the null hypothesis $H_0$ : $p = .6$ vs. the alternative $H_1$ : $p < .6$ for a binomial model $b(n,p)$, the rejection region of a test that has structure $X ⩽ c$, where $X$ is the number of successes in n trials. For each of the following tests, determine the level of significance and the probability of type II error at the alternative $p$ = $.3$.

$n = 10, c = 2$

Attempted Solution:

I am trying to make use of this definition:

Test $H_0$ : p $\geq$ $p_0$ ($H_0$ : $p$ = $p_0$) against $H_1$ : $p$ $\lt$ $p_0$

At the significance level of $\alpha$, most powerful test rejects $H_0$ if X $\leq$ c where c is the largest integer

c $\lt$ $n$$p_0$ − $Z_α$$\sqrt{np_0(1−p_0)}$

In this case, since $c = 2, n = 10$, and $p_0$ = .6, we get,

$2$ $\lt$ $10(.6)$- $Z_α$$\sqrt{10*.6(1−.6)}$

$\Rightarrow$ $Z_α$ $\lt$ $2.58$

$\Rightarrow$ α = $.0049$

And the probability of type II error would be the probability that $p = .6$ is accepted given that
$p$ $\lt .6$. I think this would be

data binom1;
binomcdf = 1-cdf('binomial', 2, 0.6, 10);
run;
proc print data = binom1;
run;

which gives $0.9877$.

Something I'm skeptical about is $p = .3$ is mentioned in the question but I never used that probability. I don't understand what it is associated with. Is that supposed to be the alternative hypothesis?

1

There are 1 best solutions below

2
On BEST ANSWER

You have $n = 10$ and wish to test $H_0: p = .6$ against $H_a: p < .6,$ using critical value $c = 2.$ Let $X \sim \mathsf{Binom}(10, p).$

So $\alpha = P(X \le 2 | p = .6) = 0.0123.$

The exact binomial probability can be computed in R statistical software as follows:

pbinom(2, 10, .6)
## 0.01229455

Using a normal approximation (with continuity correction) with $n$ as small as ten is a bit risky, but the computation would be as follows:

$$P(X \le 2) = P(X \le 2.5) = P\left(\frac{X-np}{\sqrt{np(1-p)}} \le \frac{2.5 - 6}{\sqrt{2.4}} \right) \approx P(Z < -2.2596) = 0.0119,$$

which agrees with the exact value to two places, generally about what you can expect with a normal approximation.

The normal approximation isn't bad for $p=0.6,$ but I wouldn't want to use it for $p$ as small as $0.2.$

enter image description here

The power against the specific alternative $p = .3$ is $P(X \le 2|p = .3) = 0.3838.$ So the probability of the Type II error (failing to reject $H_0: p = .6,$ when $H_a: p = .3$ holds) is $1 - 0.3838 = 0.6172.$

pbinom(2, 10, .3)
## 0.3827828

This is not the answer you got, but I don't understand the method you used. The probability of Type II error is a function of $p$ and so has many values.

p = seq(.1,.6, by= .01
p.rej = pbinom(2, 10, p)
plot(p, p.rej, type="l", ylim=0:1, col="blue", lwd=2, main="Power Curve")
   abline(h=0:1, col="green2"); abline(v=.6, col="green2")
   abline(v=.3, col="red")

The curve below shows power against various values of $p < .6$ A red line indicates power against the specific alternative $p = .3$ computed above. The Type II error probability is found by subtracting the power from 1.

enter image description here