Data Analysis
Simple notes for data analyst and business analyst interviews. Every term is explained the first time it appears. Each topic has an everyday example and small made-up data you can follow by hand.
1. What Data Analysis Is
Data analysis means looking at data to answer a question and help someone make a better decision. Data is simply recorded facts: sales, clicks, marks, prices, ratings.
Think of a doctor. Your temperature, BP and blood test are the data. The doctor reads them, finds the problem and suggests a medicine. An analyst does the same thing for a business.
Key points
- The goal is a decision, not a chart. A chart is only a tool to explain the answer.
- Raw data → information (organised data) → insight (what it means) → action (what to do).
- Good analysis starts with a clear business question. Example: "Why did orders drop last month?"
- Companies use it everywhere: pricing, marketing, stock planning, fraud checks, hiring.
- Data analysis explains what happened and why. Data science goes further and builds models to predict the future.
Small example
| Stage | Example |
|---|---|
| Data | A kirana shop sold 40 packets of Maggi on Monday and 95 on Saturday. |
| Information | Weekend sales are more than double weekday sales. |
| Insight | Families shop on weekends, so demand jumps then. |
| Action | Order extra stock every Friday. |
2. The Data Analyst Role
A data analyst collects, cleans and studies data, then explains the findings to people who are not technical, like managers. A business analyst focuses more on business needs and processes, and uses data to support them.
An analyst is like a translator. The data speaks in numbers. The manager speaks in business. The analyst turns one into the other.
Key points
- Daily work: write SQL queries, clean data in Excel or Python, build dashboards, answer questions from teams.
- Dashboard = a screen of charts and numbers that updates by itself. Built in tools like Power BI or Tableau.
- Stakeholder = the person who asked the question or will use your answer. Example: the marketing head.
- Hard skills: Excel, SQL, basic statistics, one BI tool, some Python.
- Soft skills: asking good questions, clear writing, simple explanations, business sense.
- Common fresher job titles in India: Data Analyst, Business Analyst, MIS Executive, Product Analyst, Analyst Trainee.
| Role | Main question | Main tools |
|---|---|---|
| Data Analyst | What happened and why? | SQL, Excel, Power BI, Python |
| Business Analyst | What does the business need? | Excel, documents, process diagrams, some SQL |
| Data Scientist | What will happen next? | Python, statistics, machine learning |
| Data Engineer | How does data reach everyone safely? | SQL, pipelines, cloud tools |
3. Types of Analytics
There are four types of analytics. Each one answers a different question. They go from easy to hard.
Think about a cricket team that lost a match. "We lost by 20 runs" is descriptive. "Our middle order collapsed" is diagnostic. "We may lose to spin again" is predictive. "Pick one extra batter next match" is prescriptive.
| Type | Question it answers | Business example |
|---|---|---|
| Descriptive | What happened? | Sales were ₹12 lakh in June. |
| Diagnostic | Why did it happen? | Sales fell because a big offer ended. |
| Predictive | What will happen? | July sales will be about ₹11 lakh. |
| Prescriptive | What should we do? | Run a 10% offer on weekends to reach ₹13 lakh. |
Key points
- Descriptive uses totals, averages and charts. Most fresher work is here.
- Diagnostic uses drill-downs (breaking a number into parts) and comparisons.
- Predictive uses past patterns and models, like regression.
- Prescriptive suggests an action, often by testing options.
- Value and difficulty both go up as you move down the table.
4. The Analysis Process
Analysts follow a fixed set of steps. Google's popular version has six: Ask, Prepare, Process, Analyse, Share, Act.
It is like cooking a meal. Decide what to cook (ask), buy the vegetables (prepare), wash and chop them (process), cook (analyse), serve the plate (share), and see if people enjoy it (act).
Key points
- Ask: understand the problem. Use SMART questions: Specific, Measurable, Action-oriented, Relevant, Time-bound.
- Prepare: find and collect the right data. Check it is reliable.
- Process: clean it. Fix blanks, duplicates and wrong formats.
- Analyse: calculate, group, compare, find trends.
- Share: present findings with clear charts and a short story.
- Act: the business makes a decision based on your work.
- CRISP-DM is another famous process with six steps: Business Understanding, Data Understanding, Data Preparation, Modelling, Evaluation, Deployment. It is the same idea, used more in data science.
5. Data Types
Data comes in different shapes. Structured data fits neatly in rows and columns. Unstructured data does not, like photos, videos and free text.
Structured data is like a train timetable: every train has the same columns. Unstructured data is like a WhatsApp group chat: useful, but messy and hard to put in a table.
Structure
- Structured: tables in Excel or a database. Example: an orders table. Easy to query with SQL.
- Semi-structured: has some labels but no fixed table. Example: JSON files, emails (sender, subject, then free text).
- Unstructured: no fixed format. Example: product reviews, images, call recordings. About 80% of company data is like this.
Qualitative vs quantitative
- Quantitative = numbers you can do maths on. Example: price, age, number of orders.
- Qualitative (also called categorical) = labels or groups. Example: city, gender, payment mode.
- Quantitative data is either discrete (counted, whole numbers: 3 children) or continuous (measured, can have decimals: 64.5 kg).
| Column | Value | Type |
|---|---|---|
| customer_city | Jaipur | Qualitative |
| items_in_cart | 3 | Quantitative, discrete |
| order_amount | 459.50 | Quantitative, continuous |
| pin_code | 302001 | Qualitative (it is a label, adding pin codes means nothing) |
6. Levels of Measurement
The level of measurement tells you what maths you are allowed to do with a column. There are four levels: Nominal, Ordinal, Interval, Ratio (remember "NOIR").
Think of a race. Runner names are nominal. Finishing positions (1st, 2nd, 3rd) are ordinal. The start time on a clock is interval. Time taken to finish is ratio.
| Level | What it means | Example | Allowed maths |
|---|---|---|---|
| Nominal | Names or groups, no order | City, blood group, payment mode | Count, mode |
| Ordinal | Groups with an order, but gaps are not equal | Rating: Poor / OK / Good, T-shirt size S/M/L | + median, ranking |
| Interval | Equal gaps, but no true zero | Temperature in °C, calendar year | + add, subtract, mean |
| Ratio | Equal gaps and a true zero | Salary, weight, age, sales | + multiply, divide, "twice as much" |
Key points
- True zero means zero = "none at all". ₹0 salary means no money. But 0 °C does not mean "no temperature".
- That is why 40 °C is not "twice as hot" as 20 °C. But ₹40,000 is twice ₹20,000.
- Ordinal gaps are unequal: the jump from "Poor" to "OK" may not equal "OK" to "Good".
- Nominal and ordinal are qualitative. Interval and ratio are quantitative.
7. Data Sources & Collection
A data source is where data comes from. Primary data is collected by you for your question. Secondary data was collected by someone else, for some other reason.
Primary data is cooking at home: you choose every ingredient. Secondary data is ordering from a restaurant: quick, but you don't know exactly how it was made.
Key points
- Internal sources: the company's own databases, CRM (customer records), sales systems, website logs.
- External sources: government data (data.gov.in, Census), industry reports, Kaggle datasets, public APIs.
- Collection methods: surveys, forms, app tracking, sensors, interviews, web scraping (reading data from websites).
- API (Application Programming Interface) = a doorway that lets one program ask another program for data.
- Check data quality with ROCCC: Reliable, Original, Comprehensive, Current, Cited.
- Be careful with personal data. Collect only what you need and keep it safe. India's DPDP Act 2023 sets rules for this.
| Primary data | Secondary data | |
|---|---|---|
| Who collects | You | Someone else |
| Example | Survey of 200 college students on food habits | Government report on food prices |
| Cost and time | High | Low |
| Fits your question? | Exactly | Maybe not fully |
8. Data Cleaning: Missing Values
Data cleaning means fixing or removing wrong, missing or messy data before analysis. A missing value is an empty cell, often shown as blank, NULL or NaN ("Not a Number").
Cleaning data is like picking stones out of rice before cooking. Skip it, and the whole meal is spoiled.
Ways to handle missing values
- Delete the row: fine if only a few rows are missing and they are random.
- Delete the column: if most of the column is empty (say 70% blank), it may be useless.
- Fill with mean (average): for numbers without extreme values.
- Fill with median (middle value): for numbers with extreme values, like salary.
- Fill with mode (most common value): for categories, like city.
- Fill with a label: write "Unknown" so the gap stays visible.
- Forward fill: copy the previous value. Good for time data, like daily stock prices.
Worked example
| Customer | Age (before) | City (before) | Age (after) | City (after) |
|---|---|---|---|---|
| C1 | 22 | Pune | 22 | Pune |
| C2 | blank | Pune | 30 | Pune |
| C3 | 30 | blank | 30 | Pune |
| C4 | 41 | Nagpur | 41 | Nagpur |
| C5 | blank | Pune | 30 | Pune |
- Known ages: 22, 30, 41. Median = 30 (the middle one). Mean = (22 + 30 + 41) ÷ 3 = 93 ÷ 3 = 31.
- We filled age with the median, 30. Mean (31) would also be fine here.
- Known cities: Pune, Pune, Pune, Nagpur. Mode = Pune. So the blank city becomes Pune.
9. Duplicates, Outliers and Formats
A duplicate is the same record entered twice. An outlier is a value very far from the others. Inconsistent formats means the same thing is written in different ways.
In a class attendance sheet, one student written twice is a duplicate. A student aged 95 is an outlier. "Mumbai", "mumbai" and "Bombay" are inconsistent formats for one city.
Before cleaning
| order_id | city | order_date | amount (₹) |
|---|---|---|---|
| 101 | Mumbai | 05-01-2025 | 450 |
| 102 | mumbai | 2025/01/05 | 520 |
| 102 | mumbai | 2025/01/05 | 520 |
| 103 | Bombay | Jan 6, 2025 | 48000 |
| 104 | Delhi | 06-01-2025 | -300 |
What we fix
- Duplicate: order 102 appears twice. Keep one. Otherwise sales are counted twice.
- Text format: trim extra spaces, use one case, and map "Bombay" to "Mumbai".
- Date format: convert all dates to one standard, like
2025-01-05(YYYY-MM-DD). - Outlier: ₹48,000 is far above the rest. Check it. A bulk order is real. A typo (₹480) should be fixed.
- Invalid value: a negative amount is impossible for a sale. Maybe it is a refund. Ask the data owner.
How to find outliers
- IQR rule: anything below Q1 − 1.5×IQR or above Q3 + 1.5×IQR (see topic 13).
- Z-score rule: anything more than 3 standard deviations from the mean (see topic 12).
- Box plot or scatter plot: outliers stand out visually.
10. Data Wrangling
Data wrangling (also called data transformation or data munging) means reshaping clean data so it is ready for analysis. You add columns, combine tables, change types and summarise.
Cleaning is washing the vegetables. Wrangling is chopping them into the right size and shape for the recipe.
Common steps
- Filter: keep only rows you need. Example: only 2025 orders.
- Derive a column: make a new column from others. Example:
revenue = price × quantity. - Change data type: text "500" → number 500, text "2025-01-05" → a real date.
- Split / combine: "Asha Verma" → first name and last name. Or join them back.
- Merge (join): combine orders with customer details using a shared ID.
- Aggregate: summarise many rows into a few. Example: total sales per city.
- Bin: put numbers into ranges. Example: age 18–25, 26–35, 36+.
- Pivot: turn row values into columns, like a pivot table.
- Normalise / scale: bring numbers to one range, like 0 to 1, so they are easy to compare.
Small example
| product | price | qty | revenue (new) | price band (new) |
|---|---|---|---|---|
| Pen | 20 | 10 | 200 | Low |
| Bag | 900 | 2 | 1800 | High |
| Notebook | 60 | 5 | 300 | Low |
Rule used for the band: price under ₹500 = Low, ₹500 or more = High.
11. Mean, Median, Mode
These three numbers describe the centre of your data, the "typical" value. Mean = average. Median = the middle value after sorting. Mode = the most common value.
If 10 friends share a pizza bill, the mean is what each pays if you split it equally. The median is what the "middle" friend ate. The mode is the topping most people chose.
Worked example
Ravi's tea stall sold this many cups in 8 hours: 2, 4, 4, 4, 5, 5, 7, 9 (already sorted).
| Measure | How to calculate | Answer |
|---|---|---|
| Mean | Sum ÷ count = (2+4+4+4+5+5+7+9) ÷ 8 = 40 ÷ 8 | 5 |
| Median | 8 values, so average the 4th and 5th: (4 + 5) ÷ 2 | 4.5 |
| Mode | 4 appears three times, more than any other | 4 |
Key points
- Odd count: the median is the single middle value. Even count: average the two middle values.
- The mean is pulled by extreme values. The median is not. This is why we say the median is robust.
- Example: salaries ₹20k, ₹25k, ₹30k and the boss's ₹5 lakh. Mean = ₹1,43,750. Median = ₹27,500. The median is the honest "typical" salary.
- Data can have no mode, one mode, or two modes (bimodal).
- Use the mode for categories: "Which payment mode is most popular? UPI."
12. Spread: Range, Variance, Standard Deviation
Spread (or dispersion) tells you how far values are from each other. The centre alone is not enough. Standard deviation (SD) is the average distance of values from the mean.
Two batters both average 40 runs. One scores 38, 40, 42 every match. The other scores 0, 0, 120. Same mean, very different spread. You would trust the first one more.
Worked example (same tea data)
Data: 2, 4, 4, 4, 5, 5, 7, 9. Mean = 5.
| Value (x) | x − mean | (x − mean)² |
|---|---|---|
| 2 | −3 | 9 |
| 4 | −1 | 1 |
| 4 | −1 | 1 |
| 4 | −1 | 1 |
| 5 | 0 | 0 |
| 5 | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
| Total | 0 | 32 |
- Range = max − min = 9 − 2 = 7.
- Population variance = 32 ÷ 8 = 4. Use this when you have all the data.
- Population SD = √4 = 2. So values are typically about 2 cups away from the mean.
- Sample variance = 32 ÷ (8 − 1) = 32 ÷ 7 ≈ 4.57. Use n − 1 when your data is only a sample of a bigger group.
- Sample SD = √4.57 ≈ 2.14.
Key points
- We square the differences so negatives don't cancel positives. (Notice the "x − mean" column adds up to 0.)
- Variance is in squared units ("cups²"), which is hard to read. SD brings it back to normal units ("cups").
- Small SD = values are close together (consistent). Large SD = values are spread out.
- Z-score = (x − mean) ÷ SD. It says how many SDs a value is from the mean. For 9 cups: (9 − 5) ÷ 2 = 2.
- Range is easy but uses only two values, so one outlier can change it a lot.
- In Excel:
=VAR.S(),=STDEV.S()for samples;=VAR.P(),=STDEV.P()for populations.
13. Percentiles, Quartiles and IQR
A percentile tells you what percent of values are below a point. Quartiles cut sorted data into four equal parts. The IQR (interquartile range) is the spread of the middle 50%.
If you are at the 90th percentile in CAT, you scored more than 90% of test-takers. It is about your position, not your marks.
Worked example
11 order values in ₹ hundreds, sorted: 10, 12, 14, 15, 16, 18, 20, 22, 25, 28, 90
| Measure | How | Answer |
|---|---|---|
| Q2 (median, 50th percentile) | Middle (6th) value | 18 |
| Q1 (25th percentile) | Median of lower half: 10, 12, 14, 15, 16 | 14 |
| Q3 (75th percentile) | Median of upper half: 20, 22, 25, 28, 90 | 25 |
| IQR | Q3 − Q1 = 25 − 14 | 11 |
| Lower fence | Q1 − 1.5 × IQR = 14 − 16.5 | −2.5 |
| Upper fence | Q3 + 1.5 × IQR = 25 + 16.5 | 41.5 |
90 is above the upper fence of 41.5, so 90 is an outlier. Also notice: mean = 270 ÷ 11 ≈ 24.5, but median = 18. The outlier pulls the mean up.
Key points
- 25th percentile = Q1, 50th = median = Q2, 75th = Q3.
- IQR ignores the top 25% and bottom 25%, so outliers don't affect it. Use it for skewed data.
- Different tools use slightly different methods. Excel's
QUARTILE.INCgives Q1 = 14.5 and Q3 = 23.5 for this data. Both are acceptable; just say which you used. - Business use: "90th percentile delivery time is 40 minutes" means 90% of orders arrive within 40 minutes.
14. Distributions and Skew
A distribution shows how often each value appears. You see it with a histogram, a bar chart of value ranges. Its shape tells a story.
Heights of students in a class form a hill: most are medium, a few are very short or very tall. That hill shape is the normal distribution.
Key points
- Normal distribution: bell-shaped and symmetric. Mean = median = mode.
- 68–95–99.7 rule: in a normal distribution, about 68% of values are within 1 SD of the mean, 95% within 2 SD, and 99.7% within 3 SD.
- Example: exam marks with mean 60 and SD 10. About 68% of students score 50–70, and 95% score 40–80.
- Right skew (positive): long tail of big values. Mean > median. Examples: income, house prices, order values.
- Left skew (negative): long tail of small values. Mean < median. Example: marks in a very easy exam.
- Uniform distribution: all values equally likely, like rolling a fair dice.
- Bimodal: two peaks. Often means two groups are mixed, like weekday and weekend orders.
15. Correlation vs Causation
Correlation means two things move together. Causation means one thing actually makes the other happen. Correlation does not prove causation.
Ice cream sales and drowning cases both rise in summer. Ice cream does not cause drowning. Hot weather causes both. Hot weather is the hidden third factor.
Key points
- The correlation coefficient (r, Pearson's r) goes from −1 to +1.
- +1 = perfect positive (both go up together). −1 = perfect negative (one up, other down). 0 = no straight-line link.
- Rough guide: |r| above 0.7 = strong, 0.3 to 0.7 = moderate, below 0.3 = weak.
- r only measures straight-line links. A curved pattern can have r near 0.
- A confounding variable is a hidden third factor that affects both things (like hot weather above).
- To prove causation, run a controlled experiment, like an A/B test (topic 20).
- In Excel:
=CORREL(A2:A6, B2:B6).
Small example
| Study hours | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Marks | 40 | 50 | 55 | 65 | 70 |
Here r ≈ 0.99, a very strong positive correlation. But the link is still only proven to be a pattern, not a cause.
16. Probability Basics
Probability is how likely something is to happen. It goes from 0 (impossible) to 1 (certain). 0.5 means a 50% chance.
A weather app saying "70% chance of rain" is probability. It doesn't promise rain. It says: on 10 days like this, it rains on about 7.
Key points
- Basic formula: P(event) = favourable outcomes ÷ total outcomes.
- Rolling a 4 on a dice: 1 ÷ 6 ≈ 0.167.
- NOT rule: P(not A) = 1 − P(A). Not rolling a 4 = 5 ÷ 6.
- AND rule (independent events, one does not affect the other): multiply. Two heads in two coin tosses = 0.5 × 0.5 = 0.25.
- OR rule (events that can't both happen): add. Rolling a 1 or a 2 = 1/6 + 1/6 = 1/3.
- Conditional probability P(A | B) = chance of A, given B already happened. Read "|" as "given".
- Expected value = the long-run average result. Sum of (value × probability).
Business example
| Bought | Did not buy | Total | |
|---|---|---|---|
| Used a coupon | 60 | 140 | 200 |
| No coupon | 40 | 760 | 800 |
| Total | 100 | 900 | 1000 |
- P(buy) = 100 ÷ 1000 = 0.10 (10%).
- P(buy | coupon) = 60 ÷ 200 = 0.30 (30%).
- P(buy | no coupon) = 40 ÷ 800 = 0.05 (5%).
- Expected value of a lucky draw: 10% chance to win ₹500, else ₹0. EV = 0.1 × 500 + 0.9 × 0 = ₹50.
17. Sampling
The population is the whole group you care about. A sample is a smaller part you actually study. We use samples because checking everyone is too slow or costly.
To check if dal is salty, you taste one spoon, not the whole pot. But you must stir first. Stirring is what makes the sample fair.
Sampling methods
| Method | How it works | Example |
|---|---|---|
| Simple random | Everyone has an equal chance | Pick 100 roll numbers by lottery |
| Stratified | Split into groups, then sample randomly from each | Pick 50 students from each year |
| Systematic | Pick every k-th item | Every 10th customer in the bill list |
| Cluster | Pick whole groups at random | Pick 5 colleges and survey everyone there |
| Convenience | Whoever is easy to reach (not random) | Asking only your friends |
Key points
- Sampling bias = the sample does not represent the population. Example: an online survey misses people without internet.
- Bigger samples give more reliable answers, but only if they are not biased.
- Margin of error = how far the sample answer may be from the true answer. "40% ± 3%" means the truth is probably 37–43%.
- Central Limit Theorem (simple version): if you take many large samples and calculate each sample's mean, those means form a normal curve. This is why many tests work even when the data is not normal.
- Survivorship bias = studying only the winners. Example: only studying apps that succeeded, ignoring the ones that failed.
18. Hypothesis Testing
Hypothesis testing checks whether a difference you see is real, or just luck. A hypothesis is a claim you want to test.
It works like a court. The accused is "innocent until proven guilty". Here, we assume "nothing changed" until the evidence is strong enough to say otherwise.
Key terms
- Null hypothesis (H0): "no effect, no difference". Example: the new button does not change sales.
- Alternative hypothesis (H1): "there is an effect". Example: the new button changes sales.
- Significance level (α, alpha): how much risk of a false alarm you accept. Usually 0.05 (5%).
- p-value: if H0 were true, how likely is a result at least this extreme? Small p = the result is surprising under H0.
- If p < 0.05 → reject H0. The result is "statistically significant".
- If p ≥ 0.05 → fail to reject H0. Not enough evidence. (We never say "H0 is proven true".)
Steps
- Write H0 and H1.
- Choose α (usually 0.05).
- Pick the right test (see topic 19).
- Calculate the test statistic and p-value (Excel or Python does this).
- Compare p with α and decide.
- Explain the result in plain business words.
Example
A coaching centre says its new method raises average marks. Old average = 60. A sample of new students averages 64. Test gives p = 0.03.
- H0: new method average = 60. H1: new method average ≠ 60.
- p = 0.03 is less than 0.05 → reject H0. The improvement is unlikely to be just luck.
19. Common Tests and Errors
Different questions need different tests. A t-test compares averages. A chi-square test compares counts in categories.
Choosing a test is like choosing a tool. You use a ruler for length and a weighing scale for weight. Averages and category counts need different tools too.
| Test | Use it when… | Example question |
|---|---|---|
| One-sample t-test | Compare one group's mean to a fixed number | Is average delivery time different from 30 min? |
| Two-sample t-test | Compare means of two separate groups | Do Section A and B have different average marks? |
| Paired t-test | Same people, before vs after | Did marks improve after training? |
| Z-test | Like a t-test, for large samples (often 30+) or proportions | Is the conversion rate different? |
| ANOVA | Compare means of 3 or more groups | Do 3 cities have different average order values? |
| Chi-square test | Check if two category columns are related | Is payment mode related to city? |
Chi-square worked example
| Observed | UPI | Cash | Total |
|---|---|---|---|
| Mumbai | 60 | 40 | 100 |
| Patna | 40 | 60 | 100 |
| Total | 100 | 100 | 200 |
- Expected count if there is no link = (row total × column total) ÷ grand total = 100 × 100 ÷ 200 = 50 for every cell.
- For each cell: (observed − expected)² ÷ expected = (10)² ÷ 50 = 2. Four cells → chi-square = 2 + 2 + 2 + 2 = 8.
- For a 2×2 table at α = 0.05, the cut-off value is 3.84. 8 > 3.84, so p is small (about 0.005). Payment mode is related to city.
Type I and Type II errors
| H0 is actually true | H0 is actually false | |
|---|---|---|
| We reject H0 | Type I error (false positive, false alarm). Chance = α. | Correct |
| We don't reject H0 | Correct | Type II error (false negative, missed it). Chance = β. |
- Type I example: a COVID test says "positive" for a healthy person.
- Type II example: a COVID test says "negative" for a sick person.
- Power = 1 − β = the chance of catching a real effect. Bigger samples give more power.
- Confidence interval: a range that likely holds the true value. "Average spend is ₹450, 95% CI ₹420–₹480."
20. A/B Testing
An A/B test is an experiment. You show version A to one random group and version B to another, then compare results. It is hypothesis testing used in real products.
A chai seller makes two recipes and gives each to random customers for a week. Whichever recipe gets more repeat buyers wins. Random groups make it fair.
Steps
- Pick one goal metric. Example: conversion rate = buyers ÷ visitors.
- Write H0 ("no difference") and H1.
- Change only one thing. Example: button colour, or price shown.
- Split users randomly: A = control (old), B = variant (new).
- Decide sample size and run time in advance. Run at least one full week to cover weekdays and weekends.
- Check significance, then decide.
Worked example
| Version | Visitors | Orders | Conversion |
|---|---|---|---|
| A (old "Buy" button) | 5,000 | 200 | 4.0% |
| B (new "Buy Now" button) | 5,000 | 250 | 5.0% |
- Absolute lift = 5.0% − 4.0% = 1 percentage point.
- Relative lift = 1 ÷ 4 = 25% better.
- A two-proportion z-test gives p ≈ 0.016, which is less than 0.05. So B is a real winner, not luck.
Common mistakes
- Peeking: stopping the test as soon as it looks good. This creates false winners.
- Changing many things at once, so you don't know what worked.
- Too small a sample, or too short a run.
- Ignoring guardrail metrics: metrics that must not get worse, like refunds or app crashes.
21. Regression Basics
Regression finds a line (formula) that best links an input to an output, so you can predict. The input is the independent variable (x). The output is the dependent variable (y).
An auto-rickshaw fare is a base charge plus a fixed amount per km. Regression finds that "base + rate × distance" formula from past rides.
Simple linear regression
Formula: y = a + b × x
- a = intercept: the value of y when x is 0 (the base charge).
- b = slope: how much y changes when x goes up by 1 (the per-km rate).
Worked example (study hours data from topic 15)
| Hours (x) | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Marks (y) | 40 | 50 | 55 | 65 | 70 |
- Mean of x = 3. Mean of y = 280 ÷ 5 = 56.
- Slope b = Σ(x − x̄)(y − ȳ) ÷ Σ(x − x̄)² = 75 ÷ 10 = 7.5.
- Intercept a = ȳ − b × x̄ = 56 − 7.5 × 3 = 33.5.
- Line: marks = 33.5 + 7.5 × hours. Each extra hour adds about 7.5 marks.
- Prediction for 6 hours: 33.5 + 7.5 × 6 = 33.5 + 45 = 78.5.
Key points
- Residual = actual − predicted. For 3 hours: predicted 56, actual 55, residual = −1.
- The best line makes the sum of squared residuals as small as possible. This is called least squares.
- R² (R-squared) goes from 0 to 1. It is the share of the change in y that the model explains. Here R² ≈ 0.99, which is a great fit.
- Multiple regression uses many inputs: sales = a + b1 × ad spend + b2 × discount.
- Logistic regression predicts a yes/no outcome, like "will this customer leave?"
- Don't predict far outside your data. 20 hours of study won't give 183.5 marks!
- In Excel:
=SLOPE(),=INTERCEPT(),=RSQ(), or add a trendline to a scatter chart.
22. Exploratory Data Analysis (EDA)
EDA means exploring a new dataset to understand it before doing any serious analysis. You look at its size, columns, gaps, ranges and patterns.
EDA is like walking around a new city on day one. You learn the main roads and landmarks before planning any trip.
A simple EDA checklist
- Shape: how many rows and columns?
- Columns and types: which are numbers, text, dates?
- Missing values: how many blanks in each column?
- Duplicates: any repeated rows?
- Summary stats: min, max, mean, median, SD for number columns.
- Counts for category columns: how many orders per city?
- Univariate (one column at a time): histograms, box plots.
- Bivariate (two columns together): scatter plots, correlation, grouped averages.
- Time trends: line chart by day, week, month.
- Write down questions that come up. They guide the next step.
Example findings from an EDA
| Check | Finding | Next step |
|---|---|---|
| Missing values | 8% of delivery_time is blank | Ask if cancelled orders cause it |
| Summary stats | Max order = ₹1,20,000, median = ₹380 | Check the big order: error or bulk buy? |
| Category counts | 70% of orders come from 2 cities | Analyse those cities separately |
| Time trend | Orders spike every Sunday | Plan staff and offers for Sundays |
df.shape, df.info(), df.describe() and df.isnull().sum() cover most of it in four lines.23. KPIs and Metrics
A metric is any number you track. A KPI (Key Performance Indicator) is one of the few most important metrics that show if the business is meeting its goals.
In a car, many dials exist, but the speedometer and fuel gauge are the ones you watch while driving. Those are the KPIs.
Common business metrics
| Metric | Formula | Example |
|---|---|---|
| Revenue | Price × units sold | ₹500 × 2,000 = ₹10,00,000 |
| AOV (Average Order Value) | Revenue ÷ number of orders | ₹10,00,000 ÷ 2,500 = ₹400 |
| Conversion rate | Buyers ÷ visitors × 100 | 300 ÷ 10,000 = 3% |
| Churn rate | Customers lost ÷ customers at start × 100 | 50 ÷ 1,000 = 5% per month |
| Retention rate | (Customers at end − new customers) ÷ customers at start × 100 | (1,050 − 100) ÷ 1,000 = 95% |
| CAC (Customer Acquisition Cost) | Marketing spend ÷ new customers | ₹5,00,000 ÷ 1,000 = ₹500 |
| LTV / CLV (Lifetime Value) | AOV × orders per year × years as a customer | ₹400 × 3 × 2 = ₹2,400 |
| LTV : CAC | LTV ÷ CAC | ₹2,400 ÷ ₹500 = 4.8 (healthy if above 3) |
| DAU / MAU | Daily active users ÷ monthly active users | 20,000 ÷ 1,00,000 = 20% ("stickiness") |
| Gross margin | (Revenue − cost of goods) ÷ revenue × 100 | (₹10 L − ₹6 L) ÷ ₹10 L = 40% |
Key points
- Churn and retention are opposites: 5% churn = 95% retention (when you ignore new customers).
- A good KPI is clear, measurable, linked to a goal, and actionable.
- Vanity metric = looks good but doesn't help decisions. Example: total app downloads (many people never open the app).
- North Star metric = the one metric that best shows customer value. Example: for a food app, "orders delivered per week".
- Leading indicator predicts the future (website visits). Lagging indicator shows the past result (monthly revenue).
- Simple LTV above uses revenue. A stricter version multiplies by profit margin.
24. Cohort Analysis
A cohort is a group of users who share a starting point, like "everyone who signed up in January". Cohort analysis tracks each group over time to see how they behave.
A school tracks each batch separately: the 2022 batch, the 2023 batch. Comparing batches shows if teaching got better, which a single school-wide average would hide.
Worked example: monthly retention
| Signup month | Users | Month 0 | Month 1 | Month 2 | Month 3 |
|---|---|---|---|---|---|
| Jan | 200 | 100% | 60% (120) | 45% (90) | 40% (80) |
| Feb | 250 | 100% | 56% (140) | 40% (100) | — |
| Mar | 300 | 100% | 65% (195) | — | — |
How to read it
- Each row is one cohort. Each column is "months since signup".
- Read across a row: how one group drops off. Jan users fall from 100% to 40% in 3 months.
- Read down a column: compare groups at the same age. Month 1: Jan 60%, Feb 56%, Mar 65%.
- March's Month-1 retention is the best. Ask: what changed in March? Maybe a new onboarding flow.
- Blank cells (—) are months that have not happened yet. This makes a triangle shape.
- Cohorts can also be by first purchase month, acquisition channel or city.
25. Funnel Analysis
A funnel is the series of steps a user takes toward a goal, like buying. Funnel analysis counts how many users reach each step and where they drop off.
Think of a kitchen funnel: wide at the top, narrow at the bottom. Many people visit a shop window, fewer walk in, fewer try clothes, and only some pay at the counter.
Worked numbers
| Step | Users | Step conversion | Drop-off | From top |
|---|---|---|---|---|
| Visit | 10,000 | — | — | 100% |
| View product | 6,000 | 60% | 4,000 | 60% |
| Add to cart | 1,800 | 30% | 4,200 | 18% |
| Checkout | 900 | 50% | 900 | 9% |
| Purchase | 600 | 66.7% | 300 | 6% |
Key points
- Step conversion = users at this step ÷ users at the previous step.
- Overall conversion = users at the last step ÷ users at the first step = 6%.
- Here, "view → add to cart" is the weakest step (30%). Ideas: better photos, clearer prices, reviews.
- Split the funnel by device, city or traffic source. Often one segment (like Android) causes the drop.
- Funnels show where users leave. Surveys, session recordings or A/B tests show why.
26. Excel for Analysts
Excel (or Google Sheets) is the most common analyst tool. You must know lookups, conditional formulas and pivot tables. A formula always starts with =.
Excel is like a calculator that remembers. You set up the maths once, and it updates itself when the numbers change.
Sample sheet (cells A1:C6)
| A (Name) | B (City) | C (Sales ₹) | |
|---|---|---|---|
| 2 | Asha | Pune | 500 |
| 3 | Ravi | Delhi | 300 |
| 4 | Neha | Pune | 700 |
| 5 | Arjun | Mumbai | 400 |
| 6 | Kiran | Delhi | 600 |
Must-know formulas
| Formula | What it does | Result |
|---|---|---|
=VLOOKUP("Neha", A2:C6, 3, FALSE) | Find "Neha" in the first column, return the 3rd column. FALSE = exact match. | 700 |
=XLOOKUP("Kiran", A2:A6, C2:C6, "Not found") | Newer, simpler lookup. Can look left, has a built-in "not found" value. | 600 |
=INDEX(C2:C6, MATCH("Arjun", A2:A6, 0)) | MATCH finds the row number (4); INDEX returns that row's value. | 400 |
=IF(C2>=500, "Target met", "Below") | Checks a condition and returns one of two values. | Target met |
=SUMIFS(C2:C6, B2:B6, "Pune") | Adds sales where city is Pune. | 1200 |
=COUNTIFS(B2:B6, "Delhi") | Counts rows where city is Delhi. | 2 |
=SUMIFS(C2:C6, B2:B6, "Delhi", C2:C6, ">400") | Adds sales for Delhi AND above 400 (many conditions). | 600 |
=AVERAGEIFS(C2:C6, B2:B6, "Delhi") | Average sales for Delhi. | 450 |
Pivot table
A pivot table summarises a big table by dragging fields. Put City in Rows and Sales in Values (Sum):
| City | Sum of Sales |
|---|---|
| Delhi | 900 |
| Mumbai | 400 |
| Pune | 1200 |
| Grand Total | 2500 |
Other key points
- VLOOKUP only looks to the right and breaks if you insert a column. INDEX-MATCH and XLOOKUP fix both problems.
- Conditional formatting colours cells by rules. Example: red if sales < 400, or a colour scale (heat map).
$A$1is an absolute reference: it does not shift when you copy the formula.A1shifts.- Also useful:
TRIM(remove extra spaces),CONCAT,LEFT/RIGHT,TEXT,IFERROR, Remove Duplicates, Data Validation, charts. - Power Query (in Excel) cleans and combines data with clicks, and repeats the steps on new data.
27. SQL Basics for Analysts
SQL (Structured Query Language) is how you ask a database for data. A query is one question written in SQL. Analysts mostly read data with SELECT.
SQL is like giving a librarian a clear note: "Get me all books by this author, after 2015, sorted by title." You say what you want; the database finds it.
Table: orders
| order_id | customer | city | amount | order_date |
|---|---|---|---|---|
| 1 | Asha | Pune | 500 | 2025-01-01 |
| 2 | Ravi | Delhi | 300 | 2025-01-02 |
| 3 | Neha | Pune | 700 | 2025-01-03 |
| 4 | Arjun | Mumbai | 400 | 2025-01-04 |
| 5 | Kiran | Delhi | 600 | 2025-01-05 |
Key clauses
SELECT= which columns.FROM= which table.WHERE= filter rows, before grouping.GROUP BY= make groups, then use aggregate functions (functions that summarise many rows):COUNT,SUM,AVG,MIN,MAX.HAVING= filter groups, after grouping.ORDER BY= sort (DESCfor biggest first).LIMIT= keep only the first few rows.DISTINCT= remove repeated values.CASE WHEN= an IF statement inside SQL.
-- Orders above ₹400, biggest first
SELECT customer, amount
FROM orders
WHERE amount > 400
ORDER BY amount DESC;
-- Result: Neha 700, Kiran 600, Asha 500
-- Total sales per city, only cities above ₹500
SELECT city, SUM(amount) AS total_sales, COUNT(*) AS orders
FROM orders
GROUP BY city
HAVING SUM(amount) > 500
ORDER BY total_sales DESC;
-- Result: Pune 1200 (2 orders), Delhi 900 (2 orders). Mumbai (400) is filtered out.
-- Label each order with CASE WHEN
SELECT customer,
CASE WHEN amount >= 500 THEN 'High' ELSE 'Low' END AS order_size
FROM orders;
Order in which SQL runs
- This is why you cannot use a SELECT alias (like
total_sales) inside WHERE in most databases: WHERE runs before SELECT. COUNT(*)counts all rows.COUNT(column)skips NULLs.NULLmeans "unknown". Check it withIS NULL, never= NULL.
28. SQL Joins and Window Functions
A JOIN combines rows from two tables using a shared column, like a customer ID. A window function does a calculation across related rows but still keeps every row.
A join is like matching students' names on the attendance sheet with their marks sheet. A window function is like writing each student's class rank next to their marks, without merging the class into one row.
Join example
| customers | orders | |||
|---|---|---|---|---|
| id | name | customer_id | amount | |
| 1 | Asha | 1 | 500 | |
| 2 | Ravi | 1 | 200 | |
| 3 | Neha | 3 | 700 | |
| 4 | 300 | |||
SELECT c.name, o.amount
FROM customers c
LEFT JOIN orders o ON o.customer_id = c.id;
| Join | Rows returned |
|---|---|
| INNER JOIN | Asha 500, Asha 200, Neha 700 (3 rows) |
| LEFT JOIN | Asha 500, Asha 200, Ravi NULL, Neha 700 (4 rows) |
| FULL OUTER JOIN | The 4 LEFT JOIN rows + NULL 300 (order for customer 4, who is missing) |
- Find customers who never ordered: LEFT JOIN, then
WHERE o.customer_id IS NULL→ Ravi. - One customer with many orders appears many times after a join. Watch out for double counting.
- Self join = a table joined to itself. Example: employees and their managers in one table.
Window functions
Uses the orders table from topic 27. Format: FUNCTION() OVER (PARTITION BY ... ORDER BY ...). PARTITION BY = split into groups. ORDER BY = order inside each group.
-- Rank orders inside each city
SELECT customer, city, amount,
RANK() OVER (PARTITION BY city ORDER BY amount DESC) AS city_rank
FROM orders;
-- Running total of sales by date
SELECT order_date, amount,
SUM(amount) OVER (ORDER BY order_date) AS running_total
FROM orders;
-- Previous order's amount (for day-over-day change)
SELECT order_date, amount,
LAG(amount) OVER (ORDER BY order_date) AS prev_amount
FROM orders;
| order_date | amount | running_total | prev_amount |
|---|---|---|---|
| 2025-01-01 | 500 | 500 | NULL |
| 2025-01-02 | 300 | 800 | 500 |
| 2025-01-03 | 700 | 1500 | 300 |
| 2025-01-04 | 400 | 1900 | 700 |
| 2025-01-05 | 600 | 2500 | 400 |
- City ranks: Pune → Neha 1, Asha 2. Delhi → Kiran 1, Ravi 2. Mumbai → Arjun 1.
ROW_NUMBER= 1, 2, 3, 4 (always unique).RANK= 1, 2, 2, 4 (ties share, then skip).DENSE_RANK= 1, 2, 2, 3 (ties share, no skip).LAG= previous row's value.LEAD= next row's value.- GROUP BY squeezes rows into one per group. Window functions keep all rows.
- Classic question: "2nd highest salary per department" →
DENSE_RANK() ... = 2in a subquery or CTE (a named temporary result made withWITH).
29. Python and pandas for Analysts
Python is a programming language. pandas is a Python library (ready-made code) for working with tables. A pandas table is called a DataFrame. matplotlib is a library for charts.
pandas is like Excel with a remote control. Instead of clicking, you write steps once, and you can re-run them on new data any day.
Core commands
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv("orders.csv") # load a CSV file into a DataFrame
df.head() # first 5 rows
df.shape # (rows, columns), e.g. (5, 5)
df.info() # column names, types, non-null counts
df.describe() # count, mean, std, min, quartiles, max
df.isnull().sum() # missing values per column
# Select and filter
df["amount"] # one column
df[df["amount"] > 400] # rows where amount is above 400
df[(df["city"] == "Pune") & (df["amount"] > 400)] # two conditions
# Clean
df = df.drop_duplicates() # remove repeated rows
df["amount"] = df["amount"].fillna(df["amount"].median()) # fill blanks with median
df["city"] = df["city"].str.strip().str.title() # " pune" -> "Pune"
df["order_date"] = pd.to_datetime(df["order_date"]) # text -> real date
# New column
df["high_value"] = df["amount"] >= 500
# Group and summarise (like GROUP BY / pivot table)
city_sales = df.groupby("city")["amount"].sum().sort_values(ascending=False)
# city
# Pune 1200
# Delhi 900
# Mumbai 400
# Join two tables (like SQL JOIN)
customers = pd.read_csv("customers.csv")
merged = df.merge(customers, left_on="customer_id", right_on="id", how="left")
# Simple bar chart
city_sales.plot(kind="bar", title="Sales by city")
plt.ylabel("Sales (₹)")
plt.show()
Key points
how="left"in merge = LEFT JOIN. Options:"inner","left","right","outer".df.pivot_table(index="city", values="amount", aggfunc="sum")= an Excel pivot table.value_counts()counts each category:df["city"].value_counts().- Use
&(and),|(or) with brackets around each condition. Plainandgives an error. - NumPy = fast maths on arrays; pandas is built on it. seaborn = nicer statistical charts.
- Most analysts write Python in Jupyter Notebook or Google Colab: code, output and notes in one page.
30. Common Tools Overview
Each tool has a job. You don't need all of them. Most fresher roles want Excel + SQL + one BI tool, and Python is a big plus. A BI tool (Business Intelligence) builds interactive dashboards.
Tools are like vehicles. A cycle (Excel) is fine for short trips. A car (SQL, Python) handles long trips. A bus (BI tool) carries the results to many people.
| Tool | Best for | Note |
|---|---|---|
| Excel / Google Sheets | Small data, quick analysis, pivots | Slows down beyond about a million rows |
| SQL (MySQL, PostgreSQL, SQL Server, BigQuery) | Pulling and summarising data from databases | The most important analyst skill |
| Python (pandas, matplotlib, seaborn) | Big or messy data, automation, statistics | Use in Jupyter or Colab |
| R | Statistics and research | Less common than Python in Indian jobs |
| Power BI | Dashboards, works well with Excel | Very common in Indian companies; uses DAX formulas |
| Tableau | Dashboards and visual exploration | Drag and drop; Tableau Public is free |
| Looker Studio | Free Google dashboards | Easy with Google Sheets and Analytics |
| Google Analytics | Website and app traffic | Source for funnel and traffic data |
- ETL (Extract, Transform, Load) = moving data from sources, cleaning it, and loading it into a data warehouse (a big central database for analysis).
- Data lake = a store for raw data of any type, cleaned later.
31. Charts and Storytelling with Data
Data storytelling means explaining your findings as a short, clear story: what happened, why it matters, and what to do. The right chart makes the point obvious in seconds.
A good analyst is like a news reporter. The headline comes first ("Sales fell 15% in March"). Details and proof come after. Nobody reads a news story that starts with a table of numbers.
Choosing a chart
| Goal | Best chart | Example |
|---|---|---|
| Compare categories | Bar chart | Sales by city |
| Show change over time | Line chart | Daily orders this month |
| Show parts of a whole | Stacked bar, or pie with 2–4 slices | Share of UPI vs card vs cash |
| Show a distribution | Histogram, box plot | Spread of order values |
| Show a relationship | Scatter plot | Ad spend vs sales |
| Show one key number | KPI card (big number) | This month's revenue: ₹12.4 L |
| Show steps and drop-off | Funnel chart | Visit → cart → buy |
A simple story structure
- Context: what question were we answering?
- Finding: the one main insight, in one sentence.
- Evidence: one or two charts that prove it.
- Recommendation: what the business should do next.
- Impact: what we expect to gain (money, users, time).
Good chart habits
- Give charts a title that states the finding: "Android orders fell 23% after the app update", not "Orders by platform".
- Bar charts must start at zero. Otherwise small differences look huge.
- Remove clutter: 3D effects, heavy grid lines, too many colours.
- Use one highlight colour for the thing that matters, and grey for the rest.
- Avoid pie charts with many slices. People can't compare angles well.
- Know your audience. A CEO wants the answer and the action. A fellow analyst wants the method.
32. Case Study: Why Did Orders Drop?
Here is a full, small example that uses the six steps. Interviewers often give a case like this and ask, "How would you approach it?"
It is like detective work. You start with a crime (the drop), collect clues (data), rule out suspects (segments) and name the culprit with proof.
1. Ask
A food delivery app in Pune saw orders fall from 40,000 in February to 34,000 in March. That is a drop of 6,000, or 6,000 ÷ 40,000 = 15%. Question: "Why did March orders fall 15%, and how do we recover?"
2. Prepare
- Pull orders, app sessions and funnel events for Feb and March using SQL.
- Collect context: app release dates, offers, competitor news, weather, holidays.
3. Process
- Remove 300 duplicate test orders. Standardise area names. Convert timestamps to dates.
4. Analyse
Break the drop into segments (a drill-down):
| Platform | Feb orders | March orders | Change |
|---|---|---|---|
| iOS | 14,000 | 14,000 | 0% |
| Android | 26,000 | 20,000 | −23% |
| Total | 40,000 | 34,000 | −15% |
- The whole drop (6,000) is on Android. iOS is flat. So it is not weather, prices or a competitor, which would affect both.
- Funnel check on Android: "cart → payment success" fell from 80% to 62% starting 5 March.
- An Android app update was released on 5 March. Error logs show a UPI payment bug in that version.
5. Share
Headline: "The March drop is caused by a UPI payment bug in the 5 March Android update. Fixing it should recover about 6,000 orders a month." Support it with one line chart of Android vs iOS daily orders and one funnel chart.
6. Act
- Engineering fixes the bug and releases a patch.
- Send affected users a small coupon to win them back.
- Set up an alert: if payment success falls below 75% on any platform, notify the team.
- Check the recovery in April with the same dashboard.
Quick Revision
The most-asked questions, with short and simple answers. Say these in your own words.
Basics & Process
- What is data analysis? Studying data to answer a question and support a decision.
- What does a data analyst do? Collects, cleans and analyses data, then explains findings with charts and dashboards.
- Four types of analytics? Descriptive (what), diagnostic (why), predictive (what next), prescriptive (what to do).
- Steps of analysis? Ask, Prepare, Process, Analyse, Share, Act.
- Structured vs unstructured? Rows and columns vs free form like text, images and audio.
- Levels of measurement? Nominal, Ordinal, Interval, Ratio (NOIR).
- Primary vs secondary data? Collected by you vs collected by someone else.
Cleaning
- How do you handle missing values? Find out why, then delete, or fill with mean, median, mode or "Unknown".
- Mean or median to fill blanks? Median if there are outliers or skew; mean if data is symmetric.
- How do you find outliers? IQR rule, z-score above 3, or a box plot.
- Should you delete outliers? Only if they are errors. Real extremes can be important.
- Cleaning vs wrangling? Cleaning fixes errors. Wrangling reshapes data for analysis.
Statistics
- Mean vs median? Mean is the average and is pulled by outliers. Median is the middle and is robust.
- What is standard deviation? The typical distance of values from the mean.
- Why n − 1 for sample variance? A sample slightly underestimates spread; n − 1 corrects it.
- What is IQR? Q3 − Q1, the spread of the middle 50%.
- Right skew? Long tail to the right; mean > median. Example: income.
- 68–95–99.7 rule? In a normal curve, 68% within 1 SD, 95% within 2, 99.7% within 3.
- Correlation vs causation? Moving together vs one causing the other. Prove cause with experiments.
- What is a p-value? How surprising the data is if the null hypothesis were true. Below 0.05 → significant.
- Type I vs Type II error? False alarm vs missed real effect.
- t-test vs chi-square? t-test compares means; chi-square checks if categories are related.
- What is an A/B test? Random split into control and variant, change one thing, compare a metric.
- What is R²? How much of the change in y the model explains, from 0 to 1.
Business Metrics
- Conversion rate? Buyers ÷ visitors.
- Churn rate? Customers lost ÷ customers at the start of the period.
- CAC and LTV? Cost to win one customer vs total value a customer brings. LTV:CAC above 3 is healthy.
- What is cohort analysis? Tracking groups that started at the same time to compare behaviour fairly.
- What is funnel analysis? Counting users at each step to find where they drop off.
- KPI vs metric? Every KPI is a metric, but only the few most important metrics are KPIs.
Tools
- VLOOKUP vs XLOOKUP? XLOOKUP can look left, defaults to exact match and has a "not found" value.
- Why INDEX-MATCH? Works in any direction and does not break when columns are inserted.
- SUMIF vs SUMIFS? SUMIF takes one condition; SUMIFS takes many.
- WHERE vs HAVING? WHERE filters rows before grouping; HAVING filters groups after.
- INNER vs LEFT JOIN? INNER keeps only matches; LEFT keeps all left rows, with NULLs where no match.
- RANK vs DENSE_RANK vs ROW_NUMBER? 1,2,2,4 vs 1,2,2,3 vs 1,2,3,4.
- pandas groupby? Splits rows into groups and summarises each, like SQL GROUP BY.
- Which chart for a trend? A line chart.
Learning Path
Go step by step. Practise each step on a real dataset (Kaggle or data.gov.in) before moving on.
- Excel — formulas, XLOOKUP, SUMIFS, pivot tables, basic charts.
- Basic statistics — mean, median, SD, percentiles, distributions, correlation.
- SQL — SELECT, WHERE, GROUP BY, HAVING, JOINs. Then window functions and CTEs. Practise daily on LeetCode or HackerRank.
- One BI tool — Power BI or Tableau. Build one dashboard with KPIs and filters.
- Business metrics — conversion, churn, retention, CAC, LTV, funnels, cohorts.
- Python — pandas for cleaning and grouping, matplotlib or seaborn for charts.
- Hypothesis testing and A/B tests — p-values, t-test, chi-square, sample size basics.
- Projects — 2 or 3 end-to-end projects (e.g. sales dashboard, customer churn analysis, A/B test report) on GitHub with a short write-up.
- Communication — practise explaining one project in 2 minutes: problem, approach, finding, impact.
- Case practice — "Why did metric X drop?" and guesstimates. Talk through your steps out loud.