Data Analysis Examples: 6 Real-World Cases Worked Step by Step
Quick answer
Six worked data analysis examples, from a SQL sales summary to an A/B test and a reorder rule, each ending in a clear decision.
Data analysis examples from real work include summarising sales by city, finding where customers drop out of a checkout funnel, comparing retention across signup months, testing two email subject lines, forecasting next month's demand and setting a reorder point. Each one starts with a business question, uses a small set of calculations and ends in a decision someone can act on.
Key takeaways
- Every example follows the same path: question, data, calculation, finding, decision.
- Four types cover most work: descriptive (what happened), diagnostic (why), predictive (what next) and prescriptive (what to do).
- Averages hide problems. Splitting by a segment such as city, channel or payment method is usually where the insight sits.
- You can practise all six examples below with a spreadsheet or basic SQL.
On this page:
- Example 1: How do you summarise sales by city?
- Example 2: How do you find where customers drop off?
- Example 3: How do you check whether growth is healthy?
- Example 4: How do you know whether a difference is real?
- Example 5: How do you forecast next month from past data?
- Example 6: How does analysis turn into a rule someone follows?
- What steps do all these examples share?
- How can you practise these examples yourself?
- Frequently asked questions
| Type of analysis | Question it answers | Example below | Typical tool |
|---|---|---|---|
| Descriptive | What happened? | Revenue and order count by city | SQL GROUP BY, pivot table |
| Diagnostic | Why did it happen? | Checkout funnel drop traced to one payment method | Funnel table, segmentation |
| Diagnostic | Are newer customers behaving differently? | Cohort retention for a learning app | Cohort table |
| Inferential | Is this difference real or chance? | A/B test of two subject lines | Two-proportion z-test |
| Predictive | What is likely next? | Next month's demand from recent sales | Moving average, trend line |
| Prescriptive | What should we do? | Reorder point for a kirana store | Formula with business inputs |
All numbers in the examples below are illustrative, made up so you can follow the arithmetic.
Example 1: How do you summarise sales by city?
Group the orders by city and compute count, total and average. This is descriptive analysis, and it is the first thing most analysts do with a new table.
The pandas documentation describes group by as splitting data into groups, applying a function to each group and combining the results. SQL's GROUP BY does the same thing. This Python script runs as it is, using the built-in sqlite3 module:
import sqlite3
conn = sqlite3.connect(":memory:")
conn.execute("CREATE TABLE orders (city TEXT, channel TEXT, amount INTEGER)")
conn.executemany("INSERT INTO orders VALUES (?, ?, ?)", [
("Pune", "app", 450), ("Pune", "web", 1200),
("Indore", "app", 300), ("Indore", "app", 350), ("Indore", "web", 900),
("Kochi", "app", 2000),
])
query = """
SELECT city,
COUNT(*) AS orders,
SUM(amount) AS revenue,
ROUND(AVG(amount), 1) AS avg_order
FROM orders
GROUP BY city
ORDER BY revenue DESC
"""
for row in conn.execute(query):
print(row)Output:
('Kochi', 1, 2000, 2000.0)
('Pune', 2, 1650, 825.0)
('Indore', 3, 1550, 516.7)Reading it: Kochi leads on revenue, but from a single large order. Indore has the most orders and the smallest average order value. A manager who saw only the revenue ranking might invest in Kochi. The count column says the dependable demand is in Indore. The decision could be a bundle offer in Indore to lift basket size. For more query practice, try these SQL projects for data analysts.
Example 2: How do you find where customers drop off?
Build a funnel table, compute the conversion at each step, then split the weakest step by a segment.
An online saree store in Surat sees fewer paid orders this month.
- Product page visits: 10,000
- Added to cart: 1,200 (12% of visits)
- Reached payment page: 900 (75% of carts)
- Paid: 540 (60% of payment page visits)
Last month the final step converted at 80%. So the fall is at payment, not in traffic or product interest. Now segment that step by payment method. Card and net banking are steady near 80%. UPI has fallen to 45%. A check with the developer confirms that a UPI app redirect broke after an update.
Decision: fix the redirect before spending anything more on ads. This is diagnostic analysis: the overall number told you something was wrong, and the segment told you where.
Example 3: How do you check whether growth is healthy?
Compare retention by signup month. A cohort table separates "more users" from "better users".
A test-prep app reports record signups. Look closer:
| Signup cohort | Signups | Active after 1 month | Retention |
|---|---|---|---|
| January | 500 | 200 | 40% |
| February | 800 | 240 | 30% |
Signups rose by 60%, yet one-month retention dropped ten percentage points. February's growth came from a referral campaign that attracted students who installed for the reward and left. Decision: change the reward so it pays out after the seventh lesson, and track the March cohort. Metrics like this usually feed a KPI review, and it helps to know how OKRs and KPIs differ.
Example 4: How do you know whether a difference is real?
Run a controlled test and check whether the gap is larger than chance would produce. This moves from describing data to drawing an inference.
A college fest team emails 10,000 students, split randomly in two.
- Subject A, "Registrations open": 5,000 sent, 400 opened, 8.0%.
- Subject B, "3 days left to register": 5,000 sent, 475 opened, 9.5%.
B is ahead by 1.5 percentage points, a relative lift of 18.75%. Is that luck? A two-proportion z-test uses the pooled open rate (875 of 10,000, or 8.75%) to estimate the standard error, about 0.00565. The z-score is 0.015 divided by 0.00565, roughly 2.65. That is above 1.96, the usual cut-off for 95% confidence, so the difference is unlikely to be chance.
Decision: use the deadline-style subject line for the remaining sends. Had each group been 500 students with the same rates, the z-score would have been far below 1.96 and the right answer would be "not enough data yet". If z-scores are new to you, start with statistics for data science beginners.
Example 5: How do you forecast next month from past data?
Start with the simplest model that fits the pattern, then compare it with what actually happens. A moving average and a trend estimate are enough for a first forecast.
A Nagpur stationery distributor sold 120, 135 and 150 boxes of notebooks over the last three months.
- Three-month moving average: (120 + 135 + 150) / 3 = 135 boxes.
- Trend method: sales rose by 15 each month, so next month is 150 + 15 = 165 boxes.
The two answers differ by 30 boxes. The moving average lags when there is a clear upward trend, so 165 is the better base case here. But school reopening in June will push demand beyond any trend line. A good analyst states the assumption and gives a range, not one confident number.
Example 6: How does analysis turn into a rule someone follows?
Convert the finding into a threshold or formula that triggers action. That is prescriptive analysis.
A kirana store owner in Coimbatore keeps running out of a popular atta brand. Her data shows she sells 20 packs a day, and the supplier takes 5 days to deliver. She wants a buffer of 30 packs for busy weeks.
Reorder point = (daily sales x lead time) + safety stock = (20 x 5) + 30 = 130 packs.
Rule: when stock touches 130 packs, place the order. No dashboard needed, just a number on the shelf label. If festival-season sales rise to 30 packs a day, the reorder point becomes (30 x 5) + 30 = 180. The analysis is small. The value comes from the fact that it changes behaviour.
What steps do all these examples share?
Each one follows the same five steps, and skipping the first is the most common beginner mistake.
- Frame the question as a decision. "Should we fix checkout or buy more ads?" is better than "analyse sales".
- Get and clean the data. Remove duplicates, fix formats, check missing values. See these data cleaning techniques in Excel, SQL and Python.
- Explore before concluding. The NIST Engineering Statistics Handbook describes exploratory data analysis as an approach that aims to "maximize insight into a data set" and "detect outliers and anomalies", among other goals. The single Kochi order in Example 1 is the kind of thing exploration catches.
- Segment. Split the headline number by city, channel, cohort or device.
- State the decision and the caveat. One sentence each.
How can you practise these examples yourself?
Recreate each example with your own data in a spreadsheet first, then in SQL or Python.
- Students: use your own expense log, attendance data or a public cricket scorecard for Examples 1 and 5.
- Working professionals: take one report your team already produces and add a segment split, as in Example 2. Share the finding in two lines.
- Career switchers: turn three of the six into portfolio pieces with a short write-up. These data analytics project ideas give more datasets, and Python for data analysis covers the next tool to learn.
Next step: if you want guided practice across SQL, Python and dashboards, the Certification Program in Data Analytics with AI and Gen AI from E&ICT Academy, IIT Roorkee runs for 6 months. Or open a spreadsheet today and rebuild Example 2 with numbers from your own work.
Frequently asked questions
What is a simple example of data analysis?
Summarising orders by city is a simple example. You group the rows by city, count the orders, add up the revenue and compute the average order value. Comparing the three columns shows which city has steady demand and which only had one large order.
What are the four types of data analysis?
Descriptive analysis says what happened. Diagnostic analysis explains why. Predictive analysis estimates what is likely next. Prescriptive analysis recommends what to do. Many real projects move through several of these in sequence, starting with a descriptive summary.
Which tools are used for data analysis?
Spreadsheets such as Excel or Google Sheets handle small datasets. SQL is used to query databases. Python with pandas handles larger or messier data and statistics. BI tools such as Power BI or Tableau present results as dashboards. The method matters more than the tool.
Can I do data analysis without coding?
Yes, to begin with. All six examples above can be done with spreadsheet formulas and pivot tables. Coding becomes useful when data grows beyond what a spreadsheet handles comfortably or when you need to repeat the same analysis every week.
How do I present a data analysis example in an interview?
Use five sentences: the business question, the data you used, the method, the finding and the decision it supported. Add one caveat about what the data could not tell you. Interviewers look for clear reasoning more than complex techniques.