Controlling type I and type II errors