Hypothesis Testing
P1.statistics-advanced.04 · Audience: it-ml · Prerequisites: Bayesian Inference
Interview-depth testing for the data-scientist track: confidence vs credible intervals, the t-test's assumptions and its rank-based alternatives, chi-square goodness-of-fit and independence, and why ANOVA replaces a pile of pairwise t-tests. Back to the foundations: Statistical Inference and Statistical Inference Deep Dive.
A 95% confidence interval is a frequentist statement about the procedure, not this interval: if you repeated the experiment many times and built an interval each time, 95% of those intervals would contain the true parameter. For the specific interval you computed, θ is either in it or not — the '95%' is a property of the method's long-run coverage.
Common misreading (wrong): 'there's a 95% probability the true mean is in this interval.' That is a Bayesian credible-interval statement — legitimate only under the Bayesian framework, where θ is random with a posterior.
| Confidence interval (frequentist) | Credible interval (Bayesian) | |
|---|---|---|
| θ | fixed unknown constant | random variable with a posterior |
| Random thing | the interval (via the data) | θ |
| Correct reading | 95% of such intervals cover θ | P(θ ∈ interval | data) = 0.95 |
| Needs a prior | no | yes |
With a flat prior and symmetric likelihood the two often coincide numerically — but their interpretation differs, and this distinction is a classic interview probe.
📚 Go Further
Rigorous references for hypothesis testing.
| Type | Resource |
|---|---|
| Book | Wasserman, All of Statistics — testing, chi-square, ANOVA |
| Book | Casella & Berger, Statistical Inference — CI theory, nonparametric tests |
| In-app | Statistical Inference Deep Dive, for the t-statistic and multiple-comparison correction |
| In-app | Bayesian Inference, for the credible-interval contrast |
Ask the mentor about this module
Ask a question about this content. The mentor explains and grounds its answer in what you are studying; asking is recorded as a learning signal, not a grade.
Try it yourself
A scratch console for this page's ideas — ungraded, nothing you run here is recorded.
Scratch console
A scratch console with the scientific stack (pandas, numpy, scikit-learn). Runs on the server — no network, resource-limited and measured.
Output appears here.