A confusion matrix is a 2x2 evaluation table used in CBSE AI (Code 417 Part B, 40 marks, and Code 843) to compare predicted outcomes against actual reality. It classifies test predictions into four outcomes: True Positive (TP: predicted Yes, actual Yes), True Negative (TN: predicted No, actual No), False Positive (FP: predicted Yes, actual No), and False Negative (FN: predicted No, actual Yes). Total evaluated cases always equal TP + TN + FP + FN.
- 1. Mapping Reality vs Prediction in the 2x2 Grid
- 2. Worked Board Case: Forest Fire Sensor Dataset
- 3. CBSE Exam Marking Scheme and Practical Verification
- 4. Compute TP, TN, FP, FN from Ground Truth and Predictions
- 5. Confusion Matrix Outcomes Across CBSE Case Scenarios
- 6. Common Mistakes & Top Scorer Tips
- 7. Interactive Concept Check Quiz
- 8. Frequently Asked Questions
1. Mapping Reality vs Prediction in the 2x2 Grid
In CBSE Class 10 AI Unit 7 (Evaluation) and Class 12 Code 843, examiners test whether students can read the rows and columns of a confusion matrix without swapping False Positives and False Negatives. Always read the axis labels before assigning cells, because some NCERT tables place Prediction on rows and Reality on columns, while scikit-learn places Reality on rows and Prediction on columns. First, identify the positive class—such as forest fire detected, spam email, or defective chip. Any cell where Prediction equals Reality is a 'True' outcome (TP or TN). Any cell where Prediction disagrees with Reality is a 'False' outcome (FP or FN). Notice that the second letter (P or N) always reflects what the model predicted, whereas 'True' or 'False' tells whether that prediction matched ground truth.
- True Positive (TP): Prediction = Yes and Reality = Yes (correct positive alert).
- True Negative (TN): Prediction = No and Reality = No (correct normal clearance).
- False Positive (FP): Prediction = Yes but Reality = No (false alarm / Type I error).
- False Negative (FN): Prediction = No but Reality = Yes (missed threat / Type II error).
2. Worked Board Case: Forest Fire Sensor Dataset
Consider a classic CBSE Part B (40 marks) scenario where an AI camera monitors 200 forest sector images for wildfires. Suppose 60 sectors actually have fires, and 140 sectors are safe. The model raises fire alerts for 50 actual fire sectors, misses 10 actual fire sectors, falsely triggers alarms on 15 safe sectors, and correctly clears 125 safe sectors. Writing these into the 2x2 grid gives TP = 50, FN = 10, FP = 15, and TN = 125. Summing all four quadrants checks arithmetic: 50 + 10 + 15 + 125 = 200 total images. Notice how the Actual Yes group sums to TP + FN = 60, while Actual No sums to FP + TN = 140. Verifying row and column totals prevents costly sign or cell-swap errors during board exams.
- Check total count first: TP + TN + FP + FN must equal dataset size (200).
- Actual Positives = TP + FN = 50 + 10 = 60 real wildfire cases.
- Predicted Positives = TP + FP = 50 + 15 = 65 total alarms triggered.
3. CBSE Exam Marking Scheme and Practical Verification
In the CBSE AI assessment structure—Part A Employability Skills (10 marks), Part B Subject Specific Skills (40 marks), and Practical/Project work (50 marks)—Confusion Matrix questions appear in both 2-mark short answers and 4-mark competency case studies in Part B, plus Jupyter Notebook evaluations in the 50-mark Practical. Board marking schemes award step marks for correctly labeling axes, extracting TP, TN, FP, and FN values from a word problem, and verifying the sample sum before computing downstream metrics. In Python lab practicals, learners compare manual counting against scikit-learn's confusion_matrix or pure Python loops. Note that if you change which class is labeled '1' (positive), TP and TN swap places, and FP and FN swap places, so always state the positive class explicitly in your answer.
- Always state which outcome (e.g., Disease = 1, Fire = 1) is the Positive class.
- Verify whether Prediction is on the vertical or horizontal axis before reading values.
- Show the 2x2 table clearly in Part B solutions to secure full step-marking credit.
4. Compute TP, TN, FP, FN from Ground Truth and Predictions
actual = [1, 1, 1, 0, 0, 0, 1, 0, 1, 0]
predicted = [1, 0, 1, 1, 0, 0, 1, 0, 0, 0]
tp = sum(1 for a, p in zip(actual, predicted) if a == 1 and p == 1)
tn = sum(1 for a, p in zip(actual, predicted) if a == 0 and p == 0)
fp = sum(1 for a, p in zip(actual, predicted) if a == 0 and p == 1)
fn = sum(1 for a, p in zip(actual, predicted) if a == 1 and p == 0)
print(f"TP={tp}, TN={tn}, FP={fp}, FN={fn}, Total={tp + tn + fp + fn}")
Verified Console / Dry-Run Output:
TP=3, TN=4, FP=1, FN=2, Total=10
5. Confusion Matrix Outcomes Across CBSE Case Scenarios
| Case Scenario | Predicted vs Actual | Cell Label | Real-World Meaning |
|---|---|---|---|
| Wildfire Alert (Positive = Fire) | Pred: Yes | Actual: Yes | True Positive (TP) | Fire exists and siren correctly triggers |
| Wildfire Alert (Positive = Fire) | Pred: No | Actual: No | True Negative (TN) | Forest is safe and system stays quiet |
| Wildfire Alert (Positive = Fire) | Pred: Yes | Actual: No | False Positive (FP) | False alarm wastes emergency dispatch |
| Wildfire Alert (Positive = Fire) | Pred: No | Actual: Yes | False Negative (FN) | Real wildfire goes undetected (critical risk) |
Master CBSE AI Evaluation Step-by-Step
Practice Code 417 & 843 confusion matrix case studies and Python labs with 4Achievers Junior in 1-on-1 or 1:4 Micro-Pods.
6. Common Mistakes & Top Scorer Tips
- Avoid Mistake: Swapping FP and FN because of ignoring whether rows represent Prediction or Reality.
- Avoid Mistake: Forgetting that the second letter (P or N) comes from the model's prediction, not ground truth.
- Avoid Mistake: Skipping the sanity check that TP + TN + FP + FN equals the total test cases given.
- Examiner / Mentor Tip: In Part B 4-mark case studies, draw the 2x2 grid with explicit 'Prediction' and 'Reality' labels first.
- Examiner / Mentor Tip: Remember the mnemonic: second word = Prediction (Positive/Negative); first word = did it match Reality (True/False)?
- Examiner / Mentor Tip: For the 50-mark Practical viva, know why scikit-learn places actual labels on rows and predicted labels on columns.
7. Interactive Concept Check Quiz
Question: An AI quality-control camera checks 100 circuit boards (Positive = Defective). 20 boards are truly defective, and the model flags 16 of them plus 5 healthy boards as defective. What are FP and FN?
8. Frequently Asked Questions
Does CBSE NCERT put Prediction on rows or columns in a confusion matrix?
Can a confusion matrix have more than four cells?
Why is a confusion matrix better than looking at total correct predictions alone?
Explore Related Lessons & Free Interactive Tools
- All 60 Guides in CBSE AI (417 & 843) Guide Hub
- Accuracy, Precision, Recall & F1 Score Solved Numericals (CBSE 417)
- Why Precision vs Recall Matters: Medical Diagnosis vs Spam Filters
- Overfitting, Underfitting & Train-Test Split in CBSE AI
- Interactive Tool: CBSE AI 417 Confusion Matrix & F1 Score Calculator
- Interactive Tool: CBSE Class 10 Best-of-5 Marks Replacement Calculator
