Part A: Foundations
Introduction to analytics
Key takeaways
- Descriptive analytics asks what happened, diagnostic why, predictive what is likely to happen and prescriptive what should be done; each type rests on the one below it, and most organisations fail at the base.
- The level of measurement decides which statistics are permissible: no mean of nominal or ordinal codes, and no ratios on an interval scale such as degrees Celsius.
- Counted data are attribute data, analysed with p charts, c charts and proportion tests; measured data are variable data, analysed with mean and range charts, t-tests, ANOVA and capability indices.
- Never delete an outlier without investigating it: it is either an error to correct with the reason recorded, or often the most informative observation in the dataset.
- Communicate the answer first, choose the chart from the question, state the finding in the chart's title and start a bar chart's axis at zero.
Evidence-based decision making is the sixth of the seven quality management principles, and this paper is where a CQP candidate acquires the means to practise it. A quality professional who cannot compute, cannot read output and cannot present a finding is confined to opinion, and opinion loses to whoever has data.
What data analytics is
The four types of analytics, in increasing order of difficulty and value
| Type of analytics | Question it answers | Typical method | Quality example |
|---|---|---|---|
| Descriptive | What happened? | Summary statistics, charts, dashboards | Last month's defect rate by line and shift |
| Diagnostic | Why did it happen? | Drill-down, correlation, hypothesis testing, root cause analysis | Whether the rise in rejects is associated with a particular supplier |
| Predictive | What is likely to happen? | Regression, classification, time series forecasting | Predicting seal strength from sealing temperature and dwell time |
| Prescriptive | What should we do? | Optimisation, simulation, decision analysis | The sealing temperature that minimises expected total cost |
The types build on one another: prescriptive analytics is worthless without a sound predictive model, which is worthless without correct descriptive statistics, which are worthless if the data are wrong. Most organisations attempting analytics fail at the base of that stack rather than at the top.
Correlation is not causation, and the exam tests it
Two variables can move together because one causes the other, because both are caused by a third, or by coincidence in a small sample. Ice cream sales and drowning both rise in hot weather. Before asserting a cause, ask whether a plausible mechanism exists, whether the cause precedes the effect in time, and whether a confounding variable could produce the association.
Types of data
Data type determines which statistics are permissible, so misclassifying the data leads directly to an invalid analysis. Two classifications matter.
Levels of measurement
| Level of measurement | Property | Permissible statistics | Quality example |
|---|---|---|---|
| Nominal | Categories with no order | Mode, frequency, chi-square | Defect type: crack, scratch, contamination |
| Ordinal | Ordered categories, unequal intervals | Median, percentiles, rank tests | Severity rating: minor, major, critical |
| Interval | Equal intervals, arbitrary zero | Mean, standard deviation, t-tests | Temperature in degrees Celsius |
| Ratio | Equal intervals, true zero | All of the above, plus ratios and coefficient of variation | Fill volume in ml, weight in kg, time in minutes |
Attribute or variable data decides the chart and the test
Given a scenario, ask first whether the data are counted (attribute) or measured (variable). Counted defective units go on a p chart and are tested with a proportion test; measured characteristics go on an X-bar and R chart and are tested with a t-test or ANOVA. Choosing the wrong family is the fastest way to lose a whole question.
Data collection, cleaning and analysis
The consistently quoted figure is that analysts spend most of their time preparing data rather than analysing it, and the syllabus is right to name cleaning explicitly. Bad data analysed well produces a wrong answer with a confident presentation.
- Define the question first: what decision will this analysis support, and what would change depending on the answer
- Define the population and the sampling method, since a conclusion applies only to the population actually sampled
- Design the collection instrument: a check sheet, a form or an automated capture, with defined fields, units and permitted values
- Train the collectors and pilot the instrument, because ambiguity in a field definition produces inconsistent data that no amount of cleaning recovers
- Record metadata: when, where, by whom, with what equipment and under what conditions, since a value without context cannot be interpreted
- Verify at source where possible, using validation rules that reject impossible entries at the point of capture rather than correcting them later
Common data quality problems and their treatment
| Data quality problem | How to detect it | How to treat it |
|---|---|---|
| Missing values | Count nulls by field; look for patterns in what is missing | Investigate the cause; delete the case, impute, or analyse the missingness itself |
| Duplicates | Check for repeated key values | Deduplicate on a defined key, retaining the most complete record |
| Outliers | Box plot, values beyond 1.5 times the interquartile range, z-scores beyond 3 | Investigate, do not delete automatically; an outlier may be the most important observation |
| Inconsistent coding | Frequency table of a categorical field | Standardise: 'Nairobi', 'NAIROBI' and 'nairobi' are one category |
| Wrong data type | Field stored as text when it should be numeric | Convert, after checking why it was stored wrongly |
| Impossible values | Range checks against physical limits | A negative fill volume or an age of 200 is an entry error, not a measurement |
| Units mixed | Distribution with two clusters an order of magnitude apart | Standardise units; grams and kilograms in one field is a common and dangerous error |
| Date format inconsistency | Parse failures; dates in the future | Standardise to ISO 8601, since 03/04/2026 is ambiguous between Kenyan and American convention |
Never delete an outlier without investigating it
An outlier is either an error, in which case it should be corrected or removed with the reason recorded, or a real and unusual observation, in which case it is often the single most informative point in the dataset. In quality work the outlier is frequently the defect you were looking for. Deleting it to tidy the distribution destroys the finding.
Communicating results
An analysis that the decision maker does not act on has failed, however correct it is. Communication is therefore part of the analysis, not an activity after it.
- State the answer first, then the evidence: a manager reading a report wants the conclusion in the first sentence
- Choose the chart from the question, not from preference: comparison uses a bar chart, trend over time uses a line chart, composition uses a stacked bar or a treemap, distribution uses a histogram or box plot, relationship uses a scatter plot
- One message per chart, stated in the chart's title: 'Rejects rose in May on Line 2 only' rather than 'Rejects by line and month'
- Start a bar chart's axis at zero, because a truncated axis exaggerates differences and is the commonest way charts mislead
- Label directly rather than relying on a legend the reader must decode
- Show uncertainty where it matters: a difference within the noise should not be presented as a finding
- Give the sample size, since a percentage from a sample of seven is not a percentage in any useful sense
- Avoid three-dimensional effects and decoration, which add ink and no information
- Pie charts only for a small number of categories summing to a meaningful whole, and never for comparison between two pies
- Tables for exact values that will be looked up; charts for patterns that will be seen
The same data, told badly and told well
DATA: monthly customer complaints, one Kenyan bottling plant.
Jan 41 Feb 38 Mar 44 Apr 39 May 96 Jun 88
Of the May and June figures, 58 and 48 respectively relate to
one product, 500 ml still water, from one line.
TOLD BADLY
Title: 'Complaints Analysis'
Chart: 3-D pie of complaints by month
Text: 'Complaints have shown an increasing trend in recent
months and management attention is required.'
Problems: a pie chart cannot show a trend; three dimensions
distort the areas; the title states a topic not a
finding; the text names no product, line or figure, so
no action follows from it.
TOLD WELL
Title: 'Complaints more than doubled in May, entirely on 500 ml
still water from Line 2'
Chart: Line chart, months on the x-axis, complaints on the
y-axis starting at zero, two series: 500 ml still water
from Line 2, and all other products combined.
The second series stays at about 33 to 41 throughout.
Text: 'Complaints rose from 39 in April to 96 in May and 88 in
June. All of the increase is one product on one line:
500 ml still water from Line 2 accounted for 58 of 96
May complaints and 48 of 88 in June, against 3 to 5 a
month before April. Complaints on all other products
were unchanged. Recommend immediate investigation of
Line 2, focusing on changes made in late April.'
WHAT CHANGED: not the data, and not the arithmetic. Splitting the
series revealed that the flat line is as informative as the rising
one, because it eliminates every plant-wide explanation and points
at a single line in a single month.
Analytics software
Analytics software compared
| Software | Type | Strengths | Limitations | Cost |
|---|---|---|---|---|
| MS Excel | Spreadsheet | Universally available, immediate, good for modest datasets, pivot tables, charts | Row limits, error-prone formulas, poor reproducibility, weak on advanced statistics | Licensed |
| SPSS | Statistical package | Menu-driven, comprehensive statistics, standard in social research, well-documented output | Expensive licence, proprietary | Licensed, costly |
| JASP | Statistical package | Free and open source, SPSS-like interface, produces publication-ready output, includes Bayesian methods | Smaller feature set than SPSS, younger community | Free |
| R | Programming language | Free, vast statistical library, fully reproducible, excellent graphics through ggplot2 | Requires programming; steeper learning curve | Free |
| Python | Programming language | Free, general purpose, strong data handling (pandas), machine learning (scikit-learn), automation | Requires programming | Free |
| SQL | Query language | The standard way to extract and aggregate data from a database | Not an analysis tool in itself | Free implementations available |
| Power BI / Tableau | Visualisation and BI | Interactive dashboards, connects to many sources, good for recurring reporting | Licence cost; can hide poor underlying data | Licensed |
| Minitab | Statistical package | Built for quality: control charts, capability, gauge R and R, design of experiments | Licence cost | Licensed |
- Choose by the task: Excel for small ad hoc analysis, SQL to extract, a statistical package to test, a visualisation tool to report recurring results
- Reproducibility favours script-based tools: an R or Python script can be rerun and audited, whereas a sequence of Excel clicks cannot
- For a Kenyan organisation with a constrained budget, JASP, R, Python and a free SQL database together cover the entire syllabus at no licence cost
- Whatever the tool, the analysis must be documented so that another person can repeat it and reach the same result, which is the same discipline as documented information in Documentation and Records Management for Quality
Self-check
Distinguish the four levels of measurement and state, for each, one quality characteristic measured at that level and one statistic that would be inappropriate. (10 marks)
A quality manager presents a three-dimensional pie chart titled 'Quality Performance' showing rejects by department, and concludes that quality is deteriorating. Criticise the presentation and state how you would present the same data. (8 marks)
Show worked answer
Levels of measurement (10 marks: 4 for the distinctions, 3 for the examples, 3 for the inappropriate statistics).
Nominal data records categories with no inherent order. Quality example: defect type, recorded as crack, scratch or contamination. Inappropriate statistic: the mean, since there is no meaningful average of 'crack' and 'scratch'; only the mode and frequencies are permissible, with the chi-square test for association.
Ordinal data records ordered categories where the intervals between them are not equal or not known. Quality example: nonconformity severity recorded as minor, major or critical. Inappropriate statistic: the mean, because the distance from minor to major is not necessarily the same as from major to critical, so averaging the codes 1, 2 and 3 assumes an equality that does not exist. The median and rank-based tests are appropriate.
Interval data has equal intervals but an arbitrary rather than a true zero. Quality example: process temperature in degrees Celsius. Inappropriate statistic: a ratio, since 40 degrees Celsius is not twice as hot as 20 degrees; zero Celsius is a convention, not an absence of temperature. The mean, standard deviation and t-tests are permissible.
Ratio data has equal intervals and a true zero. Quality example: fill volume in millilitres, or time to repair in minutes. All statistics are permissible, including ratios and the coefficient of variation, because a fill of 500 ml genuinely is twice 250 ml. There is no statistic that is inappropriate on grounds of measurement level, though a statistic may still be inappropriate for other reasons, for example a mean on a strongly skewed distribution where the median describes the data better.
Criticising the presentation (8 marks: 5 for the criticism, 3 for the alternative).
Criticisms:
1. The chart type does not match the question. A pie chart shows composition at one point in time; it cannot show change over time, so it cannot support a conclusion that quality is deteriorating. Nothing in the chart addresses the claim made from it.
2. The three-dimensional effect distorts the data. Perspective makes segments nearer the front appear larger than segments of equal value further back, so the reader's comparison of departments is systematically wrong.
3. The title states a topic rather than a finding. 'Quality Performance' tells the reader nothing, so the reader must derive the message, which most will not do.
4. Rejects by department is not a measure of quality performance unless it is normalised. A department producing ten times the volume will show more rejects while performing better, so the chart may invert the true ranking; the rate, rejects per thousand units, is the meaningful measure.
5. No sample size, period or baseline is given, so the reader cannot judge whether any difference is real or within normal variation.
6. Comparison across categories is what bar charts do well and pies do badly, since humans compare lengths accurately and angles poorly.
How I would present it: a line chart of reject rate over at least twelve months, rejects per thousand units on the vertical axis starting at zero, with one line per department or, better, one line for the total with the departments shown separately on a small multiple. The title states the finding, for example 'Reject rate has risen in Assembly since March; other departments are unchanged'. Control limits should be added if the process is in statistical control, so that the reader can see whether the movement is signal or noise. Volume by department should be given in an accompanying table so the reader can see the exposure behind each rate, and the sample period and any change in measurement method should be stated.