Hypothesis test and error analysis