0% found this document useful (0 votes)
87 views

Assignment 3 Solution

This document discusses Bayes classifier and Naive Bayes classifier. It provides examples of using Naive Bayes classifier to calculate probabilities and classify instances based on given attribute values. Multiple choice questions are included with explanations of the answers.

Uploaded by

KEERTHANA K
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views

Assignment 3 Solution

This document discusses Bayes classifier and Naive Bayes classifier. It provides examples of using Naive Bayes classifier to calculate probabilities and classify instances based on given attribute values. Multiple choice questions are included with explanations of the answers.

Uploaded by

KEERTHANA K
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment Week 3: Bayes Classifier

1. In a multiclass classification problem, Bayes classifier assigns an instance to the class corresponding
to: (1 Mark)

A. Maximum aposteriori probability

B. Maximum apriori probability

C. Lowest aposteriori probability

D. Lowest apriori probability

Ans: A

Explanation: Bayes classifier is also known as MAP (Maximum Aposteriori Probability.)

2. Which of the following is incorrect about Naive Bayes: (1 mark)

A. Attributes can be nominal or numeric

B. Attributes are statistically dependent on one another given the class value.

C. Attributes are equally likely.

D. All of the above.

Ans: B

Explanation: Attributes are statistically independent of one another given the class value.

3. A fair coin is tossed n times. The probability that the difference between the number of heads and
tails is (n-3) is: (1 mark)

A. 2-n

B. 0

C. C(n,n-3)*2-n

D. 2-n+3

Ans: B

Explanation: Let the number of heads = h then the number of tails will be n-h. The difference between
them is n-3 so it is

h – (n - h) = n-3

h = (2n-3)/2 = n – 3/2 which is not an integer value, therefore, the probability of the event is 0.
4. Three companies supply bulbs. The percentage of bulbs supplied by them and the probability of them
being defective is given below:

Company % of bulbs supplied Probability of defective


A 60 0.01
B 30 0.02
C 10 0.03
Given that the bulb is defective probability that it is supplied by B is: (2 marks)

A. 0.1

B. 0.2

C. 0.3

D. 0.4

Ans: D

Explanation: P(B|D) = (P(D|B)*P(B))/P(D)

P(D|B) * P(B) = 0.02 * 0.3 = 0.006

P(D) = P(D|A) * P(A) + P(D|B) * P(B) + P(D|C) * P(C) = 0.01*0.6 + 0.02*0.3 + 0.03*0.10 = 0.015

P(B|D) = 0.006/0.015 = 0.4

5. If P(Z∩X) = 0.2, P(X) = 0.3, P(Y) = 1 then P(Z|X∩Y) is: (1 mark)

A. 0

B. 2/3

C. Not enough data.

D. None of the above.

Ans: B

Explanation: P(Z|X∩Y) = P(Z|X) since P(Y) = 1. Therefore, P(Z|X∩Y) = P(Z∩X)/P(X) = 0.2/0.3= 2/3
For questions 6-7, consider the following hypothetical data regarding the hiring of a person.

GPA Effort Confidence Hire


Low Some Yes No
Low Lots Yes Yes
High Lots No No
High Some No Yes
High Lots Yes Yes

6. Using Naïve Bayes determine whether a person with GPA=High, Effort=Some, and Confidence=Yes be
hired: (2 marks)

A. Yes

B. No

C. The example cannot be classified.

D. Both classes are equally likely

Ans: A

Explanation:

P(Hire=Yes|High, Some, Yes) = P(High, Some, Yes|Hire=Yes)P(Hire=Yes) = 4/45

P(Hire=No|High, Some, Yes) = P(High, Some, Yes|Hire=No)P(Hire=No) = 1/20

P(Hire=Yes|High, Some, Yes)> P(Hire=No|High, Some, Yes)

7. Using Naïve Bayes determine whether a person with Effort=lots, and Confidence=No be hired: (2
marks)

A. Yes

B. No

C. The example cannot be classified

D. Both classes are equally likely

Ans: A

Explanation: P(Hire=Yes|Lots, No) = P(Lots, No|Hire=Yes)P(Hire=Yes) = 0.133

P(Hire=No|Lots, No) = P(Lots, No|Hire=No)P(Hire=No) = 0.1

P(Hire=Yes|Lots, No)> P(Hire=No|Lots, No)

You might also like