The basic logic of hypothesis testing has been presented somewhat informally in the sections on "Ruling out chance as an explanation" and the "Null hypothesis." In this section the logic will be presented in more detail and more formally.

- The first step in hypothesis testing is to specify the null hypothesis
(H
_{0}) and the alternative hypothesis (H_{1}). If the research concerns whether one method of presenting pictorial stimuli leads to better recognition than another, the null hypothesis would most likely be that there is no difference between methods (H_{0}: μ_{1 }- μ_{2}= 0). The alternative hypothesis would be H_{1}: μ_{1}≠ μ_{2}. If the research concerned the correlation between grades and SAT scores, the null hypothesis would most likely be that there is no correlation (H_{0}: ρ= 0). The alternative hypothesis would be H_{1}: ρ ≠ 0.

- The
next step is to select a significance level. Typically
the 0.05 or the 0.01 level is used.

- The third step is to calculate
a statistic analogous
to the parameter specified by the null
hypothesis. If the null hypothesis were defined by the parameter μ
_{1}- μ_{2}, then the statistic M_{1}- M_{2}would be computed.