Hypothesis testing evaluates evidence against a specified null hypothesis. A p-value quantifies how likely the observed results are under that null; compare it with a predetermined significance threshold to decide whether to reject or fail to reject the null. section 4.2.1 section 1.1.4
For a normality check before simple regression:
- Use a formal test rather than relying only on plots, which can mislead about whether data are normally distributed. section 4.2.1
- Run Shapiro–Wilk tests on the variables and compare their p-values with a chosen significance threshold. section 4.2.1
- Treat 5% as a common convention, not a universal rule; choose a clear threshold to guide decisions and balance false positives against false negatives. section 4.2.1
>>> from scipy import stats >>> print(stats.shapiro(mds.stage1)) ShapiroResult(statistic=0.9446673217389622, pvalue=0.29328758849732417) >>> print(stats.shapiro(mds.stage2)) ShapiroResult(statistic=0.9290259439587454, pvalue=0.1478907551379664)
Shapiro–Wilk results for the two variables report test statistics and p-values. section 4.2.1



