Calculate type I and II error - solution verification

There are 7 balls in urn. $Q$ of them are white and the rest are black. We have hypothesis $H_0:Q=3$ and $H_1:Q=5$. To test this we draw 2 balls (balls don't come back to the urn - i.e. they are drawn without replacement).

We reject $H_0$ when both balls drawn are white. Calculate probability of type I and type II errors.

MY PROBLEM - what are probabilities of $H_0$ and $H_1$? Are they actually needed?

SOLUTION SKETCH:

Let $x$ be number of drawn white balls.

$\alpha=\mathbb{P}(x>1|H_0)=\frac{\frac{3}{7}\cdot\frac{2}{6}}{\frac{3}{7}}=\frac{2}{6}$

or it is

$\alpha=\mathbb{P}(x>1|H_0)=\frac{3}{7}\cdot\frac{2}{6}=\frac{1}{7}$

and for II type error: $\beta=\mathbb{P}(x<2|H_1)=\frac{\frac{5}{7}\cdot\frac{2}{6}+\frac{2}{7}\cdot\frac{1}{6}+\frac{2}{7}\cdot\frac{5}{6}}{\frac{5}{7}}=\frac{11}{15}$

Or is it wrong?

• I'm not sure what role H1 plays here. Normally, in a problem like this you either reject the null hypothesis (H0) or determine that you can not reject the null hypotheses. The only reasonably H1 would be Q >= 4 (ie, the actual number of white balls is more than 3), not actually having Q set to a specific number.
– user1566
Jan 15, 2016 at 2:06

I believe you need an a priori estimate for P(Q3) and P(Q5)

If you assume these two events to be equally likely (before pulling balls), then let each be 0.5

From Bayes $P(x=2)*P(Q_3|x=2) = P(x=2|Q_3)*P(Q_3)$

$P(Q_3|x=2) = \frac{P(x=2|Q_3)*P(Q_3)}{P(x=2)}$

$P(x=2)=P(x=2|Q_3)*P(Q_3)+P(x=2|Q_5)*P(Q_5)$

$P(x=2|Q_3)=\frac{3}{7}*\frac{2}{6}=\frac{1}{7}$

$P(x=2|Q_5)=\frac{5}{7}*\frac{4}{6}=\frac{10}{21}$

$P(x=2)=\frac{1}{7}*\frac{1}{2}+\frac{10}{21}*\frac{1}{2}=\frac{13}{42}$

$P(Q_3|x=2) = \frac{P(x=2|Q_3)*P(Q_3)}{P(x=2)}=\frac{\frac{1}{7}*\frac{1}{2}}{\frac{13}{42}}=\frac{3}{13}$

$P(Q_5|x=2) = \frac{P(x=2|Q_5)*P(Q_5)}{P(x=2)}=\frac{\frac{10}{21}*\frac{1}{2}}{\frac{13}{42}}=\frac{10}{13}$

Thus a Type I is $\frac{3}{13}$

A Type II error you have to complete a similar analysis for each of the cases (one of each and zero white) which would not have rejected H0 in favor of H1

Your question seems to be incorrect regarding the hypotheses "H0:Q=3 and H1:Q=5"

Null and alternative hypotheses are mutually exclusive and exhaustive statements.

It can be of the form:

H0:Q is equals to 3 and H1:Q not equals to 3