Learn
A3.4.3 | OLAP AND DATA MINING (HL ONLY)
01 | FROM A REPORT TO A QUESTION
A shop’s warehouse contains integrated sales history. A manager sees that October sales are higher than September, then asks: “Which region contributed? Was it web or counter sales? What products are often bought together?”
Online analytical processing (OLAP) supports interactive exploration and summarisation across dimensions such as time, region and product. Data mining uses analytical techniques to discover patterns, groups, relationships, unusual cases or predictive models.
Both support business intelligence: turning prepared data into evidence for organisational decisions. They have different emphases and can be used together.
For explain, name what the method does, show how that produces useful information and connect the result to a decision with a relevant limitation.
02 | THE WAREHOUSE IS A FOUNDATION, NOT THE ANALYSIS ITSELF
A data warehouse organises integrated historical data. OLAP lets users ask multidimensional questions of that data; mining techniques can derive patterns or models from suitable datasets. A dashboard presents results to users.
These are related roles, not interchangeable names for the same object. A warehouse does not automatically train a classifier, and a colourful dashboard does not guarantee a reliable analysis.
A common workflow is: define the question, prepare relevant data, explore it, apply a suitable analytical technique, evaluate the result and decide how it should be used. Mining can also reveal a question worth exploring further with OLAP.
Data mining is not restricted to warehouses. Other appropriate data sources can be used, provided their quality, meaning and permissions are understood.
03 | OLAP: MEASURES SEEN THROUGH DIMENSIONS
| Concept | Shop example | Role |
|---|---|---|
| Measure | SalesValueCHF | Numeric value to aggregate. |
| Dimension | Time, region, category, channel | Context used to filter or organise the measure. |
| Hierarchy | Year → month → day | Levels of detail within a dimension. |
| Cell | September / North / Robotics / Web = 100 CHF | A value for one combination of dimension members. |
A familiar table has rows and columns, but the same sales measure can be viewed by several dimensions at once. A conceptual OLAP cube organises those combinations. “Cube” does not restrict the data to exactly three dimensions.
The teaching dataset has four dimensions and sixteen pre-aggregated cells: two months × two regions × two categories × two channels. Each amount represents that combination’s accepted sales value, not one customer or transaction.
OLAP can be implemented using relational tables, specialised multidimensional structures or a combination. It does not require every possible cell to be physically precomputed.
04 | START WITH A SUMMARY YOU CAN CHECK
| Month | Robotics CHF | Safety CHF | Total CHF |
|---|---|---|---|
| 2026-09 | 300 | 72 | 372 |
| 2026-10 | 600 | 112 | 712 |
| Selected-data total | 900 | 184 | 1084 |
This first view totals both regions and both channels. October’s selected sales value is 712 CHF compared with 372 in September. That tells us what changed in the summary, but not why.
The example is a separate small teaching dataset, not the full sales history from the previous lesson. It includes only September and October 2026 and uses the stated sales-value measure.
Comparisons need comparable coverage, common definitions and a clear as-of context. A total for an incomplete year should not be presented as a complete annual performance figure.
05 | SLICE: FIX ONE DIMENSION MEMBER
A slice selects one value of a dimension, such as October. The remaining view can show October’s sales by region and category while time is fixed.
This helps the manager focus on the period of interest rather than reading every month at once. Slicing changes the selected scope, not the underlying stored sales.
For example, October contains Robotics 600 CHF and Safety 112 CHF across both regions and channels. A slice is still descriptive exploration; it does not establish the cause of that pattern.
06 | DICE: SELECT A MORE SPECIFIC SUBSET
Dicing selects a subset across several dimensions or dimension members. For example, select October, South and Robotics to inspect that part of the business.
In our dataset, October/South/Robotics totals 300 CHF: 120 Web plus 180 Shop. Adding a Web restriction narrows it to 120 CHF.
The purpose is targeted comparison. A manager could compare the same category and channel across regions, keeping other factors consistent. Explicit filters matter because a surprising difference can simply reflect a different selected population.
07 | DRILL DOWN AND ROLL UP CHANGE DETAIL
Drill-down moves to a more detailed level, such as from a year summary to its months, or from a region to its stores if store-level data exists. This can help locate the contributors to a large total.
Roll-up moves to a higher-level summary, such as from months to a year. It helps show broader patterns without overwhelming users with detail.
Our activity can roll September and October into a 2026 group totalling 1084 CHF, then drill back to the two months. This is the total of the selected data, not a claim about all twelve months.
You cannot drill to individual sales if the only available input is monthly cells and no detailed source is accessible. An interface does not invent missing granularity. Also aggregate the measure correctly: sums add naturally, but means and ratios may require their underlying weights.
08 | PIVOT: CHANGE THE PRESENTATION
Pivoting exchanges or rearranges the dimensions shown on rows and columns. A category-by-month display can become month-by-category, or a report can show region against channel.
The same selected facts can be presented from a more convenient angle. Swapping the axes does not change the overall selected total.
This is useful when a different arrangement makes a comparison easier to see. Do not confuse pivoting with a new mining model or a change to the stored facts.
09 | EXPLORE THE OLAP VIEW
Use the controls to slice or dice the data, change the row/column dimensions, roll up time to year or drill down to months. Swap axes to pivot. Predict the total before applying a change.
The table recalculates summaries from sixteen fixed cells in JavaScript. It is not a production OLAP engine, a speed benchmark or a full annual dataset. Row and column dimensions must differ.
10 | DATA MINING: DERIVE PATTERNS OR MODELS
Data mining uses techniques to extract useful information from datasets, often by finding patterns not obvious in a simple report or by learning relationships for prediction. Large datasets can make these methods valuable, but size alone does not make a result trustworthy.
The required techniques are classification, clustering, regression, association rule discovery, sequential pattern discovery and anomaly detection. Choose by the question and intended output.
Some methods use known labelled outcomes to learn a mapping; others explore structure without a supplied target label. Algorithms, validation and interpretation still need careful design.
Unlike ordinary OLAP navigation, mining may fit a model or search systematically for candidate patterns. The distinction is not “OLAP never finds anything interesting”: both can reveal insights, but their mechanisms differ.
11 | CLASSIFICATION PREDICTS A CATEGORY
| Example input features | Known training target | Possible output for a new case |
|---|---|---|
| Order characteristics, delivery information and past behaviour | Returned / not returned | Predicted return category or probability. |
| Message text and other permitted signals | Spam / not spam | Predicted spam label. |
Classification predicts a categorical target using patterns learned from examples with known labels in a typical supervised setup. The category names are defined in advance.
A shop could identify orders likely to be returned so staff can review support or fulfilment issues. A predicted probability can guide a threshold, but the final action also depends on the costs of false alarms and missed cases.
Do not treat a prediction as proof of an individual outcome. Evaluate on suitable held-out data and consider whether labels or input features encode bias. The business benefit comes from a useful, tested decision aid, not merely producing a label.
12 | CLUSTERING FINDS SIMILAR GROUPS
Clustering groups cases with similar characteristics without requiring a pre-labelled target group for each training example. A shop might group customers using purchase frequency, typical spend and category interests.
The result might suggest frequent small purchasers and occasional large purchasers. Analysts interpret those groups and may use them to investigate services or communication needs.
This differs from classification: classification learns predefined target categories; clustering derives groups from the chosen representation and similarity criteria. Calling a customer group “Cluster 2” does not make it a pre-existing correct business label.
Feature choice, scaling, algorithm and group-count settings can change the result. A cluster is not automatically a meaningful or fair segment simply because software produced it.
13 | REGRESSION PREDICTS A NUMERIC VALUE
Regression estimates a numerical target, such as expected order value, delivery duration or demand, from explanatory features. Typical supervised training uses historical examples with known numeric outcomes.
For example, features about an order and route could support an estimated delivery time in minutes. A useful estimate can help plan capacity or communicate an expected window.
Classification might predict “late / on time”; regression might estimate “42 minutes”. The output type, not just the fact that both predict something, distinguishes the tasks.
Predictions have error. Evaluate them against suitable unseen observations, consider uncertainty and avoid assuming that a relationship learned within one range will remain valid far outside it. A fitted relationship does not by itself establish causation.
14 | ASSOCIATION RULES FIND CO-OCCURRENCE
Association rule discovery finds items or attributes that occur together more often or in useful patterns. A basket rule Kit → Battery asks how often batteries appear in baskets containing a kit.
The arrow does not mean buying a kit causes a battery purchase. It also does not establish that the battery was bought later. Association can concern unordered items in the same basket.
A shop might use a supported rule to investigate bundles, shelf layout or recommendations. The rule’s reliability and usefulness need evidence: a popular item may appear in many baskets regardless of the antecedent.
An association rule has an antecedent on the left and a consequent on the right. The direction changes conditional interpretation even though the baskets containing both items are the same.
15 | CHECK SUPPORT, CONFIDENCE AND THE BASE RATE
| Basket ID | Items |
|---|---|
| 1 | Kit, Battery |
| 2 | Kit, Battery, Glasses |
| 3 | Kit |
| 4 | Battery, Glasses |
| 5 | Kit, Battery |
| 6 | Glasses |
| 7 | Kit, Battery |
| 8 | Battery |
Eight example baskets contain five with Kit, six with Battery and four with both. Support for Kit → Battery is 4/8 = 50%, the fraction of all baskets containing the combination.
Confidence is 4/5 = 80%, the fraction of Kit baskets also containing Battery. But Battery already appears in 6/8 = 75% of all baskets. The 80% confidence is only slightly above that baseline.
A useful extension is lift: confidence divided by the consequent’s baseline rate. Here 0.80 / 0.75 ≈ 1.07. A value above 1 indicates positive association in this sample, not causation or proof of a robust pattern.
These metrics illustrate evidence for interpretation; the syllabus’s central requirement is to explain the technique and use. Eight baskets are far too few to justify a broad commercial claim.
16 | EXPLORE AN ASSOCIATION RULE
Choose different antecedents and consequents. Watch how reversing the rule changes confidence while the number of baskets containing both stays the same. Compare confidence with the consequent’s baseline.
This activity calculates statistics for fixed baskets; it does not train a recommendation system or establish a causal relationship. Choose two different items.
17 | SEQUENTIAL PATTERNS ADD ORDER
Sequential pattern discovery looks for recurring ordered events, such as customers who view a beginner tutorial, later buy a kit, then return for an extension pack. The order matters.
This differs from association in one basket. “Kit and Battery appear together” does not tell us which came first, whereas a sequence explicitly describes a before/after pattern across defined events.
A business could use sequences to investigate onboarding steps or when to offer relevant help. The analysis must define whose events belong together and any time window, such as a purchase within thirty days of a tutorial.
Ordered occurrence still does not prove that the earlier event caused the later one. Common interests, marketing exposure or incomplete tracking could explain the pattern.
18 | ANOMALY DETECTION FLAGS UNUSUAL CASES
Anomaly detection identifies observations or patterns that differ from an expected baseline. An unusually large order, a sudden sensor-value spike or an unexpected drop in recorded sales may deserve investigation.
The output may be a flag or anomaly score rather than a known category. Depending on the method, detection can use unlabelled data, labelled examples or both.
A flagged order might be fraudulent, a data-entry error or a legitimate school purchasing many kits. Being unusual is not proof of wrongdoing. The baseline should account for relevant context such as season, location or normal customer behaviour.
Its BI role is to focus attention on cases a person might otherwise miss. Useful handling includes review and feedback, not automatic punishment of every unusual case.
19 | MATCH THE TECHNIQUE TO ITS OUTPUT
| Question | Technique | Output / business use |
|---|---|---|
| Will an order be returned? | Classification | A category or probability supporting a review decision. |
| Which customers show similar patterns? | Clustering | Groups for investigation and possible segmentation. |
| What delivery duration is expected? | Regression | A numeric estimate supporting planning. |
| Which items occur together? | Association rule discovery | Co-occurrence rules suggesting bundles or recommendations. |
| Which event patterns repeat in order? | Sequential pattern discovery | Ordered relationships supporting journey analysis. |
| Which observations are unusual? | Anomaly detection | Flags or scores directing investigation. |
The same general business problem may support several formulations. Detecting fraudulent orders could use labelled classification or an anomaly method when labels are limited. Explain the method used rather than assuming the application name determines one unique technique.
20 | QUALITY AND EVALUATION COME BEFORE TRUST
Start with a defined objective, suitable observations and meaningful features. Handle missing data, duplicated events, inconsistent units and changes in source definitions before interpreting patterns.
For a predictive model, evaluate on data not used to fit it and avoid data leakage: information unavailable at prediction time, such as a final return status sneaking into the inputs used to predict returns.
Historical patterns can stop holding when behaviour changes, so monitor models and reports over time. Good results on a selected sample may not transfer to another population.
For discovered groups and rules, check stability, sample size and usefulness rather than treating any output as important. Distinguish descriptive association, prediction and causal explanation.
21 | USE RESULTS RESPONSIBLY
A useful dashboard can describe a pattern; a model can estimate an outcome. Neither removes responsibility for access control, privacy, fair treatment and understanding the consequences of error.
For example, a return-risk classifier might help offer support, but using uncertain predictions to exclude customers can cause harm. An anomaly flag should trigger proportionate review, not a claim of proven fraud.
Choose decisions proportionate to evidence, record limitations and monitor outcomes. BI is valuable when it improves informed action, not when it hides uncertainty behind a score.
22 | COMBINE OLAP AND MINING IN ONE INVESTIGATION
The manager first uses OLAP to locate October’s increase by category, region and channel. That is a structured exploration of known measures.
Basket analysis then identifies candidate product associations. A separate, properly validated regression model might estimate future demand, while anomaly checks can flag unusual source data that could distort the report.
The methods complement one another: OLAP provides readable context and comparisons, while mining can derive groups, relationships or predictions. The warehouse supplies integrated historical evidence for both where appropriate.
A claim such as “the October campaign caused the increase” still needs evidence beyond a slice or association. Explain the chain from data to technique to decision, including the uncertainty.
23 | CHECK THE OPERATION OR TECHNIQUE
Choose the operation or technique that best matches each requirement. Your first checked response counts; restart for another attempt.
24 | EXPLAIN THE ROLE, NOT JUST THE NAME
For OLAP, identify the measure, dimensions and operation. Explain how the changed view helps answer a business question, such as drilling from a selected yearly total to monthly contributions.
For mining, identify the intended output and the mechanism: predefined categories, numeric estimates, discovered groups, co-occurrence, sequences or unusual cases. Connect that output to a plausible decision and state a limitation.
Use connectives such as because, therefore and however to make the reasoning explicit. Avoid claims that a discovered rule proves causation, a prediction guarantees an outcome or a cluster must be an objectively correct group.
Further reading: OLAP concepts and data-mining functions.