
Assignment
1. Let the probability that a road is wet P(w) = 0.3. Let probability of
rain, P(R) = 0.3. Given that 90% of the time when the roads are wet,
it is because it has rained, and it has rained, calculate the posterior
probability that the roads are wet.
2. Let blue, green, and red be three classes of objects with prior prob-
abilities given by P(blue) = 0.3, P(green) = 0.4, P(red) = 0.3. Let
there be three types of objects: pencils, pens, and paper. Let the class-
conditional probabilities of these objects be given as follows. Use Bayes
classifier to classify pencil, pen, and paper.
P(pencil|green) = 0.3 P(pen|green) = 0.5 P(paper|green) = 0.2
P(pencil|blue) = 0.5 P(pen|blue) = 0.2 P(paper|blue) = 0.3
P(pencil|red) = 0.2 P(pen|red) = 0.3 P(paper|red) = 0.5
3. Consider a two-class (Tasty or nonTasty) problem with the following
training data. Use Naive Bayes classifier to classify
Cook = Asha, Health − Status = Bad, Cuisine = Continental
Cook Health-Status Cuisine Tasty
Asha Bad Indian Yes
Asha Good Continental Yes
Sita Bad Indian No
Sita Good Indian Yes
Usha Bad Indian Yes
Usha Bad Continental No
Sita Bad Continental No
Sita Good Continental Yes
Usha Good Indian Yes
Usha Good Continental No
4. Consider the following dataset with three features f1, f2, and f3. Con-
sider the test pattern f1 = a, f2 = c, f3 = f. Classify it using
NNC and Naive Bayes Classifier.