Hypothesis Testing for Data Analysts
Null vs alternative hypothesis, p-value and significance level, t-tests, chi-square tests, A/B test design and interpretation — with Indian e-commerce and fintech examples. No advanced maths required — focus on understanding, interpreting, and communicating results.
The Hypothesis Testing Framework
Hypothesis testing is a structured way of deciding whether an observed pattern in data is real or just due to chance. It follows a consistent 5-step process regardless of which specific test you use.
The t-Test — Comparing Means Between Two Groups
Chi-Square Test — Comparing Proportions Across Categories
A/B Test Design and Interpretation
A/B testing is the practical application of hypothesis testing to product and marketing decisions. A control group (A) sees the current experience; a test group (B) sees the new variant. The question: is B better than A, or is the difference just noise?
Common Hypothesis Testing Mistakes — and How to Avoid Them
Frequently Asked Questions
What is a p-value and what does p < 0.05 mean?
A p-value is the probability of observing results as extreme as (or more extreme than) your data, assuming the null hypothesis is true. If p = 0.03, it means: if there were truly no effect, there is only a 3% probability of seeing a difference this large or larger by random chance alone. The threshold p < 0.05 (called significance level or alpha) is a conventional boundary — if p falls below it, you "reject the null hypothesis" and conclude the effect is statistically significant. This does NOT mean: (1) a 95% chance that the alternative hypothesis is true; (2) the effect is practically important (a statistically significant difference may be too small to matter in business); or (3) the experiment proves causation. In A/B testing for an Indian e-commerce site, p < 0.05 means the observed conversion rate difference between control and variant is unlikely to be due to random fluctuation — but you still need to check whether the absolute difference (say 0.2%) justifies the engineering effort.
When should a data analyst use a t-test vs chi-square test?
Use a t-test when comparing means of a continuous variable between two groups — e.g. is average order value different for new vs returning customers? Is delivery time lower in Tier-1 vs Tier-2 cities? The variable being tested must be numeric (order value, delivery days, rating). Use chi-square test when testing whether a categorical outcome is associated with a categorical grouping — e.g. does return rate (returned vs not returned) differ across product categories? Is payment method (UPI vs card vs COD) associated with customer city tier? The variable being tested is a count or proportion split across categories. A quick rule: if you are comparing a number between groups → t-test. If you are comparing proportions or counts across categories → chi-square test.
What is statistical power and why does it matter for A/B tests?
Statistical power is the probability of correctly detecting a real effect when one exists — i.e. the probability that your test will produce p < 0.05 when the alternative hypothesis is actually true. Low-power tests frequently produce false negatives: the new variant really is better, but your test concludes no significant difference because the sample size was too small. Standard practice is to design tests with 80% power — meaning if a true effect exists, you have an 80% chance of detecting it. Power depends on: effect size (bigger differences are easier to detect), sample size (more users → more power), and significance level (stricter threshold → lower power). In India, where experiment traffic is concentrated in certain periods (festive season, salary dates), analysts sometimes under-power tests by running them during off-peak periods. Always calculate the required sample size before running an A/B test — running a test and stopping when it looks significant is a common but incorrect practice known as p-hacking.
What are the most common mistakes in hypothesis testing?
The five most common mistakes: (1) Stopping the test early once significance is reached — this is p-hacking and inflates false positives. Run the full planned duration. (2) Treating absence of significance as proof of no effect — a non-significant result means "not enough evidence," not "no effect exists." (3) Interpreting p < 0.05 as the effect is important — significance is not the same as practical significance. A 0.1% conversion rate improvement may be statistically significant with enough users but irrelevant for the business. (4) Running multiple comparisons without adjustment — if you test 20 variants, one will be significant by chance alone. Use Bonferroni correction or FDR adjustment. (5) Violating test assumptions — t-tests assume approximately normal distribution or large enough sample; using them on very small samples with skewed data produces unreliable results.
EVIKA ACADEMY · NOIDA SECTOR 51
Master Statistical Testing with Real Data
Our curriculum covers hypothesis testing, A/B test design, and statistical interpretation applied to real Indian business datasets — with interview preparation and hands-on Python labs.
Book Free Demo Class →