Statistics
Статистика
Statistics is the practice of summarizing data and using it to draw conclusions under uncertainty. The mean and median describe the center of a dataset, while variance measures how spread out the values are around the mean.
Also known as: среднее, медиана, дисперсия
What statistics helps you do
Suppose an app team wants to know whether a shorter checkout flow leads to higher spending. Summarizing the order values it has already collected is descriptive statistics. Using those observations to estimate what would happen if the shorter flow were rolled out is statistical inference. The first task describes what was measured; the second asks how far the evidence can be generalized.
How to describe center and spread
- The mean is the sum of the values divided by their count. It answers “What would each observation get if we split the total evenly?” A single very large order can pull it up.
- The median is the middle value after sorting. With an even number of observations, average the two middle values. It is less sensitive to extreme values than the mean, but it does not tell you how large those extremes are.
- Variance measures spread around the mean using squared deviations. To describe the observed dataset itself, divide the sum of squared deviations by the number of observations,
n. To estimate the variance of the underlying population without bias from an independent sample drawn from the same distribution, divide byn − 1. The square root of variance is the standard deviation, which uses the original units, such as dollars rather than dollars squared.
Example: a few expensive orders
Five orders are worth $10, $20, $20, $30, and $120. Their mean is $40, but their median is $20. The mean is the right figure for reporting revenue per order; the median better describes a typical order in this example. Now compare five orders of $40 each: the mean is still $40, but the variance is zero because all the values are identical. Equal means do not imply similar distributions.
What a sample can tell you
A sample is the set of observations you collect. The population is the broader group you want to understand. If you look only at completed orders, you cannot use those orders alone to estimate spending per visitor: visitors who never checked out are missing. Collecting more completed orders will not fix that mismatch. In a randomized A/B test, assigning users to versions at random helps make the groups comparable. Reporting the estimated effect with a confidence interval shows how precisely it was estimated under the method's assumptions. A statistically significant effect still might be too small to justify a rollout.
Where it comes up in interviews
Expect to choose a summary for a practical problem: revenue per user in product analytics, tail latency in monitoring, or model performance across validation splits. For example, if a service has a stable median latency but a rising 95th percentile, a single summary would miss part of the story: the middle is unchanged, but requests near the slow end are taking longer. Another common question is whether you can average two team-level means. If the teams recorded different numbers of observations, weight each mean by its count to recover the overall mean.