Sample questions
Question 1Easy
With TP=40, FP=10, FN=20, TN=30, the precision is
- 0.80
- 0.67
- 0.70
- 0.57
Answer: A. 0.80
Explanation
Precision = TP/(TP+FP) = 40/50 = 0.80.
Step-by-step solution
- Precision is true positives divided by sum of true and false positives.
- TP + FP = 40 + 10 = 50.
- Precision = 40 / 50 = 0.80.
Why the other options are wrong
- B. 0.67 is recall for these numbers, not precision; precision is TP over TP plus FP.
- C. 0.70 is not a ratio from these values; precision is 40 / 50 = 0.80.
- D. 0.57 cannot come from these counts; precision is TP divided by TP plus FP, which is 0.80.
Tip: Use TP/(TP+FP) formula directly for precision.
Question 2Easy
- Specificity
- Sensitivity or true positive rate
- Precision
- False positive rate, FP divided by all actual negatives
Answer: B. Sensitivity or true positive rate
Explanation
Recall = TP/(TP+FN): of all actual positives, the fraction found.
Step-by-step solution
- Actual positives = TP+FN.
- Recall = TP / that.
- Same as sensitivity.
Why the other options are wrong
- A. That is the true negative rate.
- C. Precision is TP/(TP+FP).
- D. That is FP/(FP+TN).
Question 3Easy
A confusion matrix has TP=40, FP=10, FN=20, TN=30. What is the accuracy?
- 70%
- 80%
- 60%
- 75%
Answer: A. 70%
Explanation
Accuracy = (TP+TN)/total = (40+30)/100 = 70%.
Step-by-step solution
- Accuracy = (TP + TN) / total.
- Here TP = 40 and TN = 30, so correct = 70.
- Total = 40 + 10 + 20 + 30 = 100, so accuracy = 70/100 = 70%.
Why the other options are wrong
- B. 80% would need 80 correct out of 100; TP + TN is 70.
- C. 60% would be (TP + FN) / total style sums, not the accuracy.
- D. 75% is not (TP + TN) / total for these numbers.
Tip: Accuracy = correct predictions (TP + TN) divided by all predictions.
Question 4Easy
If the MSE of a model is 16 (in squared units), the RMSE is
- 8
- 256
- 16
- 4
Answer: D. 4
Explanation
RMSE = square root of MSE = 4.
Step-by-step solution
- MSE is 16 in squared units.
- RMSE is the square root of MSE.
- Square root of 16 = 4.
- So RMSE is 4.
- Final answer: 4.
Why the other options are wrong
- A. 8 is half of 16, not its square root; the square root of 16 is 4.
- B. 256 is 16 squared, the wrong direction; RMSE takes the square root of the MSE.
- C. 16 is the MSE itself; RMSE is the square root of 16, which is 4.
Tip: RMSE is always the square root of MSE.
Question 5Medium
A confusion matrix has TP=30, FP=20, FN=10, TN=40. What is the false positive rate?
- 2/3
- 0.40
- 0.25
- 1/3
Answer: D. 1/3
Explanation
FPR = FP/(FP+TN) = 20/60 = 1/3.
Step-by-step solution
- False positive rate = FP / (FP + TN).
- Here FP = 20 and TN = 40, so FP + TN = 60.
- FPR = 20/60 = 1/3.
Why the other options are wrong
- A. 2/3 divides by the wrong total; FPR divides FP by actual negatives (FP + TN = 60).
- B. 0.40 would be 20 / 50, which is not the actual negative count.
- C. 0.25 would be FP over total predictions 80, not actual negatives.
Tip: FPR = FP / (actual negatives) = 1 minus specificity.
Question 6Medium
Actual values are 3, 5, 7 and predictions are 2, 5, 9. What is the MAE?
- 1
- 2
- 5/3
- 1/3
Answer: A. 1
Explanation
Absolute errors are 1, 0, 2; sum 3, divided by 3 gives 1.
Step-by-step solution
- Absolute error for 3 and 2 is |3 - 2| = 1.
- Absolute error for 5 and 5 is |5 - 5| = 0.
- Absolute error for 7 and 9 is |7 - 9| = 2.
- Sum of absolute errors = 1 + 0 + 2 = 3.
- Mean Absolute Error = 3 / 3 = 1.
Why the other options are wrong
- B. 2 is the largest single error, not the mean; the average absolute error is 3 / 3 = 1.
- C. 5/3 divides the sum by 5, not by the three errors; 3 divided by 3 is 1.
- D. 1/3 would need a total error of 1; the total absolute error is 3, so the MAE is 1.
Tip: Add absolute errors, divide by number of data points.
Question 7Medium
For a spam filter, the cost of blocking a genuine email is high. Which metric should be kept high?
- Recall of the spam class only
- Training loss
- Precision of the spam class
- The number of features
Answer: C. Precision of the spam class
Explanation
Blocking genuine mail is a false positive. High precision means few legitimate emails are flagged.
Step-by-step solution
- Blocking a genuine email is a false positive.
- Precision of the spam class is the share of emails flagged as spam that really are spam.
- So precision of the spam class should be kept high.
Why the other options are wrong
- A. Recall of spam measures how much spam is caught, not the cost of blocking genuine mail.
- B. Training loss is a model-fitting measure, not what the cost of blocking a genuine email is about.
- D. The number of features does not relate to the cost of false alarms.
Tip: High cost of false alarms = optimise precision; high cost of misses = optimise recall.
Question 8Medium
A fraud dataset has 99% legitimate transactions. A model that predicts 'legitimate' for everything has accuracy
- 99%, which shows accuracy is misleading on imbalanced data
- 50%, because it guesses
- 0%, because it never detects a single fraud case
- 100%, because it never errs
Answer: A. 99%, which shows accuracy is misleading on imbalanced data
Explanation
Accuracy rewards the majority class; recall on fraud would be 0, so use precision, recall, F1 or AUC.
Step-by-step solution
- Majority class = 99% of rows.
- Predict majority always.
- Accuracy 99%, recall for fraud 0%.
Why the other options are wrong
- B. It is right on all 99% legitimate rows.
- C. It is still correct on legitimate rows.
- D. It misses every fraud case.
Question 9Hard
A confusion matrix has TP=8, FP=2, FN=4, TN=86. The specificity is closest to
- 0.667
- 0.977
- 0.8
- 0.94
Answer: B. 0.977
Explanation
Specificity = TN/(TN+FP) = 86/88 = 0.977.
Step-by-step solution
- Actual negatives = 86+2 = 88.
- Correct negatives = 86.
- 86/88 = 0.977.
Why the other options are wrong
- A. That is recall, 8/12.
- C. That is precision, 8/10.
- D. That is accuracy, 94/100.
Question 10Hard
A disease affects 1% of people. A test has 90% sensitivity and a 9% false positive rate. The probability a positive-testing person has the disease is about
- 90%
- 50%
- 9%
- 1%
Answer: C. 9%
Explanation
P(D|+) = 0.01*0.9 / (0.01*0.9 + 0.99*0.09) = 0.009/0.0981 = 0.092. The low prevalence makes false positives dominate.
Step-by-step solution
- Positives among 100 people: 1% have disease, sensitivity 90% gives 0.9 true positives per 100 people.
- False positives: 9% of the 99 healthy people, about 8.9.
- Probability disease given positive = 0.9 / (0.9 + 8.9) ≈ 9%.
Why the other options are wrong
- A. 90% is the sensitivity, the chance a sick person tests positive, not the chance a positive is sick.
- B. 50% would need the false positive rate to be near the disease rate, which it is not.
- D. 1% is the disease rate before testing; the positive test raises it to about 9%.
Tip: Rare disease + imperfect test = most positives are false positives (Bayes' rule).
Practise all 23 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →