Confidence Intervals and Hypothesis Tests
Turning a sample into a statement about the whole population: a range of plausible values, or a test of a claim.
Needs a step first: 18
A confidence interval, such as , comes from a method that captures the true value in of samples. A hypothesis test asks how surprising the data would be if a claim were true: the p-value is the chance of a result at least as extreme, and a small one is evidence against . Neither gives the probability that the hypothesis is true, which is the question Bayesian inference answers instead. These ideas sit behind every A/B test and every reported model accuracy.
Where it shows up: Comparing two models on a test set is a hypothesis test, and the error bars on a benchmark score are confidence intervals.
How to hold it: Give it to the machine, then check
Let software compute test statistics, p-values and intervals; check that an interval is roughly the estimate plus or minus two standard errors, and say correctly what the numbers do and do not mean.
What knowing it looks like
- Construct a confidence interval for a mean and say correctly what it means.
- Carry out a -test: state and , compute the test statistic and p-value, and draw a conclusion.
- Spot the common misreadings of a p-value.
Test yourself
A sample of measurements has mean , and the population standard deviation is known to be . Give a confidence interval for the population mean, and test against at the level.
Show the worked answer
Needs a step first: 18
Learn it with an AI
Copy this prompt into any AI assistant. It will take you through step by step at your level and finish with the test above.
Be my maths tutor. I'm learning "Confidence Intervals and Hypothesis Tests" (Undergraduate I tier): Turning a sample into a statement about the whole population: a range of plausible values, or a test of a claim. I already know: The Central Limit Theorem. Teach it Socratically: first ask what I already know; then explain the core idea with one concrete example and why it's true; then give me three problems, one at a time, easy to hard. Wait for my answer, check every step, and point out mistakes without giving the answer away. Finish by testing me with this: A sample of $100$ measurements has mean $52.0$, and the population standard deviation is known to be $10$. Give a $95\%$ confidence interval for the population mean, and test $H_0\colon\mu=50$ against $H_1\colon\mu\ne50$ at the $5\%$ level. Use LaTeX for formulas. When you say where it's used later (machine learning, quantum mechanics), be specific.
Needs first
Picks up from the children's map: Samples and Surveys
Leads to
On the way to
Recommended
- MIT 6.1200J Mathematics for Computer ScienceMIT OpenCourseWare · CourseMIT's 2024 course on proofs, number theory, graphs, counting and discrete probability, with lecture videos, notes and problem sets.
- Mathematics for Machine LearningDeisenroth, Faisal and Ong (Cambridge University Press) · BookA free book that gathers exactly the linear algebra, vector calculus, probability and optimisation machine learning uses, then applies them to regression, PCA and classification.
- Seeing TheoryBrown University · InteractiveA visual introduction to probability and statistics in which you flip coins, draw samples and fit lines in the browser; complete and ad-free, with a Chinese version.
- Harvard Stat 110: ProbabilityJoe Blitzstein, Harvard University · CourseJoe Blitzstein's Harvard probability course: lecture videos, about 250 practice problems with solutions and a free online textbook, strong on intuition and story proofs.
- Information Theory, Inference, and Learning AlgorithmsDavid MacKay · BookMacKay's book connecting entropy, coding, Bayesian inference and neural networks, free to read online and still the one recommended for information theory with intuition.
- 宋浩老师官方宋浩(山东财经大学) · Videos · 中文Full university courses in calculus, linear algebra and probability by a Shandong University of Finance and Economics lecturer, clear and good-humoured; a new calculus series came out in October 2026.