Pick the right learner.

Six original Cambridge-style questions on machine learning categories and regression, with worked solutions.

Original questions All questions on this page are original work, written in the Cambridge AS & A Level style. They are not from past papers. They test the same concepts and skills the syllabus rewards.
Keep these straight

Start from the data.

01
Recall
[2 marks]

State what is meant by machine learning.

  • A type of AI in which a program learns from data / experience. ✓
  • So it improves its performance at a task without being explicitly programmed with the rules. ✓
02
Explain
[4 marks]

Explain the difference between supervised learning and unsupervised learning. Give an example application of each.

  • Supervised learning uses labelled training data: each input has the correct output. ✓
  • The model learns to predict the output for new inputs, e.g. classifying emails as spam or not spam / predicting prices. ✓
  • Unsupervised learning uses unlabelled data, so no correct output is given. ✓
  • The model finds patterns or groups itself, e.g. clustering customers by buying habits. ✓
03
Explain
[4 marks]

Describe how reinforcement learning is used to train a robot to walk.

  • The robot is the agent; the floor and its body physics are the environment. ✓
  • In each state the robot chooses an action (e.g. move a joint) by trial and error. ✓
  • It receives a reward for progress (e.g. moving forward) and a penalty for falling. ✓
  • Over many attempts it updates its policy to choose actions that maximise its total reward. ✓
04
Calculate
[4 marks]

A company records the years of experience and salary (in thousands) of four employees.

Years, x2468
Salary, y30344147

Calculate the least squares regression line y = mx + c and use it to predict the salary for 10 years of experience.

  • Means x̄ = 5, ȳ = 38. ✓
  • Σ(x − x̄)(y − ȳ) = (−3)(−8) + (−1)(−4) + (1)(3) + (3)(9) = 24 + 4 + 3 + 27 = 58; Σ(x − x̄)2 = 9 + 1 + 1 + 9 = 20. ✓
  • m = 58 ÷ 20 = 2.9; c = 38 − 2.9 × 5 = 23.5, so y = 2.9x + 23.5. ✓
  • For x = 10: y = 29 + 23.5 = 52.5 (thousand). ✓
05
Apply
[3 marks]

For each situation, identify the most suitable category of machine learning: (a) a bank groups transactions to find unusual patterns that may be new types of fraud; (b) a hospital trains a system on X-rays that doctors have already marked as healthy or diseased; (c) a program learns to control the traffic lights at a junction by being scored on how short the queues are.

  • (a) Unsupervised learning (clustering / anomaly detection, no labels). ✓
  • (b) Supervised learning (labelled X-rays, classification). ✓
  • (c) Reinforcement learning (actions scored by a reward, no labelled data). ✓
06
Analysis
[3 marks]

A teacher fits the line y = 4.1x + 47.7 to data on hours of revision (1 to 5 hours) and test score (out of 100). She uses it to predict the score of a student who revises for 40 hours. Comment on this use of the model.

  • The prediction is 4.1 × 40 + 47.7 = 211.7, which is impossible for a test out of 100. ✓
  • 40 hours is far outside the range of the training data (1 to 5 hours), so this is extrapolation. ✓
  • The relationship is unlikely to stay linear, so the model should only be used within (or close to) the range of its training data. ✓

Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.