Back to the 2025 paper

Unit 1: Introduction

20254m

Suppose 10000 patients are tested for flu; out of them, 9000 are actually healthy and 1000 are actually sick. For the sick people, a test was positive for 620 and negative for 380. For the healthy people, the same test was positive for 180 and negative for 8820. Construct a confusion matrix.

Worked SolutionAI Assisted

Confusion Matrix Construction (Actual vs Predicted):

Given 10,000 patients: 1,000 actually Sick (Positive class), 9,000 Healthy (Negative).

Test results:

  • Sick: 620 Positive (TP), 380 Negative (FN)
  • Healthy: 180 Positive (FP), 8820 Negative (TN)

Matrix (rows=Actual, cols=Predicted):

Predicted Positive Predicted Negative Row Total
Actually Sick (P) 620 (TP) 380 (FN) 1,000
Actually Healthy (N) 180 (FP) 8820 (TN) 9,000
Col Total 800 9200 10,000

Alternatively Predicted as rows — equivalent transpose; specify.

Derived metrics (optional):

  • Accuracy =(620+8820)/10000=94.4%=(620+8820)/10000=94.4\% (misleading due imbalance)
  • Precision =620/(620+180)=77.5%=620/(620+180)=77.5\%
  • Recall/Sensitivity =620/1000=62%=620/1000=62\%
  • Specificity =8820/9000=98%=8820/9000=98\%
  • False Positive Rate =2%=2\%

Note: Despite high accuracy, recall only 62% — 38% sick missed, critical for medical test. Confusion matrix reveals class imbalance impact better than accuracy alone.

Similar questions

MACHINE LEARNINGA patient takes a lab test and the result comes back positive. It is known that the test returns a correct positive result in only 98% of the cases and a correct negative result in only 97% of the cases. Furthermore, only 0.008 of the entire population has this disease. (i) What is the probability that this patient has cancer? (ii) What is the probability that he does not have cancer? (iii) What is the diagnosis?20237mData MiningThe results of an exam are recorded along with some data about the students. The results can be found in the table below : | ID | Cell No. | Language | Passed all Assignments | GPA | Passed Exam | | :---: | :---: | :---: | :---: | :---: | :---: | | 1 | 93333-11101 | Java | No | 3.1 | Yes | | 2 | 93333-11112 | Java | No | 2.0 | No | | 3 | 93333-11102 | C++ | Yes | 3.5 | Yes | | 4 | 93333-11113 | Python | Yes | 2.5 | Yes | | 5 | 93333-11103 | Java | Yes | 3.9 | No | | 6 | 93333-11114 | C++ | No | 2.9 | No | | 7 | 93333-11104 | Java | No | 1.9 | No | | 8 | 93333-11115 | Python | Yes | 3.2 | Yes | In no more than one page of text, describe the design of a K-Nearest Neighbour classifier to predict if a student will fail or pass the exam.202110mSoftware EngineeringA program accepts marks from 0 to 100. Construct test cases using Boundary Value Analysis and Equivalence Class Testing and compare the resulting test sets.20267mMACHINE LEARNINGApply the ID3 algorithm on the following data to draw a decision tree. Show the Information Gain at each split. ### Dataset | Outlook | Temperature | Humidity | Windy | PlayTennis | |-----------|-------------|----------|-------|-------------| | Sunny | Hot | High | False | No | | Sunny | Hot | High | True | No | | Overcast | Hot | High | False | Yes | | Rainy | Mild | High | False | Yes | | Rainy | Cool | Normal | False | Yes | | Rainy | Cool | Normal | True | No | | Overcast | Cool | Normal | True | Yes | | Sunny | Mild | High | False | No | | Sunny | Cool | Normal | False | Yes | | Rainy | Mild | Normal | False | Yes | | Sunny | Mild | Normal | True | Yes | | Overcast | Mild | High | True | Yes | | Overcast | Hot | Normal | False | Yes | | Rainy | Mild | High | True | No |202510m
AI LearningWeb Platform

Coursify — Personal AI Course Generator

Struggling with a difficult subject or concept? Turn any engineering topic into a structured course with interactive lessons, quizzes, and research-backed explanations.