Model Evaluation & Validation MCQs for NSCT
Model evaluation measures how well a trained model performs, using metrics such as precision, recall, F1 and ROC-AUC. Validation means estimating that performance honestly on data the model has not seen, for example with cross-validation. It is topic 9 of the AI, Machine Learning & Data Analytics area, which carries 10% of the NSCT according to HEC's Areas of Competencies. The area's 2026 average was 50.8% accuracy, per the HEC NSCT report and APP.
Every metric below comes from the four cells of a confusion matrix: true positives (TP), false positives (FP), false negatives (FN) and true negatives (TN). We use one running example: TP = 40, FP = 10, FN = 20, TN = 130 (200 rows). For more drills, see confusion matrix practice.
Precision
Precision = TP/(TP + FP): of everything predicted positive, how much really is positive. Example: 40/50 = 0.80.
Precision matters when a false positive is costly, such as a real e-mail sent to spam. Accuracy here is (40 + 130)/200 = 0.85, but on imbalanced data it misleads: calling all 1,000 rows negative when 10 are positive scores 99% and catches nothing.
Exam angle: read the column of predicted positives, not the row of actual positives.
Recall
Recall = TP/(TP + FN), also called sensitivity or the true positive rate (TPR): of all actual positives, how many the model caught. Example: 40/60 = 0.667. Its partner on the negative side is specificity = TN/(TN + FP) = 130/140 = 0.929, and the false positive rate is 1 - specificity = 0.071.
Exam angle: choose recall when a miss (false negative) is costly, as in cancer screening or fraud. Raising the decision threshold can never increase recall.
F1
F1 = 2PR/(P + R) = 2TP/(2TP + FP + FN), the harmonic mean. Example: 80/110 = 0.727, slightly below the arithmetic mean of 0.733.
The harmonic mean punishes imbalance: P = 0.5 and R = 1.0 give F1 = 0.667, not 0.75. F-beta = (1 + b^2)PR/(b^2 P + R) shifts the weight; F2 favours recall and F0.5 favours precision. For several classes, macro averaging takes the plain mean of per-class scores, while micro averaging pools TP, FP and FN first.
Exam angle: two models can share an F1 yet suit different problems, so check which error costs more.
ROC-AUC
A ROC curve plots TPR against FPR as the threshold moves from 1 to 0. AUC is the area under it, which equals the probability that a random positive scores higher than a random negative. A value of 0.5 means random ranking, 1.0 means perfect ranking, and below 0.5 means the ranking is reversed.
Example: scores 0.95, 0.85, 0.60, 0.30 with labels 1, 0, 1, 0. There are four positive-negative pairs. The 0.95 positive beats both negatives, and the 0.60 positive beats 0.30 but not 0.85, so AUC = 3/4 = 0.75.
When positives are rare, the precision-recall curve is usually more informative, because a small FPR can still hide many false alarms.
Cross-validation
k-fold cross-validation splits the data into k folds and trains k times, each time holding out one fold. With 1,000 rows and k = 5, every round trains on 800 rows and validates on 200. Variants handle special cases:
| Scheme | Use when |
|---|---|
| Stratified k-fold | Classes are imbalanced; keeps class ratios in every fold |
| Group k-fold | Several rows per patient or user; keeps a group in one fold |
| Time-series split | Order matters; always validate on later periods |
| Leave-one-out (LOOCV) | Very small data; n fits, high cost |
Keep a final test set untouched until the end, because tuning on validation scores makes them optimistic. Fit every preprocessing step (scaling, imputation, oversampling) inside each training fold, or test information leaks into training.
Exam angle: a large gap between training and CV scores signals overfitting, covered in depth in overfitting and underfitting.
Common traps
- Swapping the formulas: precision divides by predicted positives (TP + FP), recall by actual positives (TP + FN).
- Trusting accuracy on imbalanced data. Check precision, recall or F1 for the rare class.
- Averaging precision and recall arithmetically instead of harmonically.
- Reading AUC as accuracy. It measures ranking across all thresholds, not correctness at one.
- Scaling or oversampling the whole dataset before splitting, which leaks test information.
- Using shuffled k-fold on time-ordered data, which lets the model see the future.
Worked examples
1. Understanding. What does ROC-AUC = 0.9 mean? Answer: a randomly chosen positive gets a higher score than a randomly chosen negative 90% of the time. It does not mean 90% accuracy, which depends on the threshold.
2. Application. A model has TP = 30, FP = 20, FN = 10 and TN = 140. Find precision, recall and F1. Answer: precision 0.60, recall 0.75, F1 0.667. Precision = 30/50, recall = 30/40, and F1 = 2(0.6)(0.75)/1.35 = 0.667. Accuracy is 0.85, which looks better than the model really is.
3. Analysis. A student oversamples the minority class with SMOTE on the full dataset, then runs 10-fold CV and gets F1 = 0.95. On new data F1 is 0.70. Why? Answer: leakage. Synthetic rows built from validation points end up in the training folds, so each fold partly tests on near-copies of its training data. Oversample only inside each training fold, for example with a pipeline.
Practise
The quiz below has 100 Model Evaluation & Validation questions, filterable by tier and difficulty.
Practise: 100 questions
FAQs
When should I use F1 instead of accuracy?
Use F1 when the positive class is rare, or when both false positives and false negatives matter and you need one number. Accuracy is fine when classes are balanced and both errors cost about the same. On a 99:1 split, a do-nothing model scores 99% accuracy but 0 F1.
What is the difference between validation and test sets?
The validation set, or the CV folds, guides choices such as hyperparameters, features and model type. Because those choices are fitted to it, its score becomes optimistic. The test set is used once, at the very end, to estimate performance on genuinely new data. Nested cross-validation combines both roles when data is scarce.
Is a higher AUC always better?
For ranking quality on the same data, yes. But AUC summarises all thresholds, while a deployed model uses one. A model with slightly lower AUC may give better precision at the threshold you need. On heavily imbalanced data, also compare PR curves or average precision.
Next step
Continue with Feature Engineering & Selection MCQs, return to the AI & ML MCQ hub, or measure yourself in an NSCT mock test.