Your question starts out as if the statistical null and alternative hypotheses are what you are interested in, but the penultimate sentence makes me think that you might be more interested in the difference between scientific and statistical hypotheses.
Statistical hypotheses can only be those that are expressible within a statistical model. They typically concern values of parameters within the statistical model. Scientific hypotheses almost invariably concern the real world, and they often do not directly translate into the much more limited universe of the chosen statistical model. Few introductory stats books spend any real time considering what constitutes a statistical model (it can be very complicated) and the trivial examples used have scientific hypotheses so simple that the distinction between model and real-world hypotheses is blurry.
I have written an extensive account of hypothesis and significance testing that includes several sections dealing with the distinction between scientific and statistical hypotheses, as well as the dangers that might come from assuming a match between the statistical model and the real-world scientific concerns: A Reckless Guide to P-values
So, to answer your explicit questions:
• No, statisticians do not always use null and alternative hypotheses. Many statistical methods do not require them.
• It is common practice in some disciplines (and maybe some schools of statistics) to specify the null and alternative hypothesis when a hypothesis test is being used. However, you should note that a hypotheses test requires an explicit alternative for the planning stage (e.g. for sample size determination) but once the data are in hand that alternative is no longer relevant. Many times the post-data alternative can be no more than 'not the null'.
• I'm not sure of the mental heuristic thing, but it does seem possible to me that the beginner courses omit so much detail in the service of simplicity that the word 'hypothesis' loses its already vague meaning.
Answer from Michael Lew on Stack ExchangeVideos
What are null and alternative hypotheses?
What is hypothesis testing?
What’s the difference between a research hypothesis and a statistical hypothesis?
Your question starts out as if the statistical null and alternative hypotheses are what you are interested in, but the penultimate sentence makes me think that you might be more interested in the difference between scientific and statistical hypotheses.
Statistical hypotheses can only be those that are expressible within a statistical model. They typically concern values of parameters within the statistical model. Scientific hypotheses almost invariably concern the real world, and they often do not directly translate into the much more limited universe of the chosen statistical model. Few introductory stats books spend any real time considering what constitutes a statistical model (it can be very complicated) and the trivial examples used have scientific hypotheses so simple that the distinction between model and real-world hypotheses is blurry.
I have written an extensive account of hypothesis and significance testing that includes several sections dealing with the distinction between scientific and statistical hypotheses, as well as the dangers that might come from assuming a match between the statistical model and the real-world scientific concerns: A Reckless Guide to P-values
So, to answer your explicit questions:
• No, statisticians do not always use null and alternative hypotheses. Many statistical methods do not require them.
• It is common practice in some disciplines (and maybe some schools of statistics) to specify the null and alternative hypothesis when a hypothesis test is being used. However, you should note that a hypotheses test requires an explicit alternative for the planning stage (e.g. for sample size determination) but once the data are in hand that alternative is no longer relevant. Many times the post-data alternative can be no more than 'not the null'.
• I'm not sure of the mental heuristic thing, but it does seem possible to me that the beginner courses omit so much detail in the service of simplicity that the word 'hypothesis' loses its already vague meaning.
You wrote
the declaration of a null and alternative hypothesis is the "first step" of any good experiment and subsequent analysis.
Well, you did put quotes around first step, but I'd say the first step in an experiment is figuring out what you want to figure out.
As to "subsequent analysis", it might even be that the subsequent analysis does not involve testing a hypothesis! Maybe you just want to estimate a parameter. Personally, I think tests are overused.
Often, you know in advance that the null is false and you just want to see what is actually going on.
The choice of null and alternative hypothesis depends on which claim requires the burden of proof.
A commonly used analogy comes from the legal doctrine of "innocent until proven guilty." In a jury trial, defendants are presumed innocent, and are only convicted if there is guilt "beyond a reasonable doubt." This means the evidence weighing in favor of guilt must be so overwhelming that it is highly implausible to a reasonable person that the defendant could still be innocent in light of the evidence presented.
The rationale for this doctrine is that it is a far greater miscarriage of justice to wrongly convict an innocent person than it is to fail to convict the guilty on the basis of inadequate evidence of guilt. Consequently, such a legal system would prefer to reduce the likelihood of the former than the latter.
In hypothesis testing, a similar notion applies to the null and alternative hypotheses, with the null being "innocence" and the alternative being "guilt." Therefore, which claim is the null and which is the alternative depends on which one, if true, requires the data to show with a high degree of confidence. Correspondingly, the only conclusions that are possible in a statistical hypothesis test are:
- Reject the null hypothesis (i.e., accept the alternative)
- Fail to reject the null hypothesis (i.e., the evidence is inconclusive).
It is a common misconception to characterize the second conclusion as being equivalent to "accepting the null hypothesis." This is wrong because the entire test is performed under the presumption of the null, just as a jury trial is held under the presumption of innocence: the prosecutor will argue "if the defendant is innocent, then how could all the evidence point to their guilt?"
To further extend the analogy, a conclusion in which we reject the null hypothesis in error is analogous to a defendant being wrongfully convicted. This error is called Type I error, and we design the test in such a way as to limit the probability of making such an error to not exceed some predefined value called $\alpha$, the significance level of the test. Conversely, the failure to reject the null when the alternative is true, is called a Type II error, and is analogous to the failure to convict a guilty defendant.
With all of this in mind, we now turn our attention to your specific question. Here, you are presented with a scenario in which we very clearly want to conclusively demonstrate that the water is safe--in other words, the penalty for erroneously claiming the water is safe when it is not, is quite a lot higher than the cost of claiming the water is unsafe when it is. Consider that many people could be severely poisoned or permanently harmed in the former case. So the former error is the one that must be tightly controlled. Consequently, the claim that requires the burden of proof is the claim that the water is safe. This must be your alternative hypothesis. Therefore, the correct structure of the hypothesis test is
$$H_0 : \mu \ge 2 \quad \text{vs.} \quad H_1 : \mu < 2.$$
Under the assumption of the null being true, the choice of test statistic will be based on a null mean of $\mu_0 = 2$, since this is the choice that will ensure that the Type I error of the test will not exceed the significance level--i.e., it is the most conservative and ensures that if we reject $H_0$, we do so in error with probability at most $\alpha$.
In NHST, at the end of the day, you will either have statistical evidence for the alternative hypothesis, or nothing. So the alternative hypothesis is better something you are interested in showing!
If you want to be able to tell people with confidence: "Yes, you can drink this water", choose $H_1\colon \mu < 2$. If you want to be able to tell the city with confidence "You have a mercury problem", choose $H_1\colon \mu > 2$. An appropriate null-hypothesis to be tested against is $H_0: \mu=2$ in both cases.
The text "You are responsible determining whether drinking water in a given city is safe" indicates that you want to be able to tell people with confidence: "Yes, you can drink this water", and you choose $H_1\colon \mu < 2$.
I teach a probability and statistics course in a university but I'm teaching outside my field so I'm definitely not an expert. I have a question about choosing the null and alternative hypotheses and haven't been able to resolve it via googling. I teach in an engineering department so examples about drug testing aren't as relevant.
Question: does the choice of Ho and Ha depend on which "side" of the claim you're on, ie if you want to prove or disprove it?
Let's say a lightbulb manufacturer claims their bulbs last on average at least 800 hours. If I work for the manufacturer, I want to conclusively demonstrate via my hypothesis test that my claim is true, so it seems that I would want Ho : mu <= 800 and Ha : mu > 800 so that I could reject Ho with a certain level of significance and be confident in my claim.
However if I'm a consumer and I don't believe the manufacturer's claim, it seems that I want Ho and Ha to be the reverse, so I could conclusively determine that their claim is false and that the true lifespan is less than 800 hours, so that I'd have evidence that they're being dishonest.
Can anyone confirm if the above logic is correct, that sometimes the choice of whether the stated claim is Ho or Ha depends on if you want to prove or disprove the claim?
Thanks in advance!
Edit: here's an example from the textbook, for an idea of the types of problems I'd like to be able to write:
A manufacturer of a certain brand of rice cereal claims that the average saturated fat content does not exceed 1.5 grams per serving. State the null and alternative hypotheses to be used in testing this claim and determine where the critical region is located.
Solution: The manufacturer’s claim should be rejected only if μ is greater than 1.5 milligrams and should not be rejected if μ is less than or equal to 1.5 milligrams. We test
H0: μ = 1.5,
H1: μ > 1.5.
Nonrejection of H0 does not rule out values less than 1.5 milligrams. Since we have a one-tailed test, the greater than symbol indicates that the critical region lies entirely in the right tail of the distribution of our test statistic Xbar.
To me, this problem seems to be written from the perspective of a test engineer at the FDA who wants to try and prove the company's claim wrong. If I worked for this manufacturer, wouldn't I want to switch H0 and H1, so that I can reject the claim that mu>1.5?