Exercise :
A box contains 4 balls out of which $\theta$ are white and $4-\theta$ are black. Suppose that you want to check the null hypothesis $H_0 : \theta =2$ against the alternative $H_1 : \theta \neq 2$. You draw 2 balls with replacement from the box and if they are both of the same color you reject the null hypothesis.
i) Calculate the confidence level $a$ of the test above.
ii) If the box contains 3 white balls, calculate the probability of the type two error for the test above.
Question :
First of all doea the last phrase means that you draw one ball first and then replace it and draw a second one too? Can someone please clarify me the test mentioned?
Generally, I know that :
$$a = \mathbb{P}(reject H_0 | H_0 true)$$
How would I express this probability though ? Obviously due to replacement he events are independent and then the probability of drawing 2 of the same color is :
$$\mathbb{P}(2black) = \mathbb{P}(black)\cdot \mathbb{P}(black) = \frac{(4- \theta)^2}{16}$$
$$\mathbb{P}(2white) = \mathbb{P}(white) \cdot \mathbb{P}(white) = \frac{\theta^2}{16}$$
Also the type II error is :
$$P(accept H_0 | H_1 true)$$
Can someone help me formulate the expression for $a$ ? I would really appreciate a thorough explanation.
Assuming this is a test of drawing two balls with replacement......
A type I error is rejecting the null when you shouldn't. The only scenario where this can occur is when there are two white and two black and two of the same color are chosen in the test. The probability of that is $0.5$. The first choice can be either color, the probability is limited to picking a second ball the same color as the first. This is $2/4 = 0.5$. Hence the confidence level, which is the same as the probability of making a type I error, is $0.5$
A type II error is the probability of not rejecting the null when you should. If there are 3 white and one black, this is limited to the probability of selecting one of each color. If the first is a white $3/4$, the probability of the second being a black is $1/4$ hence $P1 = 3/16$. If the first is a black $1/4$, the probability of the second being white is $3/4$ hence $P2 = 3/16$. The total probability of making a type II error is therefore $P = 3/16 + 3/16 = 3/8$.