I am given the following problem: I have four socks in a drawer; each is either black or white. Put
$$H_0 : \text{There are exactly two black socks}$$
$$H_A : \text{There are 0, 1, 3, or 4 black socks}$$
We decide on the following test: we take out two socks without replacement. We reject $H_0$ if the two socks are the same color.
a) What is the significance level of this test?
So to answer this one I believe I have to use conditional probability, like $P(\text{pulling 2 socks of the same color} \mid H_0 \text{ is true})$. I know $P(H_0 \text{ is true}) = .375$, as this is just the event where we have $2$ black socks. I am stuck past this.
b) If there are actually three black socks, what is the power of this test?
I do not know where to begin to solve this problem.
The significance level of a test is defined as
$$\mathsf P(\text{reject } H_0 \mid H_0 \text{ true})$$
Since we assume $H_0$ is true then there are two black socks and two white socks in the drawer. We need to find the probability of getting two white socks or getting two black socks given this information as that would lead to rejection of the null hypothesis. The probability that this occurs is
$$\frac{2}{4}\cdot\frac{1}{3}+\frac{2}{4}\cdot\frac{1}{3}=\frac{1}{3}$$
The power of a test is defined as
$$power = \mathsf P(\text{reject } H_0 \mid H_a \text{ true})$$
We reject $H_0$ if we get two of the same color. We are given that there are three black socks. We thus cannot get two white socks and so the probability of getting two black socks is $$\frac{3}{4}\cdot\frac{2}{3}=\frac{1}{2}$$