Hypothesizing After the Result is Known (HARKing, Kerr 1998) is when you analyze the data many different ways (say different subgroups), discover an intriguing relationship, and then publish the data so it appears that the hypothesis was stated before the data were collected. This cartoon from XKCD shows the problem: