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.

There's no supporting theory, because this doesn't work except by chance alone.
Your choice of null and alternative hypotheses depend only on what you're trying to prove and not the sample value. Suppose you have some new drug that's supposed to lower cholesterol, and you want to test if it works. The null hypotheses is that the drug increases cholesterol or has no effect, while the alternative is that the drug actually does lower cholesterol. To claim that the drug does lower cholesterol, you need a significant amount of data to support that, typically enough to have an alpha of 0.05 - only 1 time in 20 will you say the drug has the intended effect when it actually does not.
If you flip your hypotheses arbitrarily, you're implicitly assuming that the drug works as intended, and requiring significant evidence to show that it does not. But that's not how proof works - a new claim requires positive evidence, you don't just assume it's true and then look for evidence it's false (which you could always fail to find just by collecting little evidence). Failing to show that the drug doesn't work as intended might just be a failure of your sample size, but is not alone evidence that it does work as expected. If you collect only 3 patients' worth of data, you won't have enough evidence to reject the possibility that the drug works as intended, but that's not meaningful at all. You should view that data as showing that you don't have evidence to conclude that the drug works, not that you've failed to rule out the drug's efficacy.
As you can see, none of this line of reasoning requires you to know anything at all about the cholesterol values actually observed in the population. How you test whether the drug works should not depend on whether the drug actually does work or not. The only reason this worked in your exams is because you got lucky defining the null and alternative hypotheses as your instructor intended (you had a 50/50 chance each time). The sample value has absolutely no role in defining the directionality of the hypothesis test.
