Let X follow a Binomial distribution (5, theta) and consider the hypothesis
H(0):theta<= 1/2 vs H(1): theta>1/2
Test A rejects the null hypothesis if and only if all "successes" are observed and test b rejects the null hypothesis if there are either 3,4 or 5 "successes" are observed
a. Find the type I error for each test
b. Find the type II error for each test.
My attempt:
Test A rejects the null hypothesis with probability: (5 choose 5) * theta^5 * (1-theta)^0 = theta^5
Also null hypothesis is true with probability 1/2, since 0<theta<1.
So type I error for test A would be 1/2 * theta^5
and type II error would be 1/2 * (1-theta^5), with a similar logic
Now, test B rejects the null hypothesis with probability:
(5 choose 3) * theta^3 * (1-theta)^2 + (5 choose 4) * theta^4 * (1-theta)^ + theta^5 = 10 * theta^3 * (1-theta)^2 + 5*theta^4 * (1-theta) + theta^5, (=J say)
And since null hypothesis is false with probability 1/2 (again 1/2 since 0<theta<1) )
the type I error would be 1/2 * J
and type II error would be 1/2 * (1-J)
Can someone review my work and tell me if my logic is correct?
Thank you very much!!!