Skip to content
London, United Kingdom · Est. 1994
English

Unit 4: Analytics at Scale

How large datasets are queried, summarised and visualised, the statistical traps that big data makes more likely, and how machine learning is applied at scale.

Unit 4 of 5 · about 54 minutes

4.1 Querying, reporting and business intelligence

Most of the value organisations gain from big data comes not from advanced algorithms but from answering everyday questions accurately and quickly: how many, how much, where, when and compared with what. This is the territory of querying, reporting and business intelligence, usually shortened to BI.

SQL: the common language

SQL, the Structured Query Language, is the most widely used way to ask questions of structured data. Even in big data platforms, SQL remains central, because many warehouses, lakehouses and processing engines accept SQL queries and handle the distribution of work behind the scenes. A typical query selects the columns needed, filters rows, groups them and calculates summaries. In plain language, a query might say: from the sales table, take only last year's transactions, group them by region and product category, and calculate total revenue and number of orders for each group.

You do not need to write SQL to benefit from understanding its logic. Most business questions can be expressed in the same structure: which data, which filter, which grouping and which calculation. Thinking this way helps you ask clear questions of data teams.

Measures, dimensions and aggregation

BI tools usually describe data in terms of measures, which are numbers you can add up or average, such as revenue, units sold or call duration, and dimensions, which are categories you can slice by, such as date, region, product or channel. Aggregation means summarising detailed records into totals, averages, counts or other statistics. At big data scale, pre-calculated aggregates are often stored so that dashboards respond quickly without scanning billions of rows each time.

Key performance indicators

A key performance indicator, or KPI, is a measure chosen to track progress towards an important goal. Good KPIs are:

  • clearly defined, with an agreed calculation and data source;
  • relevant to decisions that people can actually influence;
  • comparable over time and between units;
  • balanced, so that improving one measure does not quietly damage another, for example pairing call handling time with customer satisfaction.

A frequent problem in large organisations is that the same KPI is calculated differently by different teams. Agreeing a single, documented definition, often stored in a shared layer known as a semantic layer or metrics layer, prevents conflicting figures.

Visualisation and dashboards

Charts help people see patterns that tables hide. Some simple principles improve almost any chart:

  1. choose the chart for the question: lines for trends over time, bars for comparing categories, scatter plots for relationships between two measures;
  2. start bar chart axes at zero so differences are not exaggerated;
  3. label axes and units clearly and give the chart a title that states the main message;
  4. avoid clutter, three-dimensional effects and too many colours;
  5. show context, such as targets, previous periods or ranges of normal variation.

Tip: Design each dashboard for one audience and a small number of decisions. A dashboard that tries to answer every question for everyone usually answers none of them well.

Self-service analytics

Many organisations encourage self-service analytics, in which business users explore data themselves using BI tools rather than waiting for analysts. This can speed up decisions considerably. It works best when users have access to trusted, well-documented datasets and basic training. Without these, self-service can lead to many slightly different versions of the same figure and to confident conclusions drawn from misunderstood data.

Performance at scale

Queries on very large datasets can be slow or expensive if they are poorly designed. Common techniques that data teams use include partitioning data by date or region so that queries read only relevant portions, storing data in columnar formats, pre-aggregating common summaries and caching frequently used results. As a user, you can help by filtering to the period and scope you genuinely need rather than querying everything.

In practice

Choose a report you use regularly and identify its measures and dimensions. Check whether each KPI has a written definition and whether colleagues elsewhere calculate it the same way. Then look at one chart and ask whether its type, axis and title clearly support the decision it is meant to inform. Small improvements of this kind often do more for decision-making than new technology.

4.2 Statistical thinking and big data pitfalls

Large datasets can create a false sense of certainty. With millions of records, it is tempting to believe that any pattern found must be true. In reality, big data makes some statistical traps more likely, not less. Understanding a few core ideas will help you challenge analyses constructively and avoid costly mistakes.

Bigger is not the same as representative

A huge dataset can still be biased if it does not represent the population you care about. Website data covers only people who use your website; app data covers only people who installed the app; social media posts reflect only those who choose to post. Collecting more data from the same skewed source does not remove the bias, it simply makes the biased result more precise. Before drawing conclusions, always ask who or what is missing from the data.

Correlation is not causation

Big data analysis often finds that two things move together. Ice cream sales and sunburn cases both rise in summer, but one does not cause the other; hot, sunny weather drives both. This hidden third factor is called a confounder. In business, customers who receive a loyalty discount may spend more, but perhaps they were already the most engaged customers and would have spent more anyway. Mistaking correlation for causation can lead organisations to invest in actions that do not work.

Testing causes with experiments

The most reliable way to test whether an action causes an outcome is a controlled experiment. Online, this is often called an A/B test: customers are randomly split into groups, one sees the current version and the other sees a change, and outcomes are compared. Randomisation ensures that, on average, the groups differ only in the change being tested. Where experiments are not possible, analysts use careful methods to estimate causal effects, but these depend on assumptions that should be stated openly.

Too many comparisons

If you test enough patterns, some will appear significant purely by chance. With thousands of products, regions and customer segments, an analyst can always find a group where sales rose unusually. This problem is known as multiple comparisons, and exploring data until something interesting appears is sometimes called data dredging. Good practice is to define the main questions in advance, treat surprising findings as hypotheses to test further, and adjust statistical thresholds when many comparisons are made.

Statistical and practical significance

With very large samples, even tiny differences can be statistically significant, meaning they are unlikely to be due to chance alone. That does not mean they matter. A change that improves conversion by a tiny fraction of a percentage point may be real but not worth the cost of implementing it. Always ask how large an effect is, and whether it is big enough to change a decision.

Averages can mislead

Averages hide variation. An average delivery time of two days could mean most deliveries take two days, or that half take one day and half take three. Medians, ranges and distributions often tell a more useful story. Combining groups can even reverse a pattern: a treatment can appear better in each of two groups separately but worse when the groups are combined, because the groups differ in size and composition. This surprising effect, known as Simpson's paradox, is a reminder to look at results by relevant segments.

Remember: When presented with a striking finding from big data, ask four questions. Who is missing from the data? Could something else explain the pattern? How many other patterns were tested? Is the effect large enough to matter?

Survivorship and selection

Data often includes only cases that passed through some filter. Analysing only customers who stayed, products that remained on sale or projects that were completed can produce misleading conclusions, because the failures are no longer visible. This is called survivorship bias. Similarly, if only certain customers are offered a product, comparing them with everyone else measures the selection process as much as the product.

In practice

Next time you see an analysis claiming that one factor drives another, apply the four questions from the reminder above. If the claim is important, ask whether an experiment or a comparison with a fair control group is possible. Encouraging this kind of healthy scepticism, politely and consistently, is one of the most valuable contributions a manager can make to a data-driven organisation.

4.3 Machine learning at scale

Machine learning is a branch of artificial intelligence in which systems learn patterns from data rather than following hand-written rules. Big data and machine learning are closely linked: large datasets make it possible to train more accurate models, and machine learning offers ways to extract value from data too large or complex for manual analysis.

Common business uses

  • Forecasting: predicting demand, sales, staffing needs or energy use from historical patterns and external factors.
  • Classification: assigning items to categories, such as flagging likely fraudulent transactions, routing customer emails or identifying faulty products.
  • Recommendation: suggesting products, content or actions based on the behaviour of similar users.
  • Segmentation: grouping customers or items with similar characteristics, often without predefined labels.
  • Anomaly detection: spotting unusual patterns that may indicate errors, fraud, faults or security threats.
  • Text and image analysis: extracting meaning from documents, reviews, call transcripts or photographs.

How a model is built

  1. Frame the problem: define exactly what is being predicted, for whom, and how the prediction will be used.
  2. Prepare the data: gather historical examples, including the outcome to be predicted, and create useful input variables, often called features.
  3. Split the data: keep some data aside so the model can be tested on examples it has not seen.
  4. Train and compare models: try suitable methods and select the one that performs best on the test data.
  5. Evaluate: check performance in ways that reflect the business problem, including different types of error and performance for different groups.
  6. Deploy: put the model into everyday use, for example scoring each new transaction.
  7. Monitor and retrain: track performance over time and update the model as conditions change.

Evaluating models sensibly

A single accuracy figure can mislead. If only one transaction in a thousand is fraudulent, a model that labels every transaction as genuine is correct 99.9 per cent of the time and completely useless. Better evaluation considers both false positives, such as genuine payments wrongly blocked, and false negatives, such as fraud that is missed, and weighs their costs. It also compares the model against a simple baseline, such as last year's average or a basic rule, to check that the added complexity is worthwhile.

Tip: Always ask what a model would be compared with. A forecasting model that is only slightly better than "same as last year" may not justify the cost of building and maintaining it.

From experiment to operation

Many models are built but never used. Turning a promising model into a dependable business tool requires engineering work, monitoring and clear ownership, a discipline often called MLOps. Key concerns include reproducing how a model was trained, ensuring the data used in live operation matches the data used in training, tracking model versions and detecting drift, when changing conditions make a model less accurate. A demand model trained before a major change in customer behaviour, for example, may quietly become unreliable.

Scale also affects cost. Training large models on very large datasets can require substantial computing power, and scoring millions of records every day adds ongoing expense. Teams often start with simpler, cheaper methods and move to more complex ones only when the improvement in results clearly justifies the extra cost and effort.

Responsible use

Models learn from historical data, which may reflect past unfairness. A model that prioritises job applicants or sets credit limits can reproduce bias against particular groups even if sensitive characteristics are not directly included, because other variables, such as postcode, can act as proxies. Responsible practice includes testing performance across groups, documenting how models work and their limits, keeping humans involved in significant decisions and respecting data protection laws, which in many countries give people rights in relation to automated decisions that significantly affect them.

In practice

When someone proposes a machine learning project, ask: what exactly will be predicted, and what action will follow? What historical data with known outcomes is available? What simple baseline will the model be compared with? Which errors matter most? Who will own and monitor the model once it is live? Clear answers suggest a well-founded project; vague answers suggest the idea needs more framing before any modelling begins.

Case study: Testing a loyalty offer at a coffee chain

Marlow and Finch, a fictional chain of 120 coffee shops, analysed two years of loyalty card data and found that customers who used a discount voucher spent considerably more over the following months. The marketing team proposed sending vouchers to every loyalty member.

The analytics lead questioned the conclusion. Vouchers had mainly been used by the most regular customers, who already spent more. The pattern might reflect who chose to use vouchers rather than the effect of the vouchers themselves.

The team ran a randomised test. A random half of eligible members received a voucher and the other half did not. Over eight weeks, the voucher group spent slightly more, but the increase was much smaller than the original analysis suggested and barely covered the cost of the discounts. However, the effect was noticeably larger among customers who had not visited for over a month.

The chain decided to send vouchers only to lapsed customers, saving money compared with the original plan and basing the decision on evidence of cause rather than correlation.

Activity

Find or imagine a claim at work that one factor drives another, such as training improving sales or a new website feature increasing orders. Apply the four questions about missing data, alternative explanations, multiple comparisons and effect size. Then outline a simple experiment or fair comparison that could test the claim.

Compare with a model answer

A good answer states the claim precisely, for example "teams that attended the sales training increased revenue by more than teams that did not". It then applies the questions: data may exclude staff who left; stronger teams may have been chosen for training, a likely confounder; the result may be one of many comparisons across regions; and the size of the difference may be small relative to normal variation.

It proposes a practical test, such as randomly selecting which of several comparable teams receive the training first, recording revenue for all teams before and after, and comparing the change. Where randomisation is not possible, it suggests comparing similar teams over the same period. The strongest answers define in advance what size of improvement would justify rolling out the training more widely.

Key takeaways

  • Most value from big data comes from clear queries, well-defined measures and dimensions, agreed KPIs and well-designed dashboards.
  • A large dataset can still be unrepresentative; more data from a biased source makes the biased result more precise, not more correct.
  • Correlation is not causation; randomised experiments such as A/B tests are the most reliable way to test whether an action works.
  • Multiple comparisons, tiny but statistically significant effects, misleading averages and survivorship bias are common traps at scale.
  • Machine learning needs a clear problem, sensible evaluation against a baseline, monitoring for drift, clear ownership and checks for fairness.

Unit check

Create a free account to answer the check, save your progress and receive your free certificate.

Create a free account Log in
← Unit 3 Unit 5 →
WhatsApp