Descriptive vs Diagnostic vs Predictive Analytics
Descriptive, diagnostic and predictive analytics compared in practice: one real bike-sharing dataset taken through all three, from what happened, to why the worst day happened, to forecasting the next six months and beating a simple baseline, with the limits of each type and where prescriptive analytics takes over.
GloryTecks Team
Training & Placement Faculty
Last updated: 25 September 2026
Analytics is often divided by the question it answers: what happened (descriptive), why it happened (diagnostic), what is likely to happen (predictive), and what to do about it (prescriptive). Training material, such as Microsoft's introduction to the analytics process, uses the same division (Microsoft Learn: the analytics process). Definitions are easy to memorise and easy to forget. Following one dataset through the types shows what each adds and where each stops. Business analytics explained puts the types in the wider context of the analytics process.
The dataset is two years of daily bike rentals from the Capital Bikeshare system in Washington, D.C., with weather and calendar information (UCI: bike sharing dataset).
Descriptive analytics: what happened?
import io
import urllib.request
import zipfile
import numpy as np
import pandas as pd
from sklearn.ensemble import HistGradientBoostingRegressor
url = "https://archive.ics.uci.edu/static/public/275/bike+sharing+dataset.zip"
archive = zipfile.ZipFile(io.BytesIO(urllib.request.urlopen(url).read()))
days = pd.read_csv(archive.open("day.csv"), parse_dates=["dteday"])
hours = pd.read_csv(archive.open("hour.csv"), parse_dates=["dteday"])
by_year = days.groupby(days["dteday"].dt.year)["cnt"].sum()
print("rentals per year:", by_year.to_dict(), f"| growth {by_year[2012] / by_year[2011] - 1:.0%}")
monthly_2012 = days[days["dteday"].dt.year == 2012].groupby(days["dteday"].dt.month)["cnt"].sum()
print("2012 busiest month:", monthly_2012.idxmax(), "| quietest month:", monthly_2012.idxmin())rentals per year: {2011: 1243103, 2012: 2049576} | growth 65%
2012 busiest month: 9 | quietest month: 1Rentals grew by 65% from 2011 to 2012, with a peak in September and a low in January. That is descriptive analytics: accurate summaries of the past, the foundation of every report and dashboard. It is essential, and it answers no question about causes.
Diagnostic analytics: why did it happen?
Diagnostic work starts from something unusual and investigates. The quietest days of 2012:
lowest = days[days["dteday"].dt.year == 2012].nsmallest(3, "cnt")[["dteday", "cnt", "weathersit"]]
lowest["hours_with_data"] = lowest["dteday"].map(hours.groupby("dteday")["hr"].count())
print(lowest.to_string(index=False)) dteday cnt weathersit hours_with_data
2012-10-29 22 3 1
2012-12-26 441 3 24
2012-12-24 920 2 23On 29 October 2012, a Monday, the system recorded just 22 rentals, and only one hour of that day appears in the hourly data at all. Christmas Eve and the day after Christmas are low too, but those days have full or nearly full hourly records: people simply rode less. The 29 October pattern is different: the service was barely operating. The dataset's own documentation connects dates around 30 October 2012 with Hurricane Sandy, for which Washington's mayor had declared a state of emergency on 26 October (Wikipedia: Hurricane Sandy).
That is diagnostic analytics: comparing, drilling down and checking a second source until the cause is clear. Note the method: the hourly coverage, a data-quality signal, separated "people chose not to ride" from "almost nothing was recorded".
Predictive analytics: what is likely to happen?
A model trained on data up to June 2012 predicts each day's rentals from July to December, using the calendar and the weather, and is compared with a simple baseline, "same day last week":
features = ["yr", "mnth", "weekday", "workingday", "holiday", "weathersit", "temp", "hum", "windspeed"]
train, test = days[days["dteday"] < "2012-07-01"], days[days["dteday"] >= "2012-07-01"]
model = HistGradientBoostingRegressor(random_state=0).fit(train[features], train["cnt"])
errors = pd.Series(np.abs(model.predict(test[features]) - test["cnt"].to_numpy()), index=test["dteday"])
same_day_last_week = days["cnt"].shift(7)[test.index]
print(f"July-December 2012, average {test['cnt'].mean():,.0f} rentals a day")
print(f"model MAE {errors.mean():,.0f} | 'same day last week' MAE {np.abs(same_day_last_week - test['cnt']).mean():,.0f}")
print("largest model miss:", errors.idxmax().date(), f"({errors.max():,.0f} rentals)")July-December 2012, average 6,043 rentals a day
model MAE 898 | 'same day last week' MAE 1,130
largest model miss: 2012-10-29 (3,386 rentals)The model misses by about 900 rentals on an average day of around 6,000, better than the baseline's 1,130. Two cautions show the limits of prediction. First, the model was given each day's actual weather; a real forecast would use a weather forecast, which is less accurate, so these errors are optimistic. Second, its largest miss is the hurricane day: bad weather lowers its prediction, but nothing in the data tells it the service would effectively shut down. Predictive models learn patterns from the past; events unlike anything in the training data remain the job of human judgement.
Prescriptive analytics: what should we do?
Prescriptive analytics turns predictions into recommended actions under constraints: how many bikes to move to which stations each morning, how many staff to schedule for rebalancing, when to plan maintenance. It combines the forecast, the costs of too few or too many bikes, and operational limits, often with optimisation or simple decision rules. Without trustworthy descriptive numbers, a diagnosis of unusual days, and a forecast whose errors are known, those recommendations would rest on guesswork, which is why the types build on each other.
The four types side by side
| Type | Question | Example here | Typical tools | Main risk |
|---|---|---|---|---|
| Descriptive | What happened? | 65% growth; September peak | SQL, spreadsheets, BI | Wrong definitions or bad data |
| Diagnostic | Why did it happen? | Hurricane day with almost no recorded hours | Drill-downs, comparisons, data checks | Mistaking correlation for cause |
| Predictive | What will happen? | Daily forecast beating a baseline | Statistical and machine learning models | Overconfidence; events outside past data |
| Prescriptive | What should we do? | Rebalancing and staffing plans | Optimisation, decision rules, simulation | Acting on a flawed forecast |
The same types in everyday business questions
- Descriptive: How many orders did we ship last week? What is our current churn rate? Which products sold most this quarter?
- Diagnostic: Why did returns jump in March? Why is one region's conversion rate lower? What changed before the complaints increased?
- Predictive: How many orders should we expect next month? Which customers are likely to cancel? How much stock will each store need?
- Prescriptive: Which customers should receive a retention offer? How should the marketing budget be split between channels? How many staff should work each shift?
Notice that the questions become harder to answer, and more valuable, as they move down the list, and that each depends on the ones above it being answered reliably.
How the types fit together in practice
- Most analyst work is descriptive and diagnostic, and it is where most value begins: reliable reporting and clear explanations of changes.
- Diagnosis protects prediction. Unusual days, such as the hurricane, distort models if they are not understood and handled.
- Always compare predictions with a baseline. A model that cannot beat "same day last week" adds complexity without value.
- Keep humans in the loop for decisions affected by rare events.
Correlation vs causation covers the main trap in diagnostic work.
Which type of analytics is most important?
Do I need machine learning for predictive analytics?
What is the difference between diagnostic analytics and root cause analysis?
Is prescriptive analytics only for large companies?
Trend and pattern analysis, forecasting basics and business insight generation are part of the Data Analytics course.
Sources
- Bike Sharing (UCI Machine Learning Repository) — UCI Machine Learning Repository
- Hurricane Sandy (Wikipedia) — Wikipedia
- Explore the analytics process that turns data into insights (Microsoft Learn) — Microsoft Learn
GloryTecks Team
Training & Placement Faculty
The GloryTecks faculty team mentors learners across Data Science, AI and Data Engineering, with a focus on real-time projects and placement readiness in Hyderabad.
Want to master Data Analytics?
Join GloryTecks’ expert-led Data Analytics training in Hyderabad with real-time projects and 100% placement support.
Related articles
Business Analytics Explained: A Beginner's Guide
Business analytics explained for beginners: what it is for, the four types of analytics and the business question each answers, the process that turns a question into a decision, the roles and tools involved, and a worked example on a real online shop's sales that goes from what happened to why it happened.
Data Analyst Roadmap 2026: Skills, Tools and Timeline
A data analyst roadmap for 2026: the six stages to learn in order, from spreadsheets and SQL to BI tools, statistics and communication, what each stage should let you do, a realistic part-time timeline, a project that proves each stage, and how to tell when you are ready to apply for analyst roles.
Excel vs Power BI: Which Should You Learn First?
Should you learn Excel or Power BI first? For most beginners, a slice of Excel first, then Power Query and the data model, which Excel and Power BI share, and then Power BI. Here is why, what each tool teaches on its own, and which to start with in your situation.