程序代写 COMP30024 Artificial Intelligence

COMP30024 Artificial Intelligence
Week 12 Problem Sheet Solutions
• Tutors: These are not unique, complete (and definitely not optimally pedagogical) solutions. there are other ways of deriving these results and the way you prefer is to some extent an aesthetic judgement.
• Students: If you want to attain any benefit from the problems you should make a genuine attempt at them before you see the solutions.

Copyright By PowCoder代写 加微信 powcoder

Comments/corrections are as always greatly appreciated by the teaching team.
1. Robotics [T] Suppose for some environment, the odds of there being an obstacle present are 1 in 10 and that a range sensor has a false positive rate of 30% and a false negative rate of 30%.
(a) Use the incremental form of Bayes’ Theorem to find the probability that an obstacle is present if the detector returns three positive detections in a row.
We know p(H = True) = 1/10 (hereafter abbreviated to p(H)), and p(S = +|H) = p(S = −|¬H)=7/10. Wewanttofindp(H=True|S1 =+,S2 =+,S3 =+)=p(H|+++).
We could use the recursive form of Bayes’ Theorem, letting St denote the sequence of observations up until time t.
p(H|St+1) = p(St+1|H)p(H|St) p(St+1 )
= p(St+1 |H )p(H |St ) p(St+1)p(H|St) + p(St+1|¬H)p(¬H|St)
But we could also just note that the evidence consists of 3 independent Bernoulli trials and hence the likelihood is a binomial distribution B(k; n, p) with k = n = 3 successes, and success probability p(S = +|H) = 7/10.

p(H|+ + +) = p(+ + +|H)p(H) p(+++)
􏰋3􏰌p(S = +|H)3p(H) 343 =3=
p(+ + +|H)p(H) + p(+ + +|¬H)p(¬H) 586
(b) What is the probability of no obstacle being present if the detector returns a negative
detection followed by a positive detection?
p(¬H|S1 = −) = p(S1 = −|¬H)p(¬H)
p(S1 = −|¬H)p(¬H) + p(S1 = −|H)p(H)
p(¬H|S1 = −,S2 = +) =
p(S2 = +|¬H)p(¬H|S1 = −)
p(S2 = +|¬H)p(¬H|S1 = −) + p(S2 = +|H)p(H|S1 = −) 10
2. Leckieitis, the Return [T] After your yearly checkup, the doctor has bad news and good news. The bad news is that you tested positive for the serious disease Leckieitis, and the test is 99% ’accurate’ (i.e., the probability of testing positive given that you have the disease is 0.99, as is the probability of testing negative if you don’t have the disease). The good news is that this is a rare disease, striking only one in 10,000 people.
(a) What are the chances that you actually have the disease?
Let L denote the event the patient has the disease, T1 = + be the event that the first test result is positive.
p(L|+) = p(+|L)p(L) = 1 . p(+|L)p(L) + p(+|¬L)p(¬L) 102
Alternatively, it is often faster to use the odds form of Bayes’ rule: p(L|+) = p(+|L)p(L) =⇒ p(L|+) = 1 .
p(¬L|+) p(+¬L)p(¬L) 102
(b) You decide to get tested a second time. The new test is independent of the original test (given your disease status), and has the same ’accuracy’ as the original test. Unfortu- nately, you test positive a second time. Find the probability that you have the diseases in two ways:
(i) In one step, conditioning on both test results simultaneously.
We’ll use the odds form again, noting:
p(L|++) = p(+ + |L)p(L)
p(¬L|++) p(+ + |¬L)p(¬L) =⇒ p(L|++) = 99 .

(ii) In two steps, first updating beliefs based on the first test result, then again based on the second test result.
Reusing your results from part (a),
p(L|++) = p(T2 = +|L)p(L|T1 = +) = 99 . p(¬L|++) p(T2 = +|¬L)p(¬L|T1 = +) 101
So we get the same result as previously. Note with a second positive test result, the conditional probability that the patient has Leckieitis increases dramatically – collecting more information is a good idea when we are uncertain about something.
(c) To be thorough, you visit n Leckieitis screening sites throughout Melbourne, receiving k positive results and n − k negative results. Assuming all tests have identical accuracy and are independent given your disease status, what is the posterior probability that you have Leckieitis?
The evidence consists of n independent Bernoulli trials and hence the likelihood is a binomial distribution B(k; n, p) with k successes, and success probability p(Ti = +|H) = 99/100, with normalization obtained in the standard manner.
􏰎 􏰍􏰍 􏰏 􏰎n􏰏 k n−k
p H􏰍{kpositive,n−knegative} ∝ k p(Ti=+|H)(1−p(Ti=+|H)) p(H) 􏰍

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com