Hypothesis testing gives a disciplined way to decide whether a pattern in data is more than chance.
Without it, any difference between 2 samples could be read as real, though samples always differ a little.
The method puts the burden of proof on the claim of an effect, much as a court presumes innocence.
Step 1 states the default claim, usually that there is no effect, and the alternative being looked for.
Step 2 chooses a significance threshold, the level of surprise needed to reject the default, before seeing the data.
Step 3 collects the data and works out a test statistic, which measures how far the data sits from the default.
Step 4 asks how likely a result at least this extreme would be if the default were true.
If that probability is below the threshold, the default is rejected; otherwise it stands.
The test answers a narrow question about chance, not whether the effect is large or worth acting on.
A huge sample can make a trivial difference significant, and a small sample can miss an important one.
The method also assumes the data was collected as planned, so changing the plan midway breaks it.
Different tests suit different data, such as comparing means or comparing counts in categories.
In practice, a test goes hand in hand with an estimate of the effect and its confidence interval.
A result should be judged on the size of the effect, its precision and the cost of being wrong, not on significance alone.
The common misconception is that a test proves something, when it only weighs evidence against a default.