# Direction of inequality sign in alternative hypothesis -- determining from word problems

SUPER basic stats 101 type question here, sorry. My teacher likes to set problems that call for a one-tailed Z- or T-test. We've been instructed to always use the equals sign in the H0. Sometimes I have difficulty telling which direction to set the inequality sign in the alternative hypothesis. This seems especially true when the problem includes semi-complicated phrasing like "at least" or "not less than".

I'm struggling to understand his explanations of how to tell when to use < versus > in this situation; weirdly it sometimes seems counterintuitive and sometimes intuitive?

My kinda-thought is that it's got to do with whether you would put the H0 as ≥ or ≤ if that were "allowed", but I can never figure out whether to "reverse" that for the > or <, when doing this method where you're compelled to use "=" in the null.

I'm so sorry I can't even properly express/formulate this question (which is probably part of my issue). Thanks! :)

Edit: As an example, let's say the question is "Bob wants to test whether the number of cars that go past his house is not less than 20 per hour." "not less than" makes me think "≥". But if the null hypothesis has to be "mu = 20", I can't figure out whether the alternative should be "mu < 20" or "mu > 20".

I think there's two parts to your question, let's tackle the 'equality' first. For continuous random variables it doesn't really matter whether you test $$P(\mu \ge 20)$$ or $$P(\mu > 20)$$, see also for example here. I think this is what your teacher means with putting the equality in $$H_0$$: you would always say $$H_0: \mu \le 20$$ versus $$H_a:\mu > 20$$ and not $$H_0: \mu < 20$$ versus $$H_a: \mu \ge 20$$. The difference between the two only exists in numerical computation inaccuracies because $$P(\mu = x)=0$$ for any specific $$x$$, but it feels more strict to have the equals sign in $$H_0$$.
Secondly, a $$H_0$$ of the form $$\mu = x$$ implies a two-sided alternative (i.e. $$\mu \ne x$$), so for a one-sided test you need greater/less than signs in both hypotheses. Which of those two is greater/less than or equal to has been addressed above: that'll always be $$H_0$$. What's left is to figure out if your alternative hypothesis is less, or greater than the null. You are definitely on the right track in your example: 'not less than' is the same as 'greater than' [or equal to, but that will always go in $$H_0$$]. The correct hypotheses for that example are the ones I put above, i.e. $$H_0: \mu \le 20$$ versus $$H_a:\mu > 20$$.