Vous êtes sur la page 1sur 4

Lista 1 MAP5922

Exercise 1.5
(Adapted from David Spiegelhalter understandinguncertainty.org). A secret government agency has
developed a scanner which determines whether a person is a terrorist. The scanner is fairly reliable;
95% of all scanned terrorists are identified as terrorists, and 95% of all upstanding citizens are
identified as such. An informant tells the agency that exactly one passenger of 100 aboard an airplane
in which you are seated is a terrorist. The police haul off the plane the first person for which the scanner
tests positive. What is the probability that this person is a terrorist?

TP = Test Positive
TN = Test Negative
T = is Terrorist
NT = is Not Terrorist

𝑃 ( 𝑇𝑃 | 𝑇 ) = 95%
𝑃 ( 𝑇𝑁 | 𝑇 ) = 5%
𝑃 ( 𝑇𝑁 | 𝑁𝑇 ) = 95%
𝑃 (𝑇𝑃 | 𝑁𝑇 ) = 5%
𝑃(𝑇) = 1%
𝑃(𝑁𝑇) = 99%
𝑃 (𝑇𝑃) = 𝑃(𝑇) ∙ 𝑃( 𝑇𝑃 | 𝑇 ) + 𝑃(𝑁𝑇) ∙ 𝑃( 𝑇𝑃 | 𝑁𝑇 ) = 1% ∙ 95% + 99% ∙ 5% = 5,9%
𝑃(𝑇 ∩ 𝑇𝑃) 1% ∙ 95%
𝑃(𝑇|𝑇𝑃) = = = 16,10%
𝑃(𝑇𝑃) 5,9%

Exercise 1.12
Implement the hamburgers, example (1.2) (both scenarios) using BRMLtoolbox. To do so you will need
to do the joint distribution P(hamburgers,KJ) in which dom(hamburgers) = dom(KJ) = {tr,fa}.

1
Exercise 1.19
The weather in London can be summarized as: if it rains one day there's a 70% chance it will rain the
following day; if it's sunny one day there's a 40% chance it will be sunny the following day.

1. Assuming that the prior probability it rained yesterday is 0.5, what is the probability that it was
raining yesterday given that it's sunny today?

𝑃 ( 𝑅𝑇 | 𝑅𝑌 ) = 70%

𝑃 ( 𝑆𝑇 | 𝑆𝑌 ) = 40%

𝑃 ( 𝑅𝑌 | 𝑆𝑇 ) = 42,86%

2. If the weather follows the same pattern as above, day after day, what is the probability that it will
rain on any day (based on an effectively infinite number of days of observing the weather)?

𝑃(𝑅𝑇) = 𝑃(𝑅𝑌)𝑃(𝑅𝑇|𝑅𝑌) + 𝑃(𝑆𝑌)𝑃(𝑅𝑇|𝑆𝑌) = 0,5 ∙ 0,7 + 0,5 ∙ 0,6 = 0,65

3. Use the result from part 2 above as a new prior probability of rain yesterday and recompute the
probability that it was raining yesterday given that it's sunny today.

2
Exercise 2.1
Consider an adjacency matrix A with elements [A]ij = 1 if one can reach state i from state j in one
timestep, and 0 otherwise. Show that the matrix Ak ij represents the number of paths that lead from
state j to i in k timesteps. Hence derive an algorithm that will nd the minimum number of steps to get
from state j to state i.

Exercise 2.6
WikiAdjSmall.mat contains a random selection of 1000 Wiki authors, with a link between two authors
if they `know' each other (see snap.stanford.edu/data/wiki-Vote.html). Assume that if i ++ `knows' j,
then j `knows' i. Plot a histogram of the separation (the length of the shortest path between two ++
users on the graph corresponding to the adjacency matrix) between all users based on separations
from 1 to 20. That is the bin n(s) in the histogram contains the number of pairs with separation s.

Exercise 2.10
A jewel was stolen from a room during a party2. Each of the guests (A,B,C,D,E,F) enters ++ the room,
stays for some time, and leaves. The testimonies they gave to the police are:
1. A: I was present in the room with E, B
2. B: I was present in the room with A, F and E
3. C: I was present in the room with F and D
4. D: I was present in the room with A and F
5. E: I was present in the room with C
6. F: I was present in the room with C and E

One of the statements in the testimonies is false. Which is it?

Notes:
If any two people are present in the room at the same time, then at least one of them will report the
fact that he was present in the room with the other person. Each above testimony should be interpreted
as, for example:

A: I was present in the room with E. I was present in the room with B. It does not necessarily mean that
A was simultaneously present in the room with both E and B (so A and B could have been present in the
room at some time t1, and A and E present in the room at some other time t2). The other testimonies
have a similar interpretation.

3
The testimonies could be partially false. If X says that he was present in the room with Y and Z, it could
be that the statement X was present in the room with Y is true, but X was present in the room with Z is
false.

1.5, 1.12, 1.19


2.1, 2.6, 2.10
3.4, 3.11, 3.12

Vous aimerez peut-être aussi