CQP Foundation LevelQuantitative Skills and Data Analytics
Chapters
Chapter 1

Part A: Foundations

Introduction to analytics

Last updated November 20265 sectionsabout 15 min read

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

Data
Raw, unprocessed facts and figures: 496, 502, 488. Data has no meaning until it is given context.
Information
Data placed in context and processed: 'the mean fill of the last twenty 500 ml bottles was 495.3 ml'.
Knowledge
Information combined with experience and interpretation: 'the filler is drifting low, as it did before the last bearing failure'.
Data analytics
The systematic examination of data to draw conclusions, using statistical, computational and visual methods.

The four types of analytics, in increasing order of difficulty and value

Type of analyticsQuestion it answersTypical methodQuality example
DescriptiveWhat happened?Summary statistics, charts, dashboardsLast month's defect rate by line and shift
DiagnosticWhy did it happen?Drill-down, correlation, hypothesis testing, root cause analysisWhether the rise in rejects is associated with a particular supplier
PredictiveWhat is likely to happen?Regression, classification, time series forecastingPredicting seal strength from sealing temperature and dwell time
PrescriptiveWhat should we do?Optimisation, simulation, decision analysisThe 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 measurementPropertyPermissible statisticsQuality example
NominalCategories with no orderMode, frequency, chi-squareDefect type: crack, scratch, contamination
OrdinalOrdered categories, unequal intervalsMedian, percentiles, rank testsSeverity rating: minor, major, critical
IntervalEqual intervals, arbitrary zeroMean, standard deviation, t-testsTemperature in degrees Celsius
RatioEqual intervals, true zeroAll of the above, plus ratios and coefficient of variationFill volume in ml, weight in kg, time in minutes
Qualitative or categorical data
Data recording a category: nominal and ordinal. In quality work these are attribute data, counted rather than measured, and analysed with p charts and c charts.
Quantitative or numerical data
Data recording a quantity: interval and ratio. In quality work these are variable data, measured on a continuous scale, and analysed with mean and range charts and capability indices.
Discrete quantitative data
Counts, which can only take whole values: number of defects per unit, number of complaints per month.
Continuous quantitative data
Measurements, which can take any value in a range: fill volume, moisture content, tensile strength.
Primary data
Collected by the analyst for the present purpose: a survey, a set of measurements taken from the line.
Secondary data
Collected by someone else for another purpose: KNBS statistics, sector reports, the organisation's own historical records.
Structured, semi-structured and unstructured data
Structured data sits in defined fields in a database; semi-structured carries tags but no fixed schema; unstructured data is free text, images, audio and video, which is the majority of what an organisation holds and the hardest to analyse.

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 problemHow to detect itHow to treat it
Missing valuesCount nulls by field; look for patterns in what is missingInvestigate the cause; delete the case, impute, or analyse the missingness itself
DuplicatesCheck for repeated key valuesDeduplicate on a defined key, retaining the most complete record
OutliersBox plot, values beyond 1.5 times the interquartile range, z-scores beyond 3Investigate, do not delete automatically; an outlier may be the most important observation
Inconsistent codingFrequency table of a categorical fieldStandardise: 'Nairobi', 'NAIROBI' and 'nairobi' are one category
Wrong data typeField stored as text when it should be numericConvert, after checking why it was stored wrongly
Impossible valuesRange checks against physical limitsA negative fill volume or an age of 200 is an entry error, not a measurement
Units mixedDistribution with two clusters an order of magnitude apartStandardise units; grams and kilograms in one field is a common and dangerous error
Date format inconsistencyParse failures; dates in the futureStandardise 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

SoftwareTypeStrengthsLimitationsCost
MS ExcelSpreadsheetUniversally available, immediate, good for modest datasets, pivot tables, chartsRow limits, error-prone formulas, poor reproducibility, weak on advanced statisticsLicensed
SPSSStatistical packageMenu-driven, comprehensive statistics, standard in social research, well-documented outputExpensive licence, proprietaryLicensed, costly
JASPStatistical packageFree and open source, SPSS-like interface, produces publication-ready output, includes Bayesian methodsSmaller feature set than SPSS, younger communityFree
RProgramming languageFree, vast statistical library, fully reproducible, excellent graphics through ggplot2Requires programming; steeper learning curveFree
PythonProgramming languageFree, general purpose, strong data handling (pandas), machine learning (scikit-learn), automationRequires programmingFree
SQLQuery languageThe standard way to extract and aggregate data from a databaseNot an analysis tool in itselfFree implementations available
Power BI / TableauVisualisation and BIInteractive dashboards, connects to many sources, good for recurring reportingLicence cost; can hide poor underlying dataLicensed
MinitabStatistical packageBuilt for quality: control charts, capability, gauge R and R, design of experimentsLicence costLicensed
  • 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.

Test Your Knowledge

3 questions on this chapter
Question 1 of 3A food plant records the severity of each nonconformity as minor, major or critical, coded 1, 2 and 3. Which statistic is appropriate for summarising a month's severity ratings?
Pick an option first
Question 2 of 3In one month Assembly made 60,000 units with 120 rejects and Finishing made 9,000 units with 45 rejects. Measuring performance as the chapter recommends, which department performed worse?
Pick an option first
Question 3 of 3Why is it wrong to say that a process running at 40 degrees Celsius is twice as hot as one running at 20 degrees Celsius?
Pick an option first