Introduction To Machine Learning Assignment-Week 4

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Introduction to Machine Learning

Assignment- Week 4
TYPE OF QUESTION: MCQ
Number of questions: 7 Total mark: 7 X 2 = 14
______________________________________________________________________________

QUESTION 1:
A spam filtering system has a probability of 0.95 to correctly classify a mail as spam and 0.10
probability of giving false positives. It is estimated that 1% of the mails are actual spam mails.
Suppose that the system is now given a new mail to be classified as spam/ not-spam, what is the
probability that the mail will be classified as spam?
A. 0.89575
B. 0.10425
C. 0.1085
D. 0.0995

Correct Answer: C. 0.1085

Detailed Solution:

Let S = ‘Mails correctly marked spam by the system’, T= ‘Mails misclassified by the
system’(Marked as spam when not spam or Marked as not spam when it is a spam) , M=
‘Spam mails’.

P(S|M)= 0.95 , P(S|M’) = 0.10 , P(M) = 0.01

We have to find the probability of mail being classified as spam which can either be if a spam
mail is correctly classified as spam or if a mail is misclassified as spam.

𝑃(𝑆) = 𝑃(𝑆|𝑀) * 𝑃(𝑀) + 𝑃(𝑆|𝑀') * 𝑃(𝑀') = 0. 95 * 0. 01 + 0. 10 * 0. 99 = 0. 1085

______________________________________________________________________________

QUESTION 2:
Bag I contains 4 white and 6 black balls while another Bag II contains 4 white and 3 black balls.
One ball is drawn at random from one of the bags and it is found to be black. Find the probability
that it was drawn from Bag I.
A. 1/2
B. 2/3
C. 7/12
D. 9/23

Correct Answer : C. 7/12

Detailed Solution :

B1: “Ball is drawn from bag I”, B2: “Ball is drawn from bag II”, W: “Drawn ball is white”,
B: “Drawn ball is black”

We have to find 𝑃(𝐵1|𝐵)


𝑃(𝐵|𝐵1)*𝑃(𝐵1) (6/10)*(1/2) 3/10 7
𝑃(𝐵1|𝐵) = 𝑃(𝐵|𝐵1)*𝑃(𝐵1)+𝑃(𝐵|𝐵2)*𝑃(𝐵2)
= (6/10)*(1/2)+(3/7)*(1/2)
= 3/10+3/14
= 12

______________________________________________________________________________

QUESTION 3:
4. Consider the following Bayesian network, where F = having the flu and C = coughing:

Find P(C) and P(F|C).

A. 0.35, 0.23
B. 0.35,0.77
C. 0.24, 0.024
D. 0.5, 0.23

Correct Answer: A. 0.35, 0.23

Detailed Solution :

𝑃(𝐶) = 𝑃(𝐶|𝐹) * 𝑃(𝐹) + 𝑃(𝐶|𝐹) * 𝑃(𝐹)


𝑃(𝐶|𝐹)*𝑃(𝐹)
𝑃(𝐹|𝐶) =
𝑃(𝐶|𝐹)*𝑃(𝐹)+𝑃(𝐶|𝐹)*𝑃(𝐹)

______________________________________________________________________________

QUESTION 4:
Consider the following Bayesian network.
Thus, the independence expressed in this Bayesian net are that
A and B are (absolutely) independent.
C is independent of B given A.
D is independent of C given A and B.
E is independent of A, B, and D given C.

Suppose that the net further records the following probabilities:


𝑃(𝐴) = 0. 3
𝑃(𝐵) = 0. 6
𝑃(𝐶|𝐴) = 0. 8
𝑃(𝐶|𝐴) = 0. 4
𝑃(𝐷|𝐴, 𝐵) = 0. 7
𝑃(𝐷|𝐴, 𝐵) = 0. 8
𝑃(𝐷|𝐴, 𝐵) = 0. 1
𝑃(𝐷|𝐴, 𝐵) = 0. 2
𝑃(𝐸|𝐶) = 0. 7
𝑃(𝐸|𝐶) = 0. 7

Find 𝑃(𝐷).
A. 0.32
B. 0.50
C. 0.40
D. 0.78
Correct Answer: A. 0.32

Detailed Solution :
𝑃(𝐷) = 𝑃(𝐷|𝐴𝐵) * 𝑃(𝐴𝐵) + 𝑃(𝐷|𝐴𝐵) * 𝑃(𝐴𝐵) + 𝑃(𝐷|𝐴𝐵) * 𝑃(𝐴𝐵) + 𝑃(𝐷|𝐴 𝐵) * 𝑃(𝐴 𝐵) = 0. 32

____________________________________________________________________________
QUESTION 5:
Consider the following graphical model, mark which of the following pair of random variables
are independent given no evidence?

A. a,b
B. c,d
C. e,d
D. c,e
Correct Answer : A. a,b

Detailed Solution : Nodes a and b don’t have any predecessor nodes. As they don’t have any
common parent node, a and b are independent.

_____________________________________________________________________________

QUESTION 6:
In a Bayesian network a node with only outgoing edge(s) represents

A. a variable conditionally independent of the other variables.


B. a variable dependent on its siblings.
C. a variable whose dependency is uncertain.
D. None of the above.

Correct Answer: A. a variable conditionally independent of the other variables.

Detailed Solution : As there is no incoming edge for the node, the node is not conditionally
dependent on any other node.
______________________________________________________________________________

QUESTION 7:
It is given that 𝑃(𝐴|𝐵) = 2/3 and 𝑃(𝐴|𝐵) = 1/3. Compute the value of 𝑃(𝐵|𝐴).
A. ½
B. ⅔
C. ¾
D. Not enough information.
Correct Solution : D. Not enough information.
Detailed Solution : There are 3 unknown probabilities 𝑃(𝐴), 𝑃(𝐵), 𝑃(𝐴𝐵)which can not be
computed from the 2 given probabilities. So, we don’t have enough information to compute
𝑃(𝐵|𝐴).
______________________________________________________________________________

************END*******

You might also like