The further the true p is from 0.4 (in the direction of H1), the higher the power.
Comparing tests
A good test has a small size and a high power. With a fixed sample, lowering the size raises the chance of a Type II error. A larger sample can reduce both. When comparing two tests, sketch or tabulate their power functions: the one with greater power for the alternatives you care about is better.
Common mistake: using the significance level as the probability of a Type I error for a discrete distribution. The size is the actual probability of the critical region, which is usually less than the significance level.
Exam tip: find the critical region first. Then a Type I error uses the H0 value of the parameter, and a Type II error uses the alternative value given in the question.
Check yourself
Define a Type II error.
Not rejecting H0 when it is false.
The probability of a Type II error is 0.3. Find the power.