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

Quiz1 Sol

Uploaded by

Aditya Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Quiz1 Sol

Uploaded by

Aditya Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

EE698R: Quiz 1

6 Feb 2024, Tuesday


Maximum marks: 24
Duration: 75 minutes
Total 6 questions, closed book
1. A certain COVID test has a true positive rate, P(detected|covid), of 90% and a false
positive rate, (1-P(not detected|noCovid)), of 5%. In my city, 1% population currently
has COVID. I took the test and it came out to be positive. What is the probability that I
actually have COVID? (3 marks)
Ans: 0.15
P(detected|covid)=0.9, P(detected|noCovid)=0.05, P(covid)=.01
P(covid|detected) = P(detected|covid)P(covid)/P(detected) = .9*.01/(.9*.01+.05*.99) = .15
2. Subal's mom gave him the following list of items to bring from the market: wheat-flour,
rice, rajma, moongdal, jeera, salt, turmeric, ghee, oil. Subal lost the list on his way to
the market and purchased following items: rice, rajma, potato-chips, laddoos, salt,
ghee, oil, saunf. What is the F-measure of Subal? (3 marks)
Ans: 0.588
Estimated True (bought) Estimated False
Ground True rice, rajma, salt, ghee, oil wheat-flour, moongdal, jeera, turmeric
Ground False potato-chips, laddoos, saunf
P=5/8, R=5/9
3. Consider a 3-class classification problem in which the loss incurred when an input
vector from class k is classified as belonging to class j is given by the loss matrix
⎡ 0 4 1 ⎤
Lkj = 2 0 1 .
⎣ 2 0 ⎦
​ ​ ​ ​ ​ ​

If the estimated probabilities for the three classes 0, 1, 2 are p = [0.3, 0.5, 0.2],
respectively, which class would be decided? (3 marks)
Ans: c = 2
c = arg minj ∑k p[k]Lkj = arg minj [1.4, 1.4, 0.8]
​ ​ ​ ​

4. Find KL[N (x; 0, 1)∣∣N (x; 2, 3)]. (4 marks)


Ans: ln 3 + 1/3

2
1 e−x /2 2 2
= ∫ N (x; 0, 1) ln 2π
dx = ln 3 + E[ x +4−4x − x
]

1 2 6 2
e−(x−2) /6
​ ​ ​ ​

where, E[x ] = 1, E[x] = 0


2π3

2
5. Consider a 3-class classification problem in which the loss incurred when an input
vector from class k is classified as belonging to class j is given by the loss matrix
⎡ 0 4 1 ⎤
Lkj = 2 0 1 .
⎣ 2 0 ⎦
​ ​ ​ ​ ​ ​

Draw the decision regions for the three classes on the plane whose axes are
p(c = 0∣x), p(c = 1∣x). (5 marks)
Ans:

Let p(c∣x) = [a, b, 1 − a − b]. The decision will be c = arg min[2 − 2a, 3a − b + 1, a + b].
For decision to be c = 0:
2 − 2a < 3a − b + 1 and 2 − 2a < a + b
i.e., 1 − 5a + b < 0 and 2 − 3a − b < 0
For decision to be c = 1:
3a − b + 1 < 2 − 2a and 3a − b + 1 < a + b
i.e., 1 − 5a + b > 0 and 2a − 2b + 1 < 0
For decision to be c = 2:
a + b < 2 − 2a and a + b < 3a − b + 1
i.e., 2 − 3a − b > 0 and 2a − 2b + 1 > 0
6. A random variable U follows uniform distribution, p (u) = 1, u ∈ (0, 1). Find a
U

transformation f such that X = f (U ; λ) follows exponential distribution,


Xp (x) = λe u(x). Here, u(x) is heaviside function and λ ∈ R. (6 marks)



−λx

Ans: x = f (u) = − ln(1 − u)


1
λ

−1
x=F (u)
Now, F(x) = ∫ λe dt = (1 − e
x −λt −λx
)
sd
0

Thus, u = F(x) = 1 − e −λx

You might also like