Intermediate Topic 24 of 51 Math for Computing
Hypothesis Testing
Deciding whether data contradict a claim.
How it works
Hypothesis testing is a framework for deciding whether data provides enough evidence against a null hypothesis, usually a statement of no effect or no difference. You choose a significance level alpha, such as 0.05, compute a test statistic, such as t, z, chi-squared or F, and its p-value, the probability of seeing results at least as extreme if the null were true. If the p-value is below alpha, you reject the null. Type I errors are false positives, type II errors are false negatives, and power is the chance of detecting a real effect.
Where it is used
A/B testing in products, clinical trials, quality control, scientific experiments and machine-learning model comparison use hypothesis tests.
Common pitfall
A p-value is not the probability that the null is true or that the result is important, and failing to reject does not prove the null. Running many tests inflates false positives, requiring corrections such as Bonferroni. Stopping early when results look good biases outcomes. Report effect sizes and confidence intervals and plan sample sizes with power analysis.
Where it fits in the course
Hypothesis Testing is topic 24 of 51 in Math for Computing, rated Intermediate. It follows Central Limit Theorem. The next topic is Confidence Intervals.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Math for Computing quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Math for Computing quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Hypothesis Testing?
Where do people use Hypothesis Testing?
What is the most common mistake with Hypothesis Testing?
What should I learn before this topic?
How can I practice it?
Is Hypothesis Testing hard to learn?
How long does it take to learn Hypothesis Testing?
Which topics are related to Hypothesis Testing?
What should I study after Hypothesis Testing?
Related topics
- Central Limit Theorem (Math for Computing)
- Confidence Intervals (Math for Computing)
- Law of Large Numbers (Math for Computing)
- Linear Systems (Math for Computing)
- Unit Testing (Software Engineering)
- Integration Testing (Software Engineering)
- Penetration Testing (Security & Cryptography)