Hypothesis testing, step by step
5 min read
Short answer
State a null hypothesis (no effect) and an alternative , choose a significance level , compute a test statistic, find the p-value, and reject if . Failing to reject is not proof that is true.
The logic
Assume is true and ask how likely data at least this extreme would be. If that probability is very small, the assumption becomes hard to believe, and you reject it. The framework is a proof by contradiction made probabilistic.
Choosing H1
Use a two-sided alternative () unless you committed beforehand to one direction. A two-sided test splits across both tails, so it needs a larger deviation to reject.
Worked example
A process should have mean . A sample of gives with known . Test against at .
. Two-sided , so reject : there is statistically significant evidence that the mean differs from .
Try it yourself
In the example, would you reject at ?
Show the answer
No. , so you fail to reject at the 1% level (the same data are significant at 5% but not at 1%).
Keep going with practice
Vidi's probability lessons give you the distributions the test statistics are drawn from.