Business and operations

Machine learning for business analytics

In business analytics, machine learning predicts which customers will respond to a campaign, forecasts demand for stock and staffing, and sharpens the reading of A/B tests. Each model feeds a specific decision, so its value is measured by how that decision improves.

Where to start

Learn pandas, SQL-style aggregation and logistic regression first, because most business models start from a customer or transaction table. Then add a held-out time period so you measure the gain over the current rule honestly.

How machine learning is used in business analytics

Targeting campaigns at customers who respond

A response model scores each customer on how likely they are to act on an offer, using past purchases, tenure and earlier campaign history. Uplift models go a step further and estimate how much the offer itself changes behaviour, so budget goes to customers who would not have bought anyway. Logistic regression, gradient-boosted trees and meta-learners built on them are typical.

Real example: CausalML (Uber). An open-source Python package from Uber for uplift modelling and causal inference that lists campaign targeting optimisation as a typical use case.

Forecasting demand for stock and staffing

A forecasting model predicts sales, orders or contacts per day or week from past values, seasonality, holidays and promotions. The forecast feeds purchase orders and rotas, so its errors are judged in units or hours, not just percentages. Seasonal regression models and gradient-boosted trees on lagged features are common starting points.

Real example: Prophet (Meta). An open-source forecasting procedure released by Facebook's Core Data Science team that fits an additive model with trend, yearly, weekly and daily seasonality and holiday effects.

Reading A/B tests more precisely

When a team tests a new page, price display or email, regression on each customer's pre-experiment behaviour removes noise that has nothing to do with the change. The same traffic then gives a narrower confidence interval, so smaller real effects become visible. This is usually linear regression, sometimes with model-based predictions as the covariate.

Real example: Microsoft Experimentation Platform: variance reduction. Microsoft's experimentation team explains how CUPED adjusts metrics with a regression on pre-experiment data and reports an effective traffic multiplier for each variance-reduced metric.

Can you learn machine learning for business analytics?

Yes. Analysts who already work in spreadsheets, SQL or BI tools have most of the business context; the gap is usually Python, statistics and supervised learning. Learn Python and pandas, then the statistics of testing, then classification and forecasting on customer and transaction tables.

  1. Python for analysis. Learn enough Python to load an export, write functions and repeat an analysis without copying spreadsheet formulas. Taught in the Python track of Foundations of AI
  2. Tables with pandas. Join customers, orders and campaigns, aggregate them per customer and per week, and build one modelling table without leaking future data. Taught in the Data Tools track of Foundations of AI
  3. Statistics for experiments. Confidence intervals, hypothesis tests and regression are what you need to read an A/B test and to say whether a model's gain is real. Taught in the Statistics track of Foundations of AI
  4. Classification and forecasting. Train logistic regression and gradient-boosted trees for response and churn, and time-series models for demand, each compared with the rule the business uses today. Taught in the Machine Learning track of Foundations of AI

Moving into machine learning for business analytics

If you already work in the field

Business analysts already know the metrics, the data warehouse and the decisions a model would change. Add Python, a held-out evaluation habit and one or two model families. A realistic first move is to rebuild an existing targeting or forecast rule as a model and compare both on last quarter's data.

If you come from data science or ML

If you come from ML or data science, learn how the business measures success: margin, retention, cost per contact and how experiments are run. Spend time with the teams who act on the scores, because a model that does not change a decision has no value to them.

Roles that do this work: Business analystData analystData scientist, marketing analyticsCustomer analytics managerAnalytics engineer

Tools you will use

ToolWhat you use it for
pandasClean, join and aggregate customer, order and campaign tables into one modelling table.
DuckDBRun fast SQL over large CSV or Parquet exports on a laptop before modelling.
scikit-learnFit and cross-validate response, churn and segmentation models with a shared pipeline.
statsmodelsFit interpretable regressions and test whether an observed lift is larger than chance.

Public data to practise on

  • UCI Bank Marketing: Phone campaign records from a Portuguese bank; predict whether a client subscribes to a term deposit.
  • UCI Online Retail II: Invoice lines from a UK online retailer; analyse customer value, repeat purchases and product demand.

Your first project

Download the UCI Bank Marketing data, predict which clients subscribe with logistic regression, and compare it with contacting everyone in call order using ROC AUC and the subscriptions found in the top 10% of calls.

Keep the result, your code and a short note on what didn't work. That record is worth more than the score.

Common questions

What is the difference between business analytics and machine learning?
Business analytics is the wider work of measuring and explaining what happens in a business, often with dashboards and reports. Machine learning is one set of methods inside it, used when you want to predict an outcome for each customer, product or day.
Do business analysts need to code for machine learning?
Some BI and cloud tools offer point-and-click models, but Python gives you control over features, validation and comparison with a baseline. Most analyst roles that include modelling now expect Python or R alongside SQL.
Which machine learning models are used most in business analytics?
Logistic regression and gradient-boosted trees for yes-or-no outcomes such as response and churn, regression and time-series models for demand, and clustering for segmentation. Simple, explainable models are often preferred because managers need to trust the scores.
How do you show a model is worth using?
Compare it with the current rule on a later period it never saw, in the units the business cares about, such as extra sales found per hundred contacts. Where possible, confirm the gain with a randomised test.

First Principles, the SchoolWhool newsletter

One machine learning idea, explained properly, every week.

The intuition, the common mistake, and a five-minute way to try it yourself. Written by Gaurav.

Learn the machine learning behind it, from first principles.

Start with Python from zero, free. Every stage after that builds on the last, and a person answers your doubts.