/en-tutor-prep-s5-ict-artificial-intelligence-machine-learning/
/en-tutor-prep-s5-ict-artificial-intelligence-machine-learning/
General Inquiry: info@TutorZone.com.hk
Office Hours: Monday to Saturday - 9:00 AM to 6:00 PM
WhatsApp Monday to Sunday - 24 hours
Hotline: +852 6828 1809
Instant Support: +852 9061 3106

ICT | Artificial Intelligence and Machine Learning Prep Guide (for tutors) | Train/Test Split, Confusion Matrix, Overfitting

ICT | Artificial Intelligence and Machine Learning Prep Guide (for tutors) | Train/Test Split, Confusion Matrix, Overfitting

  • 2026-11-19

Students hear 90 percent accuracy and assume the model is good, without asking how many positives the test set holds or whether answering no to everything already scores 85 percent. This lesson turns machine learning into three repeatable moves: split the data, read the four cells, then ask whether the model is cheating.

Objectives — Students will be able to: (1) explain what the training set and the test set each do, and split 1,000 samples 80/20 into 800 and 200; (2) compute accuracy, precision, recall and F1 from the four confusion-matrix cells, writing the arithmetic; (3) compare accuracy against an all-majority baseline and explain why 89 percent can still be useless; (4) use the gap between training and test accuracy to detect overfitting, and explain how data bias makes a test score optimistic.

01 Prerequisites (3-minute check)

If any of these fails, fix it before the lesson starts.

Skill Quick check Pass mark
Percentages and fractions What percentage is 170 out of 200 85 percent; divide then multiply by 100
Bits and bytes Twenty-eight by twenty-eight pixels at one byte each, how many bytes 784 bytes
Averages Mean of the losses 0.64, 0.32, 0.16 and 0.08 0.30

02 Lesson flow (60 minutes)

Time Stage Tutor does Student does
0-6 min Opening diagnostic Ask whether 90 percent accuracy means a good model Each writes one reason, class compares
6-18 min Splitting the data Show 1,000 samples split into 800 and 200; the test set is seen once Split a set and write both numbers
18-32 min The four cells Fill the spam example and compute all four metrics Recompute the same four metrics
32-44 min Baseline and metric trade-offs Show that always answering not-spam scores 85 percent Compare accuracy and recall of two models
44-54 min Overfitting and data bias Show 0.98 train and 0.72 test, a 26 point gap Decide which model overfits
54-60 min Exit check Collect two questions and mark them, naming the faulty cell or formula Work independently

03 Teaching script (read it out)

Scene 1: Step one is always the split, and the test set is seen once

Open with the rule. One thousand samples become eight hundred for training and two hundred for testing, an 80/20 split; the test set stays invisible while the model trains, otherwise it is an open-book exam. The commonest mistake is training on everything and then reporting accuracy on the same data, which is always flattering because the model has already seen the questions.Name the three roles: training data adjusts parameters, validation data helps pick settings, and test data is reported once at the end. At S5 level, training and testing suffice; one sentence on validation is enough, and the deeper version belongs in the project work.Then raise the imbalance: of the two hundred test samples only thirty are spam, and that fact drives every metric that follows, so every step must state how many positives exist.
Students do: split 1,000 samples 80/20 and write both counts.
Students explain: why the test set cannot be watched during training.

Students repeat: training tunes parameters, the test set is reported once.

Scene 2: The confusion matrix: fill the cells first, then compute

The second act is the step students skip. Two hundred test samples hold thirty spam and one hundred seventy genuine mail. The model flags forty as spam, of which twenty-four really are spam (true positives) and sixteen are not (false positives). The remaining six spam messages out of thirty are missed (false negatives), and one hundred seventy minus sixteen leaves one hundred fifty-four correctly passed as normal mail (true negatives). The four cells must add up to two hundred; that is the first check.Accuracy is (TP + TN) over the total: 178 out of 200, or 0.89. Precision is TP over (TP + FP): 24 out of 40, or 0.60, meaning only three in five flagged messages are really spam. Recall is TP over (TP + FN): 24 out of 30, or 0.80, so three in ten spam messages slip through.F1 is the harmonic mean: two times 0.60 times 0.80 divided by (0.60 + 0.80), giving 0.686. Ask students which two cells a tutor would want first if only one number were reported.
Students do: derive accuracy 0.89, precision 0.60 and recall 0.80 from the cells.
Students explain: why precision and recall pull in opposite directions.

Students repeat: the four cells sum to the total; precision watches false positives, recall watches false negatives.

Scene 3: Baseline, overfitting and bias: ask whether the model is cheating

The third act covers three ways of looking clever. Baseline first: always answering not-spam scores 170 out of 200, or 0.85, only four points below our model, so accuracy alone cannot separate them; the baseline recall is zero, catching no spam at all.Overfitting next: training accuracy 0.98 against test accuracy 0.72 is a gap of 26 percentage points, meaning the model memorised the training set instead of learning the pattern. The remedy is more data, a smaller model or stronger regularisation, not more tuning against the same test set.Data bias: if every spam sample in training comes from one source and one language, the model fails elsewhere; if the test set shares that source, the reported score is optimistic, which is a distribution mismatch.Close with a cost question: who pays for this error? A medical screen prefers false positives and a recheck, while a spam filter would rather let one message through than delete an invoice. Metrics are a choice about cost, not only arithmetic.
Students do: compute the accuracy and recall of the all-majority baseline.
Students explain: what a 26 point train-test gap tells you.

Students repeat: check the baseline, then the overfitting gap, then bias and cost.

04 Question types and worked steps

Type Example Steps Answer
Train/test split 1,000 samples at 80/20 Multiply by the ratio and state both counts 800 and 200
Confusion matrix 30 positives, 40 flagged, 24 true positives Fill all four cells so they sum to the total TP 24, FP 16, FN 6, TN 154
Metrics Same four cells Accuracy (TP+TN)/N, precision TP/(TP+FP), recall TP/(TP+FN), F1 harmonic mean 0.89 / 0.60 / 0.80 / 0.686
Baseline and overfitting All-majority guess; 0.98 train vs 0.72 test Compute the majority share, then the gap 0.85 with zero recall; gap 26 points
Sanity check (teach this): Sanity checks: the four cells must sum to the size of the test set, so a total that is too high or too low means a misplaced cell; true positives plus false negatives must equal the number of real positives; accuracy, precision and recall lie between zero and one, so 1.2 means a wrong denominator; F1 never exceeds the larger of precision and recall; overfitting shows a positive train-minus-test gap, while a test score above training usually means too little data or an uneven split; any claim of 90 percent accuracy must state the positive rate or it cannot be judged.

05 Independent practice (3 questions)

Question Answer What to watch
Split 2,000 samples at 90/10 Check both counts are written 1,800 and 200
Precision TP 18, FP 6 Check the denominator is TP+FP 0.75
Recall TP 18, FN 12 Check the denominator is TP+FN 0.60

06 Common mistakes and what to say

Mistake Student writes Say this
Reporting accuracy on the training set Writes 98 percent accuracy over 1,000 samples The test set is seen once; state which batch you are reporting.
Cells that do not sum to the total Writes TP 24, FP 16, FN 12, TN 154 That is 206 out of 200; get false negatives from 30 minus 24.
Swapping precision and recall Writes precision 0.8 and recall 0.6 Precision asks how many flagged are real (24/40); recall asks how many real ones were caught (24/30).
Accepting a high accuracy Writes 90 percent accuracy, ship it Compute the all-majority baseline first, then recall; a model that catches no positives is useless.

07 Homework (paper, section and question numbers)

08 Exit check (last 5 minutes)

Question Answer Decision
Split Train tunes, test reports once Wrong roles mean repeating act one
Confusion matrix Cells sum to the total A wrong sum means two more cells to fill
Metrics Precision watches FP, recall watches FN Swapped means one extra computation

09 Tutor FAQ

What if the class has no probability yet

Avoid symbols entirely; every metric is counting cells divided by a total, and the confusion matrix is just counting.

Should formulas be derived

No. Require students to write the four cells and two divisions; that is enough at this level.

Can this be taught without computers

Yes. Paper cells and a calculator carry the whole lesson; the goal is the meaning of the metrics, not code.

Find a tutor — freeTutor Registration →

A TutorZone lesson-prep guide. Written by the TutorZone team; questions and lesson flow are original and are not taken from any school or publisher material.

Join as a tutor or coach — academic, music, sports, arts, STEM. Free to register. See how it works →