Starting from:

$25

EECS592 Project 4- UNCERTAIN REASONINGย  Solved



1. R&N Problem 13.10:  
Deciding to put probability theory to good use, we encounter a slot machine with three independent wheels, each producing one of the four symbols ๐ต๐ด๐‘…, ๐ต๐ธ๐ฟ๐ฟ, ๐ฟ๐ธ๐‘€๐‘‚๐‘, or ๐ถ๐ป๐ธ๐‘…๐‘…๐‘Œ with equal probability. The slot machine has the following payout scheme for a bet of 1 coin (where “?” denotes that we don’t care what comes up for that wheel):       ๐ต๐ด๐‘…/๐ต๐ด๐‘…/๐ต๐ด๐‘… pays 20 coins

                           ๐ต๐ธ๐ฟ๐ฟ/๐ต๐ธ๐ฟ๐ฟ/๐ต๐ธ๐ฟ๐ฟ pays 15 coins

                            ๐ฟ๐ธ๐‘€๐‘‚๐‘/๐ฟ๐ธ๐‘€๐‘‚๐‘/๐ฟ๐ธ๐‘€๐‘‚๐‘ pays 5 coins

                            ๐ถ๐ป๐ธ๐‘…๐‘…๐‘Œ/๐ถ๐ป๐ธ๐‘…๐‘…๐‘Œ/๐ถ๐ป๐ธ๐‘…๐‘…๐‘Œ pays 3 coins

                        ๐ถ๐ป๐ธ๐‘…๐‘…๐‘Œ/๐ถ๐ป๐ธ๐‘…๐‘…๐‘Œ/? pays 2 coins

                        ๐ถ๐ป๐ธ๐‘…๐‘…๐‘Œ/?/? pays 1 coin

a.                  Compute the expected “payback” percentage of the machine. In other words, for each coin played, what is the expected coin return?

b.                  Compute the probability that playing the slot machine once will result in a win.

c.                   Estimate the mean and median number of plays you can expect to make until you go broke, if you start with 10 coins. You can run a simulation to estimate this, rather than trying to compute an exact answer.

 

 

2. R&N Problem 13.13: 
Consider two medical tests, A and B, for a virus. Test A is 95% effective at recognizing the virus when it is present, but has a 10% false positive rate (indicating that the virus is present, when it is not). Test B is 90% effective at recognizing the virus, but has a 5% false positive rate. The two tests use independent methods of identifying the virus. The virus is carried by 1% of all people. Say that a person is tested for the virus using only one of the tests, and that test comes back positive for carrying the virus. Which test returning positive is more indicative of someone really carrying the virus? Justify your answer mathematically.
             

3.   Car Diagnosis Bayes Net (Modified from R&N Problem 14.8):  Consider the network for car diagnosis shown in Figure 14.21 (reproduced below).

a.       Extend the network with Boolean variables IcyWeather and StarterMotor.  Sketch the updated Bayesian network with eight nodes.   

b.      How many independent values are contained in the full joint probability distribution for eight Boolean nodes, assuming that no conditional independence relations are known to hold among them?

c.       How many independent probability values do your Bayesian network tables contain?

d.      What nodes (if any) are conditionally independent of Starts given Moves and Battery?

 

4. R&N Problem 14.11:  
In your local nuclear power station, there is an alarm that senses when a temperature gauge exceeds a given threshold. The gauge measures the temperature of the core. Consider the Boolean variables A (alarm sounds), ๐น (alarm is faulty), and ๐น (gauge is faulty) and the multivalued nodes ๐บ (gauge reading) and ๐‘‡ (actual core temperature).  

a.                  Draw a Bayesian network for this domain, given that the gauge is more likely to fail when the core temperature gets too high.

b.                  Is your network a polytree? Why or why not?

c.                   Suppose there are just two possible actual and measured temperatures, normal and high; the probability that the gauge gives the correct temperature is ๐‘ฅ when it is working, but ๐‘ฆ when it is faulty.

Give the conditional probability table associated with ๐บ.

d.                  Suppose the alarm works correctly unless it is faulty, in which case it never sounds. Give the conditional probability table associated with ๐ด.

e.                   Suppose the alarm and gauge are working and the alarm sounds. Calculate an expression for the probability that the temperature of the core is too high, in terms of the carious conditional probabilities in the network.

 

 

             

5.       Simple Bayes Computations:  Consider the Bayesian network drawn below. (10 points)

  

Show your work for the following calculations.

a.             Compute P(A = true and B = false and C = false and D = true).

b.            Compute P(D = true | A = false and B = true and C = true).

c.             Compute P(A = false | B = false and C = true and D = false).  

d.            Compute P(B = true | A = true and C = false).

e.             Compute P(B = false).

 

             

6.       Exam Bayes Net (15 points):  Consider a problem in which a professor wants to determine whether a student has understood material based on an exam score.  The below figure illustrates a possible Bayes net that can help answer this question, along with symbol definitions.  Associated probabilities are listed below as well.

 

 

Intelligent = I, Hard working = H, Doesn’t panic = DP, High Exam Score = Ex,

Knows material = KM, Gains practical skill = PS, Success! =S

 

 

Probability data:

P(I) = 0.75;  P(H) = 0.6; P(DP)=0.4; P(PS)=0.8

P(KM|I,H)=1.0; P(KM|I,~H)=0.4; P(KM|~I,H)=0.6; P(KM|~I,~H)=0.05

P(S|PS,Ex)=0.8, P(S|~PS,Ex)=0.7, P(S|PS,~Ex)=0.7, P(S|~PS,~Ex)=0.3

P(Ex|DP,KM)=0.85; P(Ex|~DP,KM)=0.7; P(Ex|DP,~KM)=0.2; P(Ex|~DP,~KM)=0.1

 

a.       Given a high exam score (Ex), which variables are conditionally independent of intelligent (I)?    

b.       Given knows material (KM) as evidence, which node(s) are conditionally independent of success (S)?

c.       Given success (S), which node(s) are conditionally independent of high exam score (Ex)?

d.       Given no evidence, compute P(KM).

e.       Compute P(S | KM), the probability of Success given Knows Material.

f.        Compute P(PS | S), the probability of gaining Practical Skill given exam Success.

g.       Compute P(KM | S), the probability of Knows Material given exam Success.

 

7. Bayes Net Exact Inference -- Coding (35 points) 
 

Implement the ENUMERATION-ASK(X, E, BN)function shown in R&N Figure 14.9, reproduced on

the next page, within a program or script that manages a single test case and prints the result to the screen.  To simplify code for this problem, assume all nodes are labeled by single characters as in Problem 5 above, and assume all variables have Boolean values T (True), F (False).  The Bayes Net (BN) will be defined by file bn.txt.  The specific test case query will be defined in file input.txt.   Output Q(X) for X=T should be printed to the screen.   Examples of each formatted input file are provided below for the Problem 5 Bayes Net.  The grader will use one easy Bayes Net and one larger Bayes Net.  We will only test polytree cases that run successfully given a correct implementation.

  

 

Example bn.txt file:

 

% Random Variables 

A, B, C, D 

% Graph Edges (From, To) 

A, B 

B, D 

C, D 

% Probability values 

P(A=T)=0.4 

P(C=T)=0.7 

P(B=T|A=F)=0.9 

P(B=T|A=T)=0.3 

P(D=T|B=F,C=F)=0.8 

P(D=T|B=F,C=T)=0.3 

P(D=T|B=T,C=F)=0.5 

P(D=T|B=T,C=T)=0.1 

 

An example input.txt file for P(D|A=T,C=F):

 

% Query random variable (print the probability X=T) 



% Evidence vector (insert blank line when no evidence is given) 

     A=T, C=F 

% End of input 

More products