Null Hypothesis when sample is already true As a student I always learned a "rule" to work through my statistics problems: If the sample is true in my null hypothesis, then I'm doing things wrong and it should be the other way around. It worked most of the time in my exams.
Is there any reason or theory to backup this idea?
Example:
X is the mean of the sample.
Sample returns X=24
The following would be "wrong" according to my rule, because the null hypothesis is already true in the sample:
Ho: X ≥ 22
Ha: X < 22
Then I would quickly turn things around to:
Ho: X ≤ 22
Ha: X > 22
Any idea why this works and what's the theory behind it?
I used it in my exams and always worked.

You decide on your null and alternative hypothesis before you analyze the data (preferably before you even collect the data), so you have made a mistake in peeking.
By flipping the inequality to point away from the observed value, you assure yourself of not being able to reject (perhaps with some exotic exceptions, but this definitely applies to a t-test). That is, if you observe that $\bar{x} = 1$ and you try to show $H_a: \mu<0$, you will fail to reject $H_0: \mu\ge 0$ e(unless you have some silly $\alpha$ like $0.9$ instead of that usual suspects like $0.05$, $0.01$, and $0.1$).
But you should not be doing that, because you have not seen the calculation results when you decide on your null and alternative hypotheses.
