Skip to content
IT glossary
Data and MLUpdated December 3, 2026

Hypothesis testing

Проверка гипотез

A statistical procedure that uses sample data to decide whether there is enough evidence to reject a starting claim, such as the claim that two versions of a product have the same average outcome.

Also known as: нулевая гипотеза, t-test

What a hypothesis test answers

Suppose a new checkout page appears to increase average order value. The two groups would probably have different sample averages even if the page had no effect. A hypothesis test asks: if there really were no difference, how unusual would a result like this be?

The claim being tested is the null hypothesis (H₀), often a claim of no difference. The alternative hypothesis (H₁) says what kind of departure counts as evidence against it. A two-sided test looks for an increase or a decrease. A one-sided test looks for evidence in a direction chosen in advance, not after seeing which group came out ahead.

From data to a decision

Choose a test that fits the metric and the study design, and set a significance level α before looking at the results. A valid test at α = 0.05 is designed to reject a true null hypothesis no more than 5% of the time in repeated studies under its assumptions. That is the Type I error rate.

Next, calculate a test statistic. In a two-sample t-test, it measures the observed difference between means in units of its estimated standard error. The p-value is the probability, assuming the null hypothesis and the test's assumptions hold, of getting a statistic at least as extreme as the one observed. Reject H₀ if p ≤ α; otherwise, fail to reject it. The second outcome means the evidence fell short, not that the groups have been shown to be equal.

Example: choosing a t-test

Say users are randomly assigned to one of two checkout pages. The outcome is spending per assigned user, with zero recorded for users who do not buy. With one observation per user and independent groups, Welch's t-test can compare the means without assuming equal variances. If the data are highly skewed and the samples are small, check whether the test's approximation is reliable. If the same users tried both pages, a paired analysis would instead account for the fact that the two observations from the same person are related.

Suppose the estimated lift is $0.20 per user and the two-sided p-value is 0.03. That's statistically significant at the 5% level, but it doesn't tell you whether the gain justifies rolling out the page. Report the estimated lift and its confidence interval, then compare the plausible effect sizes with the minimum gain worth shipping.

Common interview questions

Hypothesis tests come up in product experiments, model comparisons, and analyses of changes in operational metrics. Interviewers often ask what p = 0.03 means. It does not mean there is a 3% chance the null is true. They may also ask what happens if the experiment is too small: a real effect is easier to miss. Failing to reject a false null is a Type II error; power is the probability of detecting a specified effect when it exists. Finally, if you're asked whether to stop a fixed-sample A/B test as soon as p < 0.05, explain that repeated looks can inflate the false-positive rate unless the analysis plan accounts for them.