Computer ScienceCore20 min read

Data Analytics

Four questions data can answer, in increasing order of difficulty

This topic appears in:

01

Four kinds of question

Data analytics is often presented as a list of techniques. It is more usefully understood as four questions, each harder than the last, and knowing which one you are being asked prevents most wasted effort.

TypeQuestion it answersExample
DescriptiveWhat happened?sales fell 12% last quarter
DiagnosticWhy did it happen?the fall came entirely from one region
PredictiveWhat is likely to happen?sales will fall again unless something changes
PrescriptiveWhat should we do?move the advertising budget to that region

Most real work is descriptive, and that is fine

Students assume prediction is the goal and describe it as the point of analytics. In practice most valuable analysis is descriptive and diagnostic — organisations frequently do not know what happened last month, let alone why. A clear answer to "what happened" is worth more than a shaky prediction, and a question asking you to justify an approach usually rewards saying so.

02

The analytics pipeline

The stages are the same as in data science, and each one can invalidate everything after it.

Collection gathers the data. Cleaning removes duplicates, corrects errors and handles missing values — usually the longest stage. Transformation puts it into a usable shape: combining sources, converting units, deriving new columns. Analysis looks for the pattern. Visualisation and interpretation present it to someone who must act on it.

  • Structured data fits neatly into rows and columns — a sales table, a student record.
  • Unstructured data does not — photographs, free-text comments, audio. Most data generated today is unstructured.
  • Semi-structured data has some organisation but no fixed table shape, such as JSON or XML.
  • Metadata is data about data: when a file was created, by whom, in what format.
03

Describing a dataset honestly

Before any conclusion, summarise. The mean uses every value and is distorted by extremes; the median ignores them; the mode is the only one that works for categories. Spread matters as much as centre: the range is quick but depends only on the two extreme values, while the standard deviation uses all of them and stays in the original units.

Quoting a centre without a spread is how misleading summaries are made. "Average marks were 60" is compatible with everyone scoring 60 and with half the class scoring 20 and half scoring 100 — two situations demanding completely different responses.

Worked example

Two branches each report average monthly sales of Rs 500 000. Branch A ranges from 480 000 to 520 000; Branch B from 100 000 to 900 000. What does this tell a manager?

  1. The means are identical, so the mean alone cannot distinguish the branches at all.This is exactly why a summary needs a measure of spread as well as a centre.
  2. Branch A has a range of 40 000 and Branch B a range of 800 000 — twenty times larger.The range is crude but the difference here is far too large to be noise.
  3. Branch A is predictable, so stock and staffing can be planned confidently.Low variability has real operational value beyond the average itself.
  4. Branch B is volatile: some months are excellent and some may not cover its costs.A month at 100 000 might be a loss, which the average conceals completely.
  5. The manager should investigate what drives Branch B's variation before treating the two as equivalent.That is a diagnostic question, and it is the one the data has raised.

Equal means but very different spread — Branch A is predictable, Branch B is volatile and needs investigation.

The ogive is the one worth studying here. Reading across at N/2 gives the median and at N/4 and 3N/4 the quartiles, so the middle half of the data can be read straight off the graph.

04

Correlation, causation and the ways analysis misleads

A correlation means two variables move together. It does not mean one causes the other, and the reasons it might not are worth knowing by name.

There may be a third factor causing both — ice cream sales and drownings both rise with temperature. The causation may run the other way — do police numbers cause crime, or does crime cause police numbers? Or it may be pure coincidence, which becomes more likely the more pairs of variables you test.

Three specific ways a chart lies

A truncated axis — starting the vertical axis at 95 rather than 0 turns a 2% change into a dramatic cliff. Cherry-picked ranges — choosing the start date that makes the trend look strongest. Missing context — a rise in reported cases may mean more disease or simply more testing. When a question asks you to criticise a presentation of data, these three cover most of what there is to say.

05

Turning analysis into a decision

Analysis that nobody acts on has produced nothing. The final stage is communication, and the same rules apply as in any technical writing: state the finding first, support it with the evidence, and be explicit about what the data cannot tell you.

The most valuable habit is stating the limitation yourself. "Sales rose 12% after the campaign, but a competitor also closed that month, so the campaign cannot be credited with all of it" is a stronger report than one claiming the full effect — because the person acting on it can now weigh it properly.

Before you leave this chapter

  1. Descriptive, diagnostic, predictive, prescriptive — know which question is being asked.
  2. Cleaning is the longest stage, and everything after it depends on it.
  3. Always report spread alongside centre. Equal means can hide completely different situations.
  4. Correlation may be a third factor, reversed causation, or coincidence.
  5. Truncated axes, cherry-picked ranges and missing context are how charts mislead.

Practice questions

6 questions · 20 marks · full working on every one

Try each one on paper first, then open the working. The marks are shown where they are actually awarded, because that is where they are actually lost.

Short questions

3 · 6 marks

Two marks each, in the style of the short-question section of the paper. Answer in two or three lines.

SQ1[2 marks]
Differentiate between descriptive and predictive analytics.
Model answer

Descriptive analytics summarises what has already happened — sales fell 12% last quarter. Predictive analytics uses historical patterns to estimate what is likely to happen next, and its output is a probability rather than a fact.

Examiner tip. Mentioning that a prediction is a likelihood rather than a certainty usually secures the second mark.

SQ2[2 marks]
Give one example each of structured and unstructured data.
Model answer

Structured: a table of student records with fixed columns for name, roll number and marks. Unstructured: free-text comments in a feedback form, or photographs — data with no fixed row-and-column shape.

Examiner tip. Most data produced today is unstructured, which is worth adding as it explains why analytics is harder than a spreadsheet.

SQ3[2 marks]
Why should a report of an average also state a measure of spread?
Model answer

Because very different situations can share the same average. A mean of 60 is consistent with everyone scoring 60 and with half the class scoring 20 while half scored 100 — and those two situations require completely different responses.

Examiner tip. The concrete example is worth more than the general statement. Give actual numbers.

Solved numericals

2 · 8 marks

Full working, one step per line, with the marks shown where they are awarded.

N1[4 marks]
A study finds that students who eat breakfast score higher in examinations. Explain three reasons this does not prove breakfast causes higher marks.
Full working
  1. A third factor may cause both — a settled home routine could produce both regular breakfasts and regular study[1]
  2. Reverse causation is possible — students who are already doing well may be less anxious and therefore more able to eat in the morning[1]
  3. The sample may not be representative, or the difference may be small enough to be chance[1]
  4. Establishing causation would require a controlled study in which breakfast is the only difference between comparable groupsthe remedy is the fourth mark[1]

A third factor, reverse causation, or chance — only a controlled study could establish a cause.

Examiner tip. Ending with what would establish causation shows you understand the distinction rather than reciting the slogan.

N2[4 marks]
A graph shows company profits rising steeply. The vertical axis runs from 98 to 102. Explain what is misleading and how it should be presented.
Full working
  1. The vertical axis is truncated, starting at 98 rather than 0[1]
  2. This magnifies a change of about 4% into what appears to be a dramatic risethe visual slope is unrelated to the real change[1]
  3. The axis should start at zero so the height of each point is proportional to its value[1]
  4. If a truncated axis is genuinely necessary to show small variation, it must be clearly labelled and the actual percentage change statedthe honest alternative, not simply a prohibition[1]

A truncated axis exaggerates a 4% change. Start at zero, or label the truncation and state the real change.

Examiner tip. A truncated axis is not always dishonest — sometimes small variation is the point. What makes it misleading is failing to say so.

Long questions

1 · 6 marks

Theory and numerical together, as they appear in the long-question section.

LQ1[6 marks]
A school collects data on attendance, homework completion and examination results for 400 students.
  1. Describe what descriptive and diagnostic analysis of this data might reveal.
  2. Explain two problems that could make the analysis unreliable.
  3. Explain why a predicted result should not by itself determine how a student is treated.
Mark scheme
  1. Descriptive: average attendance, the distribution of results, how many students fall below a threshold[1]
  2. Diagnostic: whether low results are concentrated in particular classes, subjects or year groups, and whether they coincide with low attendancediagnostic looks for where and why[1]
  3. Problem: incomplete or inconsistent data — attendance recorded differently by different teachers, or missing entries treated as zero[1]
  4. Problem: correlation misread as causation — low attendance and low marks may both follow from a third cause such as illness or family circumstances[1]
  5. A prediction is a statistical statement about a group, not a fact about the individual student[1]
  6. Acting on it risks becoming self-fulfilling: a student treated as likely to fail may receive lower expectations and therefore do worsethe self-fulfilling point is the strongest available[1]

(a) distributions and where problems concentrate (b) inconsistent recording, and correlation read as cause (c) a prediction describes a group and can become self-fulfilling

Examiner tip. Missing values recorded as zero is the specific data-quality problem worth naming here — a missing attendance mark becoming 0% would corrupt every average in the analysis.