What is hypothesis testing and why is it used?
Filed under Amazon
Free read 2 of 3Hypothesis testing is a statistical method for deciding whether sample data gives enough evidence against a default claim. The null hypothesis H0 states no effect or difference; the alternative H1 states there is one.
The question
What is hypothesis testing and why is it used?
Approach
Hypothesis testing is a statistical method for deciding whether sample data gives enough evidence against a default claim. The null hypothesis H0 states no effect or difference; the alternative H1 states there is one.
Choose a significance level alpha (often 0.05), compute a test statistic (t, z, chi-square) from the sample, and get a p-value: the probability of seeing a result at least this extreme if H0 were true. If p < alpha, reject H0.
Type I error: rejecting a true H0 (false positive, probability alpha). Type II error: failing to reject a false H0 (false negative). Power is 1 minus the Type II rate and rises with sample size and effect size.
It separates real effects from random chance when making decisions. Example: an A/B test of two page designs asks whether the conversion difference is bigger than chance. Failing to reject H0 does not prove it is true.
Tips
- What they are testing: This question tests whether you can define the null and alternative, p-value and error types, with a simple example such as an A/B test.
- Common mistake: Saying the p-value is the probability that the null hypothesis is true.
Related Amazon questions
Collected from public candidate posts and coding forums. Updated Nov 2026.