Statistics Foundations: Descriptive vs Inferential
The split between descriptive and inferential statistics, worked classification examples, and why it matters in industry — A/B testing, feature engineering and AI bias detection.
1. Descriptive vs. Inferential Statistics
[T]
Statistics divides into two branches.
1.1 Descriptive Statistics
Definition: summarises and explains the data you already have. You describe the dataset in front of you — nothing beyond it.
You are doing descriptive statistics whenever you calculate:
- Mean, median, mode
- Range
- Standard deviation
- Variance
- Absolute deviation
- Quartiles, IQR, percentiles
“If we are taking these kind of metrics — mean, median, mode, range, standard deviation, variance, absolute deviation — for calculating something or for explaining the data, that is descriptive statistics.”
1.2 Inferential Statistics
Definition: take a small sample and infer about the entire population. You generalise beyond the data you actually measured.
You are doing inferential statistics whenever you use:
- Hypothesis testing (null hypothesis vs. alternate hypothesis)
- A/B testing
- Linear regression
- Confidence intervals
Why it exists: measuring the whole population is usually impossible or unaffordable. Netflix has millions of customers — you cannot test a new algorithm on all of them.
1.3 The discriminator
| Question you’re asking | Branch |
|---|---|
| ”What does my data look like?” | Descriptive |
| ”Is this difference real, or chance?” | Inferential |
| ”Can I generalise from my sample?” | Inferential |
1.4 Course notes
- Chapter 1 covers descriptive statistics.
- Chapter 2 onwards covers inferential statistics.
- Both are important and interesting.
- Career note: “If you want to become a data analyst, this chapter is really helpful.” — Chapter 1 is the most directly useful for analyst work.
2. Worked Classification: The Five Opening Examples
[T]
The class opened by asking students to classify five scenarios. This is a standard exam-style question format.
| # | Scenario | Answer | Reasoning |
|---|---|---|---|
| 1 | A university gets a higher rating if placements are good — “good” measured as average salary or median salary | Descriptive | You are computing a summary metric (mean or median) on data you already have |
| 2 | House prices of Chennai — quoted as the median of all houses in Chennai | Descriptive | Again a median computed on the full dataset |
| 3 | Machine A vs. Machine B — 5 sample parts each; decide which machine is better | Descriptive | Solved by comparing mean and then range. No sampling inference is made |
| 4 | A streaming platform wants to know if a new recommendation algorithm increases average watch time. Group A = 52 min/day, Group B = 55 min/day, same sample size. Is the 3-minute difference statistically significant? | Inferential | A/B test on a sample, generalising to the whole user base |
| 5 | There are 1 lakh voters; the survey picks 2,000 people randomly; the claim is made with 95% confidence that a candidate is likely to win | Inferential | Classic sample → population inference with a stated confidence level |
The pattern: Examples 1–3 stop at the calculation. Examples 4–5 ask whether the result holds beyond the sample.
3. Why Statistics Matters — Real Industry Applications
[T]
The instructor devoted a large block to this because “whenever we are calculating simple simple values, it may look simple, but applications are very wide.”
3.1 A/B Testing — the control/treatment framework
Every A/B test splits users into two groups:
| Group | Definition |
|---|---|
| Control | Receives the old / default version — the old algorithm, the existing offer, the current medicine |
| Treatment | Receives the new version being tested — new algorithm, new offer, new medicine |
The framework applies identically across domains:
- Marketing — old offer vs. new offer
- Medical — existing medicine vs. new medicine (testing whether the new one is better)
- Product — old algorithm vs. new algorithm
Case A — Netflix / streaming recommendation algorithm
- Netflix has millions of customers, but you do not test on the whole population.
- 50,000 users receive the old recommendation algorithm → control group
- 50,000 users receive the new recommendation algorithm → treatment group
- Average watch time per day: control = 52 minutes, treatment = 55 minutes
- Observed lift = 3 minutes (55 − 52)
The statistical question: is that 3-minute difference statistically significant, or could it have happened by chance — a statistical fluke?
How it’s answered: hypothesis testing. There are multiple formulas and multiple test statistics available; these are covered in a later chapter.
Case B — Price font size on an e-commerce website
(the instructor’s own company)
- Every product page shows a price. The website was being redesigned.
- Question: does changing the font size of the price affect sales?
- Bold / large price → the customer’s attention goes to the price
- Small price → attention goes to the product type instead
- Nobody knew the answer, so they ran a full A/B test with control and treatment groups.
- Result: no significant difference in sales conversion — neither increasing nor decreasing the font size mattered.
Two lessons: (1) enormous statistical effort goes into changes most people would consider trivial. (2) A negative result is still a valuable result — it tells you not to spend more time on that lever.
Case C — Removing the “unread messages” counter
(the instructor’s own company)
The setup. On a telecom/bank-style website, the customer profile section has tabs — billing, settings, messages, and so on. Next to messages sits a badge showing the number of unread emails: 1, 2, 3…
The problem. Keeping that number correct required a separate API call in the background on every single page load — count the unread messages, return the value, update the display. Those repeated round-trip API calls added latency: the website took several extra seconds to load.
The hypothesis. Customers don’t actually care about that number.
The test. They A/B tested removing the badge entirely to see whether it impacted customer behaviour.
The result. “Customers were not caring at all whether we are popping up or not.” The badge was removed, the unnecessary API call disappeared, and the website loaded fully and faster.
The general rule stated in class: “For all these things — whatever the changes you want to do in your website, and to make sure the customer is happier and it is impacting your sales or not — always do A/B testing.”
3.2 Feature Engineering — creating predictive features
The domain: telecom churn prediction (Airtel used as the example).
The raw data. Companies can easily see how much internet each customer uses. The database holds one row per customer per day: “customer X used Y amount of internet on day Z.”
The problem. “That is a raw feature. That won’t help us very much.” A daily usage log is not directly predictive.
Engineered Feature 1 — the usage delta
Feature = (June month average internet usage) − (July month average internet usage)
Interpretation: if the difference is very high — usage dropped sharply month over month — the customer is likely to churn. They have slowly stopped using the internet and may be about to disconnect the package entirely.
“Churn” defined in class: the customer going out / leaving the provider.
Engineered Feature 2 — the usage standard deviation
Feature = Standard deviation of a customer's daily internet usage
| SD value | What it means |
|---|---|
| Very high | Usage is erratic. Some days heavy use, some days almost none. There is some problem — worth looking into. |
| Almost zero | The customer uses the internet constantly and without issues. Stable, healthy customer. |
What SD is telling you here: “how much it is deviating from the average.”
The headline: “Statistics will help you to create new features which are more predictable. That is the power of statistics.”
Broader point made in class: in day-to-day life, in machine learning, in R&D planning, in your work — you will use statistics knowingly and unknowingly. “Unknowingly” means you don’t always realise the problem you’re solving is a statistical problem.
3.3 AI Model Bias Detection — the Equal Opportunity Score
This example shows that mean and range alone can stop a model from reaching production.
The metric: Equal Opportunity Score — a fairness statistic built on the mean (average) probability score per demographic group.
What it asks: is the model fair, or is it biased with respect to a particular community or ethnicity?
The worked example
Stressed in class: “I’m just giving it for example only. Don’t consider these numbers are real.”
| Group | Group size | Average predicted probability of churn |
|---|---|---|
| Group 1 | 100 people | 0.6 |
| Group 2 (Asian) | 20 people | 0.5 |
| Group 3 | 30 people | 0.9 |
Assessing it:
- 0.6 vs. 0.5 → “very small difference. It is fine.”
- 0.6 vs. 0.9 → “there is a lot of difference.”
- Range across group means = 0.9 − 0.5 = 0.4 → “0.4 is too high. Very high.”
The consequence: “If you take this AI model to the legal team, they will reject it.”
The model does not go to production — regardless of how good its accuracy is, and regardless of whether it is a deep learning model or a traditional machine learning model.
What “equal opportunity” actually means
The average probability score should be almost the same for every group. In the class exchange:
Student: “We should not say that all [values must be equal]. The range should be very less. Right?” Instructor: “Exact same, we will not get anywhere in mathematics. That’s why we’ll say the range should be very, very small.”
So the working criterion is: the range across group means must be very, very small.
A second illustration
The same method applies to a crime-rate prediction model: if the average predicted probability of committing a crime differs sharply across ethnic groups, the model is biased.
The punchline: “Your model should be accepted or rejected is decided by… your statistics guy says ‘hey, your model is biased — I just calculated average probability and range.’ Your model will not go to production.”
The data scientist does not decide whether the model ships. The statistics do. And the two metrics used were a mean and a range.