You do not need to derive formulas to be a good analyst. You do need to know which summary to trust, when a difference is probably real, and when a chart is lying. These are the statistical ideas that come up in everyday analysis work.
Mean vs median: which "average"?
The mean adds everything and divides by the count. The median is the middle value after sorting. They agree when data is symmetric and disagree when it is skewed.
Take order values at a fictional furniture store, WoodNest: most orders are a few thousand rupees, but a handful of bulk office orders are worth lakhs. The mean is pulled up by those few big orders; the median still describes a typical customer.
import numpy as np
orders = np.array([1800, 2200, 2500, 2700, 3100, 3300, 250000])
orders.mean() # pulled up by one large order
np.median(orders) # 2700, the typical orderFor money, time and anything with a long tail (salaries, delivery times, house prices), report the median, or both.
Spread: standard deviation and IQR
Two branches can have the same average delivery time but very different reliability. Standard deviation measures how far values typically sit from the mean. The interquartile range (IQR), the gap between the 25th and 75th percentiles, does the same job but is not distorted by extreme values.
np.std(times)
q1, q3 = np.percentile(times, [25, 75])
iqr = q3 - q1Percentiles: how most customers experience it
"Average delivery time" hides the customers who waited much longer. Operations teams often track the 90th or 95th percentile: "90% of orders arrive within X minutes". It is a better promise to customers, and a better target for the team.
Outliers: investigate before removing
A common rule flags values below Q1 โ 1.5 ร IQR or above Q3 + 1.5 ร IQR. But a flag is a question, not an answer. An outlier might be a data entry error (delete or fix it), a genuine rare event (keep it), or the most important thing in the dataset (a fraud case, a broken machine). Always look at the rows before dropping them.
Distributions: look before you summarise
Plot a histogram before you calculate anything. It shows skew, multiple peaks (often two different groups mixed together) and impossible values (negative ages, dates in the future). Seaborn's histplot and boxplot make this a one-liner.
Correlation is not causation
Correlation measures how strongly two numbers move together, from โ1 to +1.
df[["ad_spend", "sales", "temperature"]].corr()A strong correlation does not mean one causes the other. Ice-cream sales and AC sales both rise in summer; neither causes the other. Before claiming "X drives Y", ask whether a third factor (season, city size, a promotion) could explain both. Also remember correlation only captures straight-line relationships; always look at the scatter plot too.
Samples and populations
You rarely have data on everyone. A survey of some customers, a week of transactions, a pilot in two cities: these are samples. Two questions matter:
- Is the sample representative? A survey answered only by your most loyal customers will look more positive than reality.
- Is it large enough? Small samples swing a lot by chance. A branch with ten orders and one complaint does not necessarily have a worse problem than a branch with a thousand orders and fifty complaints.
A/B tests and "is the difference real?"
When a company tests a new checkout page against the old one, the new page's conversion will almost never be exactly equal to the old one. The question is whether the difference is larger than random noise. That is what hypothesis tests and p-values help answer.
In plain words: the p-value is the chance of seeing a difference at least this large if there were actually no real difference. A small p-value (a common threshold is 0.05) suggests the difference is unlikely to be pure chance. It does not tell you the difference is large or important. A tiny improvement can be "significant" with enough data; always look at the size of the effect too.
Base rates and percentages
- Always ask "percentage of what?" A 50% rise from 2 complaints to 3 is not a crisis.
- Compare rates, not counts, when groups differ in size (complaints per 1,000 orders, not total complaints).
- Watch for Simpson's paradox: a trend that appears in every group can reverse when the groups are combined, because the group sizes differ.
Where statistics meets machine learning
Model evaluation is statistics in disguise: accuracy, precision, recall and error measures are all summaries of how predictions compare with reality. Our ML metrics page and the article on the confusion matrix, precision and recall build directly on the ideas above.
Practise
Compute these summaries yourself on real arrays in our NumPy statistics set, and plot distributions in the Seaborn distributions set.
Practise what you just read
Reading helps; writing the code yourself is what sticks. Start here: