Bayesian Networks and Decision Graphs

Size: px
Start display at page:

Download "Bayesian Networks and Decision Graphs"

Transcription

1 Bayesian Networks and Decision Graphs Chapter 3 Chapter 3 p. 1/47

2 Building models Milk from a cow may be infected. To detect whether or not the milk is infected, you can apply a test which may either give a positive or a negative test result. The test is not perfect: It may give false positives as well as false negatives. Chapter 3 p. 2/47

3 Building models Milk from a cow may be infected. To detect whether or not the milk is infected, you can apply a test which may either give a positive or a negative test result. The test is not perfect: It may give false positives as well as false negatives. Hypothesis events Inf: y,n Information events Test: pos,neg Chapter 3 p. 2/47

4 7-day model I Infections develop over time: Inf 1 Inf 2 Inf 3 Inf 4 Inf 5 Inf 6 Inf 7 Test 1 Test 2 Test 3 Test 4 Test 5 Test 6 Test 7 Chapter 3 p. 3/47

5 7-day model I Infections develop over time: Inf 1 Inf 2 Inf 3 Inf 4 Inf 5 Inf 6 Inf 7 Test 1 Test 2 Test 3 Test 4 Test 5 Test 6 Test 7 Assumption: The Markov property: If I know the present, then the past has no influence on the future, i.e. Inf i 1 is d-separated from Inf i+1 given Inf i. But what if yesterday s Inf-state has an impact on tomorrow s Inf-state? Chapter 3 p. 3/47

6 7-day model II Yesterday s Inf-state has an impact on tomorrow s Inf-state: Inf 1 Inf 2 Inf 3 Inf 4 Inf 5 Inf 6 Inf 7 Test 1 Test 2 Test 3 Test 4 Test 5 Test 6 Test 7 Chapter 3 p. 4/47

7 7-day model III The test-failure is dependent on whether or not the test failed yesterday: Inf 1 Inf 2 Inf 3 Inf 4 Inf 5 Inf 6 Inf 7 Test 1 Test 2 Test 3 Test 4 Test 5 Test 6 Test 7 Chapter 3 p. 5/47

8 Sore throat I wake up one morning with a sore throat. It may be the beginning of a cold or I may suffer from angina. If it is a severe angina, then I will not go to work. To gain more insight, I can take my temperature and look down my throat for yellow spots. Chapter 3 p. 6/47

9 Sore throat I wake up one morning with a sore throat. It may be the beginning of a cold or I may suffer from angina. If it is a severe angina, then I will not go to work. To gain more insight, I can take my temperature and look down my throat for yellow spots. Hypothesis variables: Cold? - {n, y} Angina? - {no, mild, severe} Information variables: Sore throat? - {n, y} See spots? - {n, y} Fever? - {no, low, high} Chapter 3 p. 6/47

10 Model for sore throat Cold? Angina? Fever? Sore Throat? See spots? Chapter 3 p. 7/47

11 Model for sore throat Cold? Angina? Fever? Sore Throat? See spots? Chapter 3 p. 7/47

12 Insemination of a cow Six weeks after the insemination of a cow, there are two tests: a Blood test and a Urine test. Pregnant? Blood test Urine test Chapter 3 p. 8/47

13 Insemination of a cow Six weeks after the insemination of a cow, there are two tests: a Blood test and a Urine test. Pregnant? Blood test Urine test Check the conditional independences: If we know that the cow is pregnant, will a negative blood test then change our expectation for the urine test? If it will, then the model does not reflect reality! Chapter 3 p. 8/47

14 Insemination of a cow: A more correct model Pregnant? Mediating variable Hormonal changes Blood test Urine test But does this actually make a difference? Chapter 3 p. 9/47

15 Insemination of a cow: A more correct model Pregnant? Mediating variable Hormonal changes Blood test Urine test But does this actually make a difference? Assume that both tests are negative in the incorrect model: This will overestimate the probability for Pregnant?=n. Pregnant? Blood test Urine test Chapter 3 p. 9/47

16 Why mediating variables? Why do we introduce mediating variables: Necessary to catch the correct conditional independences. Can ease the specification of the probabilities in the model. For example: If you find that there is a dependence between two variables A and B, but cannot determine a causal relation: Try with a mediating variable! C C D OR C D A?? B A B A B Chapter 3 p. 10/47

17 A simplified poker game The game consists of: Two players. Three cards to each player. Two rounds of changing cards (max two cards in the second round) What kind of hand does my opponent have? Chapter 3 p. 11/47

18 A simplified poker game The game consists of: Two players. Three cards to each player. Two rounds of changing cards (max two cards in the second round) Hypothesis variable: What kind of hand does my opponent have? OH - {no, 1a, 2v, fl, st, 3v, sf} Information variables: FC - {0, 1, 2, 3} and SC - {0, 1, 2} Chapter 3 p. 11/47

19 A simplified poker game The game consists of: Two players. Three cards to each player. Two rounds of changing cards (max two cards in the second round) Hypothesis variable: What kind of hand does my opponent have? OH - {no, 1a, 2v, fl, st, 3v, sf} Information variables: FC - {0, 1, 2, 3} and SC - {0, 1, 2} SC But how do we find: FC OH P(FC), P(SC FC) and P(OH SC, FC)?? Chapter 3 p. 11/47

20 A simplified poker game: Mediating variables Introduce mediating variables: The opponent s initial hand, OH 0. The opponent s hand after the first change of cards, OH 1. OH 0 OH 1 OH FC SC Note: The states of OH 0 and OH 1 are different from OH. Chapter 3 p. 12/47

21 Naïve Bayes models Hyp P(Hyp) Inf 1 P(Inf 1 Hyp) Inf n P(Inf n Hyp) We want the posterior probability of the hypothesis variable Hyp given the observations {Inf 1 = e 1,..., Inf n = e n }: P(Hyp Inf 1 = e 1,..., Inf n = e n ) = P(Inf 1 = e 1,..., Inf n = e n Hyp)P(Hyp) P(Inf 1 = e 1,..., Inf n = e n ) = µ P(Inf 1 = e 1 Hyp)... P(Inf n = e n Hyp)P(Hyp) Note: The model assumes that the information variables are independent given the hypothesis variable. Chapter 3 p. 13/47

22 Summary: Catching the structure 1. Identify the relevant events and organize them in variables: Hypothesis variables - Includes the events that are not directly observable. Information variables - Information channels. 2. Determine causal relations between the variables. 3. Check conditional independences in the model. 4. Introduce mediating variables. Chapter 3 p. 14/47

23 Where do the numbers come from? Theoretical insight. Statistics (large databases) Subjective estimates Chapter 3 p. 15/47

24 Infected milk Inf Test We need the probabilities: P(Test Inf) - provided by the factory. P(Inf) - cow or farm specific. Determining P(Inf): Assume that the farmer has 50 cows. The milk is poured into a container, and the dairy tests the milk with a very precise test. In average, the milk is infected once per month. Chapter 3 p. 16/47

25 Infected milk Inf Test We need the probabilities: P(Test Inf) - provided by the factory. P(Inf) - cow or farm specific. Determining P(Inf): Assume that the farmer has 50 cows. The milk is poured into a container, and the dairy tests the milk with a very precise test. In average, the milk is infected once per month. Calculations: P(#Cows-infected 1) = 1 30 hence P(#Cows-infected < 1) = = If P(Inf = y) = x, then P(Inf = n) = (1 x) and: (1 x) 50 = 29 « x = Chapter 3 p. 16/47

26 7-day model I Infections develop over time: Inf i Inf i+1 Test i Test i+1 From experience we have: Risk of becoming infected? Chance of getting cured from one day to another? 0.3 Chapter 3 p. 17/47

27 7-day model I Infections develop over time: Inf i Inf i+1 Test i Test i+1 From experience we have: Risk of becoming infected? Chance of getting cured from one day to another? 0.3 This gives us: y Inf i Inf i+1 y n P(Inf i+1 Inf i ) n Chapter 3 p. 17/47

28 7-day model I Infections develop over time: Inf i Inf i+1 Test i Test i+1 From experience we have: Risk of becoming infected? Chance of getting cured from one day to another? 0.3 This gives us: y Inf i Inf i+1 y n P(Inf i+1 Inf i ) n Chapter 3 p. 17/47

29 7-day model II Inf i 1 Inf i Inf i+1 Inf i 1 y n Test i 1 Test i Test i+1 Inf i y n P(Inf i+1 = y Inf i 1, Inf i ) That is: An infection always lasts at least two days. After two days, the chance of being cured is 0.4. However, we also need to specify P(Test i+1 Inf i+1, Test i, Inf i ): A correct test has a 99.9% of being correct the next time. An incorrect test has a 90% of being incorrect the next time. This can be done much easier by introducing mediating variables! Chapter 3 p. 18/47

30 7-day model III Inf i 1 Inf i Inf i+1 Cor i 1 Cor i Test i 1 Test i Test i+1 We need the probabilities: y Inf i n Pos Test i Neg P(Cor i = y Inf i, Test i ) y Inf i Cor i 1 y n P(Test i = Pos Inf i, Cor i 1 ) n Chapter 3 p. 19/47

31 7-day model III Inf i 1 Inf i Inf i+1 Cor i 1 Cor i Test i 1 Test i Test i+1 We need the probabilities: y Inf i n Test i Pos 1 0 Neg 0 1 P(Cor i = y Inf i, Test i ) y Inf i Cor i 1 y n P(Test i = Pos Inf i, Cor i 1 ) n Chapter 3 p. 19/47

32 Stud farm Genealogical structure for the horses in a stud farm: L Ann Brian Cecily K Fred Dorothy Eric Gwen Henry Irene John e We get evidence e that John is sick. Chapter 3 p. 20/47

33 Stud farm: Conditional probabilities I The disease is carried by a recessive gene: aa: sick, aa: Carrier, AA: Healthy We should specify the probabilities: Mother aa aa AA aa (,, ) (,, ) (,, ) Father aa (,, ) (,, ) (,, ) AA (,, ) (,, ) (,, ) P(Offspring Father, Mother) Chapter 3 p. 21/47

34 Stud farm: Conditional probabilities I The disease is carried by a recessive gene: aa: sick, aa: Carrier, AA: Healthy We should specify the probabilities: Father Mother aa aa AA aa (1, 0, 0) (0.5, 0.5, 0) (0, 1, 0) aa (0.5, 0.5, 0) (0.25, 0.5, 0.25) (0, 0.5, 0.5) AA (0, 1, 0) (0, 0.5, 0.5) (0, 0, 1) P(Offspring Father, Mother) Chapter 3 p. 21/47

35 Stud farm: Conditional probabilities II But the other horses are not sick: John: aa, aa, AA. Other horses: aa, AA. Prior probabilities: P(aA) = 0.01 and P(AA) = Conditional probabilities: Henry aa Irene AA aa (0.25,0.5,0.25) (0,0.5,0.5) AA (0,0.5,0.5) (0,0,1) P(John Henry, Irene) Mother aa AA Father aa (, ) (, ) AA (, ) (, ) P(Offspring Father, Mother) Chapter 3 p. 22/47

36 Stud farm: Conditional probabilities II But the other horses are not sick: John: aa, aa, AA. Other horses: aa, AA. Prior probabilities: P(aA) = 0.01 and P(AA) = Conditional probabilities: Henry aa Irene AA aa (0.25,0.5,0.25) (0,0.5,0.5) AA (0,0.5,0.5) (0,0,1) P(John Henry, Irene) aa Mother AA aa (2/3,1/3) (0.5,0.5) Father AA (0.5,0.5) (0,1) P(Offspring Father, Mother) Drop the first state and normalize: ( 0.25, 0.5,0.25) (2/3, 1/3) Chapter 3 p. 22/47

37 A simplified poker game I OH 0 OH 1 OH FC SC In order to find: P(OH 0 ) = ( No, 1a, 2cons, 2s, 2v, fl, st, 3v, sf ) we have to go into combinatorics: #good Chapter 3 p. 23/47

38 A simplified poker game I OH 0 OH 1 OH FC SC P(OH 0 ) (0.167 No, a, cons, s, v, fl, st, v, sf ) we have to go into combinatorics: #good For example, P(OH 0 = st) = `52 3. Similar considerations apply to P(OH 1 OH 0, FC). E.g. P(OH 1 2cons,1) = (0 No, 0 1a, cons, s, v, 0 fl, st, 0 3v, 0 sf ) Chapter 3 p. 23/47

39 A simplified poker game II OH 0 OH 1 OH FC SC Theoretical considerations are not enough: P(FC OH 0 ) = What is my opponents strategy? Assume the strategy: no 3 1a 2 2s 2cons 2v 1 2cons 2s 1 (Keep 2s) 2cons 2v 2s 2v 1 (Keep 2v) fl st 3v sf 0 Note: the states 2cons 2s, 2cons 2v, 2s 2v are redundant. Chapter 3 p. 24/47

40 A simplified poker game II OH 0 OH 1 OH FC SC Theoretical considerations are not enough: P(FC OH 0 ) = What is my opponents strategy? Assume the strategy: no 3 1a 2 2s 2cons 2v 1 2cons 2s 1 (Keep 2s) 2cons 2v 2s 2v 1 (Keep 2v) fl st 3v sf 0 Note: the states 2cons 2s, 2cons 2v, 2s 2v are redundant. However, knowing my system my opponent may bluff. Chapter 3 p. 24/47

41 Transmission of symbol strings A language L over {a, b} is transmitted through a channel. Each word is surrounded by c. In the transmission some characters may be corrupted by noise and may be confused with others. A five-letter word has been transmitted. Hypothesis variables: Information variables: Chapter 3 p. 25/47

42 Transmission of symbol strings A language L over {a, b} is transmitted through a channel. Each word is surrounded by c. In the transmission some characters may be corrupted by noise and may be confused with others. A five-letter word has been transmitted. Hypothesis variables: T 1, T 2, T 3, T 4, T 5 (States: a, b) Information variables: R 1, R 2, R 3, R 4, R 5 (States: a, b, c) T 1 T 2 T 3 T 4 T 5 R 1 R 2 R 3 R 4 R 5 Chapter 3 p. 25/47

43 Transmission of symbol strings A language L over {a, b} is transmitted through a channel. Each word is surrounded by c. In the transmission some characters may be corrupted by noise and may be confused with others. A five-letter word has been transmitted. Hypothesis variables: T 1, T 2, T 3, T 4, T 5 (States: a, b) Information variables: R 1, R 2, R 3, R 4, R 5 (States: a, b, c) T 1 T 2 T 3 T 4 T 5 R 1 R 2 R 3 R 4 R 5 P(R i T i ) can be determined through statistics: R i R i = a R i = b R i = c T i a b Are the T i s independent? Chapter 3 p. 25/47

44 Transmission of symbol strings T 1 T 2 T 3 T 4 T 5 R 1 R 2 R 3 R 4 R 5 To find P(T i+1 T i ): Look at the permitted words and their frequencies. First 2 Last 3 aaa aab aba abb baa bab bba bbb aa ab ba bb Chapter 3 p. 26/47

45 Transmission of symbol strings T 1 T 2 T 3 T 4 T 5 R 1 R 2 R 3 R 4 R 5 To find P(T i+1 T i ): Look at the permitted words and their frequencies. First 2 Last 3 aaa aab aba abb baa bab bba bbb aa ab ba bb P(T 2 = a T 1 = a) = P(T 2 = a, T 1 = a) P(T 1 = a) = = 0.6 Chapter 3 p. 26/47

46 Cold or angina? I Cold? Angina? Subjective estimates: Fever? Sore Throat? See spots? P(Cold?) = (0.97,0.03) P(Angina?) = (0.993, 0.005, 0.002) Angina? no mild severe no See spots? yes P(See spots? Angina?) But how do we find e.g. P(Sore throat? Angina?, Cold?)? Chapter 3 p. 27/47

47 Cold or angina? II Cold? Angina? Fever? Sore Throat? See spots? If neither Cold? nor Angina?, then P(Sore throat? = y) = If only Cold?, then P(Sore throat? = y) = 0.4. If only Angina? = mild, then P(Sore throat? = y) = 0.7. If Angina? = severe, then P(Sore throat? = y) = 1. Angina? no mild severe no Cold? yes 0.4?? 1 P(Sore throat? = y Cold?, Angina?) Chapter 3 p. 28/47

48 Cold or angina? III We have the partial specification: Angina? no mild severe no Cold? yes 0.4?? 1 P(Sore throat? = yes Cold?, Angina?) In order to find P(Sore throat = yes Cold? = yes, Angina? = mild) assume that: Out of 100 mornings, I have a background sore throat on 5 of them. 95 left: 40% cold-sore = left: 70% mild angina-sore = 39.9 In total: = Chapter 3 p. 29/47

49 Cold or angina? III We have the partial specification: Angina? no mild severe no Cold? yes 0.4?? 1 P(Sore throat? = yes Cold?, Angina?) In order to find P(Sore throat = yes Cold? = yes, Angina? = mild) assume that: Out of 100 mornings, I have a background sore throat on 5 of them. 95 left: 40% cold-sore = left: 70% mild angina-sore = 39.9 In total: = Cold? Angina? no mild severe no yes Chapter 3 p. 29/47

50 Cold or angina? I Cold? Angina? Subjective estimates: Fever? Sore Throat? See spots? P(Cold?) = (0.97,0.03) P(Angina?) = (0.993, 0.005, 0.002) Angina? no mild severe no See spots? yes P(See spots? Angina?) But how do we find e.g. P(Sore throat? Angina?, Cold?)? Chapter 3 p. 30/47

51 Cold or angina? II Cold? Angina? Fever? Sore Throat? See spots? If neither Cold? nor Angina?, then P(Sore throat? = y) = If only Cold?, then P(Sore throat? = y) = 0.4. If only Angina? = mild, then P(Sore throat? = y) = 0.7. If Angina? = severe, then P(Sore throat? = y) = 1. Angina? no mild severe no Cold? yes 0.4?? 1 P(Sore throat? = y Cold?, Angina?) Chapter 3 p. 31/47

52 Cold or angina? III We have the partial specification: Angina? no mild severe no Cold? yes 0.4?? 1 P(Sore throat? = yes Cold?, Angina?) In order to find P(Sore throat = yes Cold? = yes, Angina? = mild) assume that: Out of 100 mornings, I have a background sore throat on 5 of them. 95 left: 40% cold-sore = left: 70% mild angina-sore = 39.9 In total: = Chapter 3 p. 32/47

53 Cold or angina? III We have the partial specification: Angina? no mild severe no Cold? yes 0.4?? 1 P(Sore throat? = yes Cold?, Angina?) In order to find P(Sore throat = yes Cold? = yes, Angina? = mild) assume that: Out of 100 mornings, I have a background sore throat on 5 of them. 95 left: 40% cold-sore = left: 70% mild angina-sore = 39.9 In total: = Cold? Angina? no mild severe no yes Chapter 3 p. 32/47

54 Several independent causes, in general Cause 1 Effect Cause i results in Effect with probability x i. Cause n P(Effect = yes Combination of causes) =?? Chapter 3 p. 33/47

55 Several independent causes, in general Cause 1 Cause n Effect Cause i results in Effect with probability x i. P(Effect = yes Combination of causes) =?? Way to look at it: Cause i results in Effect unless it is inhibited by something. The Inhibitor has probability q i = 1 x i. Assumption: The Inhibitors are independent. That is, the probability of Inh i and Inh j = q i q j. Thus, P(Effect = yes Cause i, Cause j, Cause k ) = 1 q i q j q k Chapter 3 p. 33/47

56 Noisy or A 1 A n 1 q 1 1 q n B All nodes are binary. All causes for B are listed explicitly. In general: If only A 1 and A 2 are on: P(B = y A i1 = = A ik = y, the rest = n) = 1 q i1 q ik P(B = y A 1 = y, A 2 = y, the rest = n) = 1 q 1 q 2 Note: If P(B = y All = n) = x > 0, then introduce a background cause C which is always on, and q c = 1 x. Chapter 3 p. 34/47

57 Divorcing A 1 A 1 A 1 C 1 C 1 A 2 A 2 A 2 B A3 B B A 3 A 3 A 4 C 2 A 4 A = = = 81 Can this always be done? Chapter 3 p. 35/47

58 Divorcing A 1 A 1 A 1 C 1 C 1 A 2 A 2 A 2 B A3 B B A 3 A 3 A 4 C 2 A 4 A = = = 81 Can this always be done? Price Condition Size Age Brand Buy? Chapter 3 p. 35/47

59 Divorcing: An example A: a 1, a 2, a 3 P(F a 1, b 2, D, E) = P(F a 2, b 1, D, E) P(F a 1, b 1, D, E) = P(F a 2, b 2, D, E) P(F a 3, b i, D, E) = P(F a j, b 3, D, E) B: b 1, b 2, b 3 F D: d 1, d 2, d 3 E: e 1, e 2, e 3 Chapter 3 p. 36/47

60 Divorcing: An example A: a 1, a 2, a 3 C: c 1, c 2, c 3 P(F a 1, b 2, D, E) = P(F a 2, b 1, D, E) P(F a 1, b 1, D, E) = P(F a 2, b 2, D, E) P(F a 3, b i, D, E) = P(F a j, b 3, D, E) B: b 1, b 2, b 3 D: d1, d2, d3 F E: e 1, e 2, e 3 P(C a 1, b 2 ) = P(C a 2, b 1 ) = (1,0, 0) P(C a 1, b 1 ) = P(C a 2, b 2 ) = (0,1, 0) P(C a 3, b i ) = P(C a j, b 3 ) = (0,0,1) P(F c 1, D, E) = P(F a 1, b 2, D, E) P(F c 2, D, E) = P(F a 1, b 1, D, E) P(F c 3, D, E) = P(F a 3, b i, D, E) Chapter 3 p. 36/47

61 Logical constraints I have washed two pairs of socks, and now it is hard to distinguish them. Still it is important for me to couple them correctly. The color and pattern give indications. P 1 : C 1 : p 1, p 2 c 1, c 2 P 2 : C 2 : p 1, p 2 c 1, c 2 P 3 : C 3 : p 1, p 2 c 1, c 2 P 4 : C 4 : p 1, p 2 c 1, c 2 Sock 1 : t 1, t 2 Sock 2 : t 1, t 2 Sock 3 : t 1, t 2 Sock 4 : t 1, t 2 Chapter 3 p. 37/47

62 Logical constraints I have washed two pairs of socks, and now it is hard to distinguish them. Still it is important for me to couple them correctly. The color and pattern give indications. P 1 : C 1 : p 1, p 2 c 1, c 2 P 2 : C 2 : p 1, p 2 c 1, c 2 P 3 : C 3 : p 1, p 2 c 1, c 2 P 4 : C 4 : p 1, p 2 c 1, c 2 Sock 1 : t 1, t 2 Sock 2 : t 1, t 2 Sock 3 : t 1, t 2 Sock 4 : t 1, t 2 S 3, S 4 S1, S2 t 1, t 1 t 1, t 2 t 2, t 1 t 2, t 2 t 1, t t 1, t t 2, t t 2, t Const.: y,n P(Const. = y Sock 1,..., Sock 4 ) y Chapter 3 p. 37/47

63 Expert disagreement There are three experts: A C B B B y n y n y n D y C n P 1 (D = y B, C) y C n P 2 (D = y B, C) y C n P 3 (D = y B, C) B I believe twice as much in P 3 as I do in the others! Chapter 3 p. 38/47

64 Expert disagreement There are three experts: A C B B B y n y n y n S D y C n P 1 (D = y B, C) y C n P 2 (D = y B, C) y C n P 3 (D = y B, C) B I believe twice as much in P 3 as I do in the others! Encode the confidence in P(S): P(S) = (0.25,0.25,0.5) hence, C y B y (0.4,0.4,0.6) (0.7,0.9,0.7) n (0.6, 0.4, 0.5) (0.9, 0.7, 0.9) P(D = y B, C, S) n Chapter 3 p. 38/47

65 Interventions Clean the spark plugs: Fuel SP FM St? Chapter 3 p. 39/47

66 Interventions Clean the spark plugs: Fuel SP Clean FM St? SP-C St-C? Chapter 3 p. 39/47

67 Joint probabilities I Cold? Angina? Fever? Sore Throat? See spots? It is not unusual to suffer from both cold and angina, so we look for the joint probability: P(Angina?, Cold? ē) Chapter 3 p. 40/47

68 Joint probabilities I Cold? Angina? Fever? Sore Throat? See spots? It is not unusual to suffer from both cold and angina, so we look for the joint probability: P(Angina?, Cold? ē) From the fundamental rule we have: P(Angina?, Cold? ē) = P(Angina? Cold?, ē)p(cold? ē) The probability: P(Cold? ē) can be found by propagating ē. P(Angina? Cold?, ē) can be found from P(Angina? Cold? = yes, ē) and P(Angina? Cold? = no, ē). Chapter 3 p. 40/47

69 Joint probabilities II From the fundamental rule we have: P(Angina?, Cold? ē) = P(Angina? Cold?, ē)p(cold? ē) Assume that: e = (Fever? = no, SeeSpots? = yes, SoreThroat? = no). We can calculate: P(Cold? ē) = (, ) As well as: P(Angina? Cold? = yes, ē) = (,, ) P(Angina? Cold? = no, ē) = (,, ) We can now calculate P(Angina?, Cold? ē): Cold? no yes Angina? no mild severe Chapter 3 p. 41/47

70 Joint probabilities II From the fundamental rule we have: P(Angina?, Cold? ē) = P(Angina? Cold?, ē)p(cold? ē) Assume that: e = (Fever? = no, SeeSpots? = yes, SoreThroat? = no). We can calculate: P(Cold? ē) = (0.997(n), 0.003(y)) As well as: P(Angina? Cold? = yes, ē) = (0(n),1(m),0(s)) P(Angina? Cold? = no, ē) = (0(n), 0.971(m), 0.029(s)) We can now calculate P(Angina?, Cold? ē): Cold? Angina? no mild severe no yes Chapter 3 p. 41/47

71 Most probable explanation (MPE) We can find the most probable configuration of Cold? and Angina? from: P(Angina?, Cold? ē) However, this can be achieved must faster: Use maximization instead of summation when marginalizing out a variable. Chapter 3 p. 42/47

72 Most probable explanation (MPE) We can find the most probable configuration of Cold? and Angina? from: P(Angina?, Cold? ē) However, this can be achieved must faster: Use maximization instead of summation when marginalizing out a variable. This gives us MPE(Cold?)=no and MPE(Angina?)=mild. Chapter 3 p. 42/47

73 Is the evidence reliable? Since I see Fever? = no and SoreThroat? = no it seems questionable that I see spots! Can this warning be given by the system? Is the evidence coherent? Chapter 3 p. 43/47

74 Is the evidence reliable? Since I see Fever? = no and SoreThroat? = no it seems questionable that I see spots! Can this warning be given by the system? Is the evidence coherent? For a coherent case covered by the model we expect the evidence to support each other: P(e 1, e 2 ) > P(e 1 )P(e 2 ) We can measure this using: conf(e 1, e 2 ) = log 2 P(e 1 )P(e 2 ) P(e 1, e 2 ) Thus, if conf(e 1, e 2 ) > 0 we take it as an indication that the evidence is conflicting. Chapter 3 p. 43/47

75 Example conf(fever? = no, SeeSpots? = yes, SoreThroat? = no) = log 2 P(Fever? = no)p(seespots? = yes)p(sorethroat? = no) P(Fever? = no, SeeSpots? = yes, SoreThroat? = no) = log = log 2 ( ) = Thus, we take it as an indication that the evidence is conflicting! Chapter 3 p. 44/47

76 What are the crucial findings? We would like to answer questions such as: What are the crucial findings? What if one of the findings were changed or removed? What set of findings would be sufficient for the conclusion? Assume the conclusion that I suffer from mild angina: Chapter 3 p. 45/47

77 What are the crucial findings? We would like to answer questions such as: What are the crucial findings? What if one of the findings were changed or removed? What set of findings would be sufficient for the conclusion? Assume the conclusion that I suffer from mild angina: It is not enough with SeeSpots? = yes: P(Angina? SeeSpots? = yes) = (0(n),0.024(m),0.976(s)) However, SeeSpots? = yes and SoreThroat? = no is sufficient: P(Angina? SeeSpots? = yes, SoreThroat? = no) = (0(n), 0.884(m), 0.116(s)) In this case findings on Fever? is irrelevant, e.g.: P(Angina? SeeSpots? = yes, SoreThroat? = no, Fever? = high) = (0(n), 0.683(m), 0.317(s)) Chapter 3 p. 45/47

78 Sensitivity to variations in parameters The initial tables: Angina? no mild severe Cold? no yes no yes no yes no yes P(Sore throat? Angina?, Cold?) Angina? no mild severe no yes P(See spots? Angina?) Chapter 3 p. 46/47

79 Sensitivity to variations in parameters The initial tables: Angina? no mild severe Cold? no yes no yes no yes no yes P(Sore throat? Angina?, Cold?) Angina? no mild severe no yes P(See spots? Angina?) Assume that we have the parameters: Angina? no mild severe Cold? no yes no yes no yes no t 0 yes P(Sore throat? Angina?, Cold?) We want e.g.: Angina? no mild severe no yes 0 s 1 P(See spots? Angina?) P(Angina? = mild ē)(t) ; P(Angina? = mild ē)(s) ; P(Angina? = mild ē)(s, t) Chapter 3 p. 46/47

80 Sensitivity analysis Theorem: P(ē)(t) = αt + β = x(t) Thus, we also have that P(Angina? = mild, ē)(t) = a t + b = y(t), and therefore: P(Angina? = mild ē)(t) = y(t) x(t) Chapter 3 p. 47/47

81 Sensitivity analysis Theorem: P(ē)(t) = αt + β = x(t) Thus, we also have that P(Angina? = mild, ē)(t) = a t + b = y(t), and therefore: P(Angina? = mild ē)(t) = y(t) x(t) For t = we have x(t) = and y(t) = If we change t to and propagate we get: x(0.002) = y(0.002) = We can now determine the coefficients α, β, a and b! Chapter 3 p. 47/47

Bayesian networks II. Model building. Anders Ringgaard Kristensen

Bayesian networks II. Model building. Anders Ringgaard Kristensen Bayesian networks II. Model building Anders Ringgaard Kristensen Outline Determining the graphical structure Milk test Mastitis diagnosis Pregnancy Determining the conditional probabilities Modeling methods

More information

Outline. Introduction to Bayesian Networks. Outline. Directed Acyclic Graphs. Bayesian Networks Overview Building Models Modeling Tricks.

Outline. Introduction to Bayesian Networks. Outline. Directed Acyclic Graphs. Bayesian Networks Overview Building Models Modeling Tricks. Outline Introduction to Huizhen Yu janey.yu@cs.helsinki.fi Dept. omputer Science, Univ. of Helsinki Probabilistic Models, Spring, 2010 cknowledgment: Illustrative examples in this lecture are mostly from

More information

Modeling and Reasoning with Bayesian Networks. p.1

Modeling and Reasoning with Bayesian Networks. p.1 Modeling and Reasoning with Bayesian Networks p. Software Packages for BNs Software Packages for Graphical Models / Bayesian Networks http://www.cs.ubc.ca/ murphyk/bayes/bnsoft.html SamIam from UCLA http://reasoning.cs.ucla.edu/samiam/downloads.php

More information

COSE212: Programming Languages. Lecture 1 Inductive Definitions (1)

COSE212: Programming Languages. Lecture 1 Inductive Definitions (1) COSE212: Programming Languages Lecture 1 Inductive Definitions (1) Hakjoo Oh 2017 Fall Hakjoo Oh COSE212 2017 Fall, Lecture 1 September 4, 2017 1 / 9 Inductive Definitions Inductive definition (induction)

More information

COSE212: Programming Languages. Lecture 1 Inductive Definitions (1)

COSE212: Programming Languages. Lecture 1 Inductive Definitions (1) COSE212: Programming Languages Lecture 1 Inductive Definitions (1) Hakjoo Oh 2018 Fall Hakjoo Oh COSE212 2018 Fall, Lecture 1 September 5, 2018 1 / 10 Inductive Definitions Inductive definition (induction)

More information

Outline. A quiz

Outline. A quiz Introduction to Bayesian Networks Anders Ringgaard Kristensen Outline Causal networks Bayesian Networks Evidence Conditional Independence and d-separation Compilation The moral graph The triangulated graph

More information

Introduction to Bayesian Networks

Introduction to Bayesian Networks Introduction to Bayesian Networks Anders Ringgaard Kristensen Slide 1 Outline Causal networks Bayesian Networks Evidence Conditional Independence and d-separation Compilation The moral graph The triangulated

More information

Events A and B are independent P(A) = P(A B) = P(A B) / P(B)

Events A and B are independent P(A) = P(A B) = P(A B) / P(B) Events A and B are independent A B U P(A) = P(A B) = P(A B) / P(B) 1 Alternative Characterization of Independence a) P(A B) = P(A) b) P(A B) = P(A) P(B) Recall P(A B) = P(A B) / P(B) (if P(B) 0) So P(A

More information

Recall from last time: Conditional probabilities. Lecture 2: Belief (Bayesian) networks. Bayes ball. Example (continued) Example: Inference problem

Recall from last time: Conditional probabilities. Lecture 2: Belief (Bayesian) networks. Bayes ball. Example (continued) Example: Inference problem Recall from last time: Conditional probabilities Our probabilistic models will compute and manipulate conditional probabilities. Given two random variables X, Y, we denote by Lecture 2: Belief (Bayesian)

More information

Building Bayesian Networks. Lecture3: Building BN p.1

Building Bayesian Networks. Lecture3: Building BN p.1 Building Bayesian Networks Lecture3: Building BN p.1 The focus today... Problem solving by Bayesian networks Designing Bayesian networks Qualitative part (structure) Quantitative part (probability assessment)

More information

Conditional Probability. CS231 Dianna Xu

Conditional Probability. CS231 Dianna Xu Conditional Probability CS231 Dianna Xu 1 Boy or Girl? A couple has two children, one of them is a girl. What is the probability that the other one is also a girl? Assuming 50/50 chances of conceiving

More information

CSEP 590 Data Compression Autumn Arithmetic Coding

CSEP 590 Data Compression Autumn Arithmetic Coding CSEP 590 Data Compression Autumn 2007 Arithmetic Coding Reals in Binary Any real number x in the interval [0,1) can be represented in binary as.b 1 b 2... where b i is a bit. x 0 0 1 0 1... binary representation

More information

CS188: Artificial Intelligence, Fall 2010 Written 3: Bayes Nets, VPI, and HMMs

CS188: Artificial Intelligence, Fall 2010 Written 3: Bayes Nets, VPI, and HMMs CS188: Artificial Intelligence, Fall 2010 Written 3: Bayes Nets, VPI, and HMMs Due: Tuesday 11/23 in 283 Soda Drop Box by 11:59pm (no slip days) Policy: Can be solved in groups (acknowledge collaborators)

More information

The Probability of Winning a Series. Gregory Quenell

The Probability of Winning a Series. Gregory Quenell The Probability of Winning a Series Gregory Quenell Exercise: Team A and Team B play a series of n + games. The first team to win n + games wins the series. All games are independent, and Team A wins any

More information

Theory of Computation

Theory of Computation Theory of Computation Lecture #2 Sarmad Abbasi Virtual University Sarmad Abbasi (Virtual University) Theory of Computation 1 / 1 Lecture 2: Overview Recall some basic definitions from Automata Theory.

More information

Final Examination CS540-2: Introduction to Artificial Intelligence

Final Examination CS540-2: Introduction to Artificial Intelligence Final Examination CS540-2: Introduction to Artificial Intelligence May 9, 2018 LAST NAME: SOLUTIONS FIRST NAME: Directions 1. This exam contains 33 questions worth a total of 100 points 2. Fill in your

More information

Lecture 4 Bayes Theorem

Lecture 4 Bayes Theorem 1 / 24 Lecture 4 Bayes Theorem September 09, 2010 2 / 24 Lesson Plan 1. Bayes Theorem 2. Simpson s Paradox 3. More worked problems 3 / 24 Why Study Probability? A probability model describes the random

More information

CS 133 : Automata Theory and Computability

CS 133 : Automata Theory and Computability CS 133 : Automata Theory and Computability Lecture Slides 1 Regular Languages and Finite Automata Nestine Hope S. Hernandez Algorithms and Complexity Laboratory Department of Computer Science University

More information

Lecture 10: Introduction to reasoning under uncertainty. Uncertainty

Lecture 10: Introduction to reasoning under uncertainty. Uncertainty Lecture 10: Introduction to reasoning under uncertainty Introduction to reasoning under uncertainty Review of probability Axioms and inference Conditional probability Probability distributions COMP-424,

More information

Probability and Statistics. Terms and concepts

Probability and Statistics. Terms and concepts Probability and Statistics Joyeeta Dutta Moscato June 30, 2014 Terms and concepts Sample vs population Central tendency: Mean, median, mode Variance, standard deviation Normal distribution Cumulative distribution

More information

TDT70: Uncertainty in Artificial Intelligence. Chapter 1 and 2

TDT70: Uncertainty in Artificial Intelligence. Chapter 1 and 2 TDT70: Uncertainty in Artificial Intelligence Chapter 1 and 2 Fundamentals of probability theory The sample space is the set of possible outcomes of an experiment. A subset of a sample space is called

More information

Discrete Probability

Discrete Probability Discrete Probability Counting Permutations Combinations r- Combinations r- Combinations with repetition Allowed Pascal s Formula Binomial Theorem Conditional Probability Baye s Formula Independent Events

More information

Be able to define the following terms and answer basic questions about them:

Be able to define the following terms and answer basic questions about them: CS440/ECE448 Section Q Fall 2017 Final Review Be able to define the following terms and answer basic questions about them: Probability o Random variables, axioms of probability o Joint, marginal, conditional

More information

Outline. Probability. Math 143. Department of Mathematics and Statistics Calvin College. Spring 2010

Outline. Probability. Math 143. Department of Mathematics and Statistics Calvin College. Spring 2010 Outline Math 143 Department of Mathematics and Statistics Calvin College Spring 2010 Outline Outline 1 Review Basics Random Variables Mean, Variance and Standard Deviation of Random Variables 2 More Review

More information

Introduction to Artificial Intelligence. Unit # 11

Introduction to Artificial Intelligence. Unit # 11 Introduction to Artificial Intelligence Unit # 11 1 Course Outline Overview of Artificial Intelligence State Space Representation Search Techniques Machine Learning Logic Probabilistic Reasoning/Bayesian

More information

Lecture 4 Bayes Theorem

Lecture 4 Bayes Theorem Lecture 4 Bayes Theorem Thais Paiva STA 111 - Summer 2013 Term II July 5, 2013 Lecture Plan 1 Probability Review 2 Bayes Theorem 3 More worked problems Why Study Probability? A probability model describes

More information

CSE 105 Homework 1 Due: Monday October 9, Instructions. should be on each page of the submission.

CSE 105 Homework 1 Due: Monday October 9, Instructions. should be on each page of the submission. CSE 5 Homework Due: Monday October 9, 7 Instructions Upload a single file to Gradescope for each group. should be on each page of the submission. All group members names and PIDs Your assignments in this

More information

{a, b, c} {a, b} {a, c} {b, c} {a}

{a, b, c} {a, b} {a, c} {b, c} {a} Section 4.3 Order Relations A binary relation is an partial order if it transitive and antisymmetric. If R is a partial order over the set S, we also say, S is a partially ordered set or S is a poset.

More information

Advanced Herd Management Probabilities and distributions

Advanced Herd Management Probabilities and distributions Advanced Herd Management Probabilities and distributions Anders Ringgaard Kristensen Slide 1 Outline Probabilities Conditional probabilities Bayes theorem Distributions Discrete Continuous Distribution

More information

CS 2750: Machine Learning. Bayesian Networks. Prof. Adriana Kovashka University of Pittsburgh March 14, 2016

CS 2750: Machine Learning. Bayesian Networks. Prof. Adriana Kovashka University of Pittsburgh March 14, 2016 CS 2750: Machine Learning Bayesian Networks Prof. Adriana Kovashka University of Pittsburgh March 14, 2016 Plan for today and next week Today and next time: Bayesian networks (Bishop Sec. 8.1) Conditional

More information

COMP61011 : Machine Learning. Probabilis*c Models + Bayes Theorem

COMP61011 : Machine Learning. Probabilis*c Models + Bayes Theorem COMP61011 : Machine Learning Probabilis*c Models + Bayes Theorem Probabilis*c Models - one of the most active areas of ML research in last 15 years - foundation of numerous new technologies - enables decision-making

More information

Theory of Computer Science

Theory of Computer Science Theory of Computer Science C1. Formal Languages and Grammars Malte Helmert University of Basel March 14, 2016 Introduction Example: Propositional Formulas from the logic part: Definition (Syntax of Propositional

More information

Introduction and basic definitions

Introduction and basic definitions Chapter 1 Introduction and basic definitions 1.1 Sample space, events, elementary probability Exercise 1.1 Prove that P( ) = 0. Solution of Exercise 1.1 : Events S (where S is the sample space) and are

More information

Text Categorization CSE 454. (Based on slides by Dan Weld, Tom Mitchell, and others)

Text Categorization CSE 454. (Based on slides by Dan Weld, Tom Mitchell, and others) Text Categorization CSE 454 (Based on slides by Dan Weld, Tom Mitchell, and others) 1 Given: Categorization A description of an instance, x X, where X is the instance language or instance space. A fixed

More information

12 - The Tie Set Method

12 - The Tie Set Method 12 - The Tie Set Method Definitions: A tie set V is a set of components whose success results in system success, i.e. the presence of all components in any tie set connects the input to the output in the

More information

Directed Graphical Models

Directed Graphical Models CS 2750: Machine Learning Directed Graphical Models Prof. Adriana Kovashka University of Pittsburgh March 28, 2017 Graphical Models If no assumption of independence is made, must estimate an exponential

More information

Introduction to Machine Learning

Introduction to Machine Learning Introduction to Machine Learning CS4375 --- Fall 2018 Bayesian a Learning Reading: Sections 13.1-13.6, 20.1-20.2, R&N Sections 6.1-6.3, 6.7, 6.9, Mitchell 1 Uncertainty Most real-world problems deal with

More information

Bayesian Networks Basic and simple graphs

Bayesian Networks Basic and simple graphs Bayesian Networks Basic and simple graphs Ullrika Sahlin, Centre of Environmental and Climate Research Lund University, Sweden Ullrika.Sahlin@cec.lu.se http://www.cec.lu.se/ullrika-sahlin Bayesian [Belief]

More information

Probabilistic Graphical Models (I)

Probabilistic Graphical Models (I) Probabilistic Graphical Models (I) Hongxin Zhang zhx@cad.zju.edu.cn State Key Lab of CAD&CG, ZJU 2015-03-31 Probabilistic Graphical Models Modeling many real-world problems => a large number of random

More information

A Simple Introduction to Information, Channel Capacity and Entropy

A Simple Introduction to Information, Channel Capacity and Entropy A Simple Introduction to Information, Channel Capacity and Entropy Ulrich Hoensch Rocky Mountain College Billings, MT 59102 hoenschu@rocky.edu Friday, April 21, 2017 Introduction A frequently occurring

More information

Probability and Statistics. Joyeeta Dutta-Moscato June 29, 2015

Probability and Statistics. Joyeeta Dutta-Moscato June 29, 2015 Probability and Statistics Joyeeta Dutta-Moscato June 29, 2015 Terms and concepts Sample vs population Central tendency: Mean, median, mode Variance, standard deviation Normal distribution Cumulative distribution

More information

Introduction to Machine Learning

Introduction to Machine Learning Uncertainty Introduction to Machine Learning CS4375 --- Fall 2018 a Bayesian Learning Reading: Sections 13.1-13.6, 20.1-20.2, R&N Sections 6.1-6.3, 6.7, 6.9, Mitchell Most real-world problems deal with

More information

Reasoning Under Uncertainty: Conditioning, Bayes Rule & the Chain Rule

Reasoning Under Uncertainty: Conditioning, Bayes Rule & the Chain Rule Reasoning Under Uncertainty: Conditioning, Bayes Rule & the Chain Rule Alan Mackworth UBC CS 322 Uncertainty 2 March 13, 2013 Textbook 6.1.3 Lecture Overview Recap: Probability & Possible World Semantics

More information

Quantifying uncertainty & Bayesian networks

Quantifying uncertainty & Bayesian networks Quantifying uncertainty & Bayesian networks CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2016 Soleymani Artificial Intelligence: A Modern Approach, 3 rd Edition,

More information

Theory of Computation

Theory of Computation Fall 2002 (YEN) Theory of Computation Midterm Exam. Name:... I.D.#:... 1. (30 pts) True or false (mark O for true ; X for false ). (Score=Max{0, Right- 1 2 Wrong}.) (1) X... If L 1 is regular and L 2 L

More information

Allen Holder - Trinity University

Allen Holder - Trinity University Haplotyping - Trinity University Population Problems - joint with Courtney Davis, University of Utah Single Individuals - joint with John Louie, Carrol College, and Lena Sherbakov, Williams University

More information

Ch.6 Uncertain Knowledge. Logic and Uncertainty. Representation. One problem with logical approaches: Department of Computer Science

Ch.6 Uncertain Knowledge. Logic and Uncertainty. Representation. One problem with logical approaches: Department of Computer Science Ch.6 Uncertain Knowledge Representation Hantao Zhang http://www.cs.uiowa.edu/ hzhang/c145 The University of Iowa Department of Computer Science Artificial Intelligence p.1/39 Logic and Uncertainty One

More information

Reasoning under uncertainty

Reasoning under uncertainty Reasoning under uncertainty Probability Review II CSC384 March 16, 2018 CSC384 Reasoning under uncertainty March 16, 2018 1 / 22 From last class Axioms of probability Probability over feature vectors Independence

More information

Approximate Inference Part 1 of 2

Approximate Inference Part 1 of 2 Approximate Inference Part 1 of 2 Tom Minka Microsoft Research, Cambridge, UK Machine Learning Summer School 2009 http://mlg.eng.cam.ac.uk/mlss09/ Bayesian paradigm Consistent use of probability theory

More information

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 14

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 14 CS 70 Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 14 Introduction One of the key properties of coin flips is independence: if you flip a fair coin ten times and get ten

More information

Number Theory and Counting Method. Divisors -Least common divisor -Greatest common multiple

Number Theory and Counting Method. Divisors -Least common divisor -Greatest common multiple Number Theory and Counting Method Divisors -Least common divisor -Greatest common multiple Divisors Definition n and d are integers d 0 d divides n if there exists q satisfying n = dq q the quotient, d

More information

PROBABILITY.

PROBABILITY. PROBABILITY PROBABILITY(Basic Terminology) Random Experiment: If in each trial of an experiment conducted under identical conditions, the outcome is not unique, but may be any one of the possible outcomes,

More information

Info 2950, Lecture 4

Info 2950, Lecture 4 Info 2950, Lecture 4 7 Feb 2017 More Programming and Statistics Boot Camps? This week (only): PG Wed Office Hour 8 Feb at 3pm Prob Set 1: due Mon night 13 Feb (no extensions ) Note: Added part to problem

More information

Approximate Inference Part 1 of 2

Approximate Inference Part 1 of 2 Approximate Inference Part 1 of 2 Tom Minka Microsoft Research, Cambridge, UK Machine Learning Summer School 2009 http://mlg.eng.cam.ac.uk/mlss09/ 1 Bayesian paradigm Consistent use of probability theory

More information

Probability and Statistics

Probability and Statistics Probability and Statistics Jesse Hoey School of Computer Science University of Waterloo January 9, 2012 Uncertainty Why is uncertainty important? Agents (and humans) don t know everything, but need to

More information

Harvard CS121 and CSCI E-121 Lecture 2: Mathematical Preliminaries

Harvard CS121 and CSCI E-121 Lecture 2: Mathematical Preliminaries Harvard CS121 and CSCI E-121 Lecture 2: Mathematical Preliminaries Harry Lewis September 5, 2013 Reading: Sipser, Chapter 0 Sets Sets are defined by their members A = B means that for every x, x A iff

More information

CSCI 340: Computational Models. Regular Expressions. Department of Computer Science

CSCI 340: Computational Models. Regular Expressions. Department of Computer Science CSCI 340: Computational Models Regular Expressions Chapter 4 Department of Computer Science Yet Another New Method for Defining Languages Given the Language: L 1 = {x n for n = 1 2 3...} We could easily

More information

Probability - Lecture 4

Probability - Lecture 4 1 Introduction Probability - Lecture 4 Many methods of computation physics and the comparison of data to a mathematical representation, apply stochastic methods. These ideas were first introduced in the

More information

STAT:5100 (22S:193) Statistical Inference I

STAT:5100 (22S:193) Statistical Inference I STAT:5100 (22S:193) Statistical Inference I Week 3 Luke Tierney University of Iowa Fall 2015 Luke Tierney (U Iowa) STAT:5100 (22S:193) Statistical Inference I Fall 2015 1 Recap Matching problem Generalized

More information

1 Alphabets and Languages

1 Alphabets and Languages 1 Alphabets and Languages Look at handout 1 (inference rules for sets) and use the rules on some examples like {a} {{a}} {a} {a, b}, {a} {{a}}, {a} {{a}}, {a} {a, b}, a {{a}}, a {a, b}, a {{a}}, a {a,

More information

CSEP 521 Applied Algorithms Spring Statistical Lossless Data Compression

CSEP 521 Applied Algorithms Spring Statistical Lossless Data Compression CSEP 52 Applied Algorithms Spring 25 Statistical Lossless Data Compression Outline for Tonight Basic Concepts in Data Compression Entropy Prefix codes Huffman Coding Arithmetic Coding Run Length Coding

More information

Informatics 2D Reasoning and Agents Semester 2,

Informatics 2D Reasoning and Agents Semester 2, Informatics 2D Reasoning and Agents Semester 2, 2017 2018 Alex Lascarides alex@inf.ed.ac.uk Lecture 23 Probabilistic Reasoning with Bayesian Networks 15th March 2018 Informatics UoE Informatics 2D 1 Where

More information

Algorithmisches Lernen/Machine Learning

Algorithmisches Lernen/Machine Learning Algorithmisches Lernen/Machine Learning Part 1: Stefan Wermter Introduction Connectionist Learning (e.g. Neural Networks) Decision-Trees, Genetic Algorithms Part 2: Norman Hendrich Support-Vector Machines

More information

Stream Codes. 6.1 The guessing game

Stream Codes. 6.1 The guessing game About Chapter 6 Before reading Chapter 6, you should have read the previous chapter and worked on most of the exercises in it. We ll also make use of some Bayesian modelling ideas that arrived in the vicinity

More information

A. Soldier and Traveling

A. Soldier and Traveling A. Soldier and Traveling time limit per test: 1 second memory limit per test: 256 megabytes : standard : standard In the country there are n cities and m bidirectional roads between them. Each city has

More information

Uncertainty. Introduction to Artificial Intelligence CS 151 Lecture 2 April 1, CS151, Spring 2004

Uncertainty. Introduction to Artificial Intelligence CS 151 Lecture 2 April 1, CS151, Spring 2004 Uncertainty Introduction to Artificial Intelligence CS 151 Lecture 2 April 1, 2004 Administration PA 1 will be handed out today. There will be a MATLAB tutorial tomorrow, Friday, April 2 in AP&M 4882 at

More information

1 INFO 2950, 2 4 Feb 10

1 INFO 2950, 2 4 Feb 10 First a few paragraphs of review from previous lectures: A finite probability space is a set S and a function p : S [0, 1] such that p(s) > 0 ( s S) and s S p(s) 1. We refer to S as the sample space, subsets

More information

EXAMPLE CFG. L = {a 2n : n 1 } L = {a 2n : n 0 } S asa aa. L = {a n b : n 0 } L = {a n b : n 1 } S asb ab S 1S00 S 1S00 100

EXAMPLE CFG. L = {a 2n : n 1 } L = {a 2n : n 0 } S asa aa. L = {a n b : n 0 } L = {a n b : n 1 } S asb ab S 1S00 S 1S00 100 EXAMPLE CFG L = {a 2n : n 1 } L = {a 2n : n 0 } S asa aa S asa L = {a n b : n 0 } L = {a n b : n 1 } S as b S as ab L { a b : n 0} L { a b : n 1} S asb S asb ab n 2n n 2n L {1 0 : n 0} L {1 0 : n 1} S

More information

CDA6530: Performance Models of Computers and Networks. Chapter 1: Review of Practical Probability

CDA6530: Performance Models of Computers and Networks. Chapter 1: Review of Practical Probability CDA6530: Performance Models of Computers and Networks Chapter 1: Review of Practical Probability Probability Definition Sample Space (S) which is a collection of objects (all possible scenarios or values).

More information

Today. Statistical Learning. Coin Flip. Coin Flip. Experiment 1: Heads. Experiment 1: Heads. Which coin will I use? Which coin will I use?

Today. Statistical Learning. Coin Flip. Coin Flip. Experiment 1: Heads. Experiment 1: Heads. Which coin will I use? Which coin will I use? Today Statistical Learning Parameter Estimation: Maximum Likelihood (ML) Maximum A Posteriori (MAP) Bayesian Continuous case Learning Parameters for a Bayesian Network Naive Bayes Maximum Likelihood estimates

More information

CINQA Workshop Probability Math 105 Silvia Heubach Department of Mathematics, CSULA Thursday, September 6, 2012

CINQA Workshop Probability Math 105 Silvia Heubach Department of Mathematics, CSULA Thursday, September 6, 2012 CINQA Workshop Probability Math 105 Silvia Heubach Department of Mathematics, CSULA Thursday, September 6, 2012 Silvia Heubach/CINQA 2012 Workshop Objectives To familiarize biology faculty with one of

More information

Probability. CS 3793/5233 Artificial Intelligence Probability 1

Probability. CS 3793/5233 Artificial Intelligence Probability 1 CS 3793/5233 Artificial Intelligence 1 Motivation Motivation Random Variables Semantics Dice Example Joint Dist. Ex. Axioms Agents don t have complete knowledge about the world. Agents need to make decisions

More information

Lecture 3: Probability

Lecture 3: Probability Lecture 3: Probability 28th of October 2015 Lecture 3: Probability 28th of October 2015 1 / 36 Summary of previous lecture Define chance experiment, sample space and event Introduce the concept of the

More information

Unit 1: Sequence Models

Unit 1: Sequence Models CS 562: Empirical Methods in Natural Language Processing Unit 1: Sequence Models Lecture 5: Probabilities and Estimations Lecture 6: Weighted Finite-State Machines Week 3 -- Sep 8 & 10, 2009 Liang Huang

More information

Probabilistic Graphical Models

Probabilistic Graphical Models Probabilistic Graphical Models Introduction. Basic Probability and Bayes Volkan Cevher, Matthias Seeger Ecole Polytechnique Fédérale de Lausanne 26/9/2011 (EPFL) Graphical Models 26/9/2011 1 / 28 Outline

More information

Mathematical Induction Part Two

Mathematical Induction Part Two Mathematical Induction Part Two Recap from Last Time Let P be some predicate. The principle of mathematical induction states that if If it starts true and it stays P(0) is true true and k ℕ. (P(k) P(k+1))

More information

Icy Roads. Bayesian Networks. Icy Roads. Icy Roads. Icy Roads. Holmes and Watson in LA

Icy Roads. Bayesian Networks. Icy Roads. Icy Roads. Icy Roads. Holmes and Watson in LA 6.825 Techniques in rtificial ntelligence ayesian Networks To do probabilistic reasoning, you need to know the joint probability distribution ut, in a domain with N propositional variables, one needs 2

More information

Probabilistic representation and reasoning

Probabilistic representation and reasoning Probabilistic representation and reasoning Applied artificial intelligence (EDA132) Lecture 09 2017-02-15 Elin A. Topp Material based on course book, chapter 13, 14.1-3 1 Show time! Two boxes of chocolates,

More information

The Binomial Theorem.

The Binomial Theorem. The Binomial Theorem RajeshRathod42@gmail.com The Problem Evaluate (A+B) N as a polynomial in powers of A and B Where N is a positive integer A and B are numbers Example: (A+B) 5 = A 5 +5A 4 B+10A 3 B

More information

Machine Learning for natural language processing

Machine Learning for natural language processing Machine Learning for natural language processing Classification: Naive Bayes Laura Kallmeyer Heinrich-Heine-Universität Düsseldorf Summer 2016 1 / 20 Introduction Classification = supervised method for

More information

Bayesian Learning Features of Bayesian learning methods:

Bayesian Learning Features of Bayesian learning methods: Bayesian Learning Features of Bayesian learning methods: Each observed training example can incrementally decrease or increase the estimated probability that a hypothesis is correct. This provides a more

More information

The Pure Parsimony Problem

The Pure Parsimony Problem Haplotyping and Minimum Diversity Graphs Courtney Davis - University of Utah - Trinity University Some Genetics Mother Paired Gene Representation Physical Trait ABABBA AAABBB Physical Trait ABA AAA Mother

More information

Outline. CSE 573: Artificial Intelligence Autumn Agent. Partial Observability. Markov Decision Process (MDP) 10/31/2012

Outline. CSE 573: Artificial Intelligence Autumn Agent. Partial Observability. Markov Decision Process (MDP) 10/31/2012 CSE 573: Artificial Intelligence Autumn 2012 Reasoning about Uncertainty & Hidden Markov Models Daniel Weld Many slides adapted from Dan Klein, Stuart Russell, Andrew Moore & Luke Zettlemoyer 1 Outline

More information

Detection Theory. Chapter 3. Statistical Decision Theory I. Isael Diaz Oct 26th 2010

Detection Theory. Chapter 3. Statistical Decision Theory I. Isael Diaz Oct 26th 2010 Detection Theory Chapter 3. Statistical Decision Theory I. Isael Diaz Oct 26th 2010 Outline Neyman-Pearson Theorem Detector Performance Irrelevant Data Minimum Probability of Error Bayes Risk Multiple

More information

14 PROBABILISTIC REASONING

14 PROBABILISTIC REASONING 228 14 PROBABILISTIC REASONING A Bayesian network is a directed graph in which each node is annotated with quantitative probability information 1. A set of random variables makes up the nodes of the network.

More information

Computer Science CPSC 322. Lecture 18 Marginalization, Conditioning

Computer Science CPSC 322. Lecture 18 Marginalization, Conditioning Computer Science CPSC 322 Lecture 18 Marginalization, Conditioning Lecture Overview Recap Lecture 17 Joint Probability Distribution, Marginalization Conditioning Inference by Enumeration Bayes Rule, Chain

More information

4-1 BASIC CONCEPTS OF PROBABILITY

4-1 BASIC CONCEPTS OF PROBABILITY CHAPTER 4 4-1 BASIC CONCEPTS OF PROBABILITY Identify probabilities as values between 0 and 1, and interpret those values as expressions of likelihood of events Develop the ability to calculate probabilities

More information

Mean, Median and Mode. Lecture 3 - Axioms of Probability. Where do they come from? Graphically. We start with a set of 21 numbers, Sta102 / BME102

Mean, Median and Mode. Lecture 3 - Axioms of Probability. Where do they come from? Graphically. We start with a set of 21 numbers, Sta102 / BME102 Mean, Median and Mode Lecture 3 - Axioms of Probability Sta102 / BME102 Colin Rundel September 1, 2014 We start with a set of 21 numbers, ## [1] -2.2-1.6-1.0-0.5-0.4-0.3-0.2 0.1 0.1 0.2 0.4 ## [12] 0.4

More information

Be able to define the following terms and answer basic questions about them:

Be able to define the following terms and answer basic questions about them: CS440/ECE448 Fall 2016 Final Review Be able to define the following terms and answer basic questions about them: Probability o Random variables o Axioms of probability o Joint, marginal, conditional probability

More information

UNIT-I. Strings, Alphabets, Language and Operations

UNIT-I. Strings, Alphabets, Language and Operations UNIT-I Strings, Alphabets, Language and Operations Strings of characters are fundamental building blocks in computer science. Alphabet is defined as a non empty finite set or nonempty set of symbols. The

More information

Week Some Warm-up Questions

Week Some Warm-up Questions 1 Some Warm-up Questions Week 1-2 Abstraction: The process going from specific cases to general problem. Proof: A sequence of arguments to show certain conclusion to be true. If... then... : The part after

More information

The Monte Carlo Method: Bayesian Networks

The Monte Carlo Method: Bayesian Networks The Method: Bayesian Networks Dieter W. Heermann Methods 2009 Dieter W. Heermann ( Methods)The Method: Bayesian Networks 2009 1 / 18 Outline 1 Bayesian Networks 2 Gene Expression Data 3 Bayesian Networks

More information

2011 Pearson Education, Inc

2011 Pearson Education, Inc Statistics for Business and Economics Chapter 3 Probability Contents 1. Events, Sample Spaces, and Probability 2. Unions and Intersections 3. Complementary Events 4. The Additive Rule and Mutually Exclusive

More information

Summary of Last Lectures

Summary of Last Lectures Lossless Coding IV a k p k b k a 0.16 111 b 0.04 0001 c 0.04 0000 d 0.16 110 e 0.23 01 f 0.07 1001 g 0.06 1000 h 0.09 001 i 0.15 101 100 root 1 60 1 0 0 1 40 0 32 28 23 e 17 1 0 1 0 1 0 16 a 16 d 15 i

More information

ITCT Lecture IV.3: Markov Processes and Sources with Memory

ITCT Lecture IV.3: Markov Processes and Sources with Memory ITCT Lecture IV.3: Markov Processes and Sources with Memory 4. Markov Processes Thus far, we have been occupied with memoryless sources and channels. We must now turn our attention to sources with memory.

More information

4. Conditional Probability

4. Conditional Probability 1 of 13 7/15/2009 9:25 PM Virtual Laboratories > 2. Probability Spaces > 1 2 3 4 5 6 7 4. Conditional Probability Definitions and Interpretations The Basic Definition As usual, we start with a random experiment

More information

Probability: Why do we care? Lecture 2: Probability and Distributions. Classical Definition. What is Probability?

Probability: Why do we care? Lecture 2: Probability and Distributions. Classical Definition. What is Probability? Probability: Why do we care? Lecture 2: Probability and Distributions Sandy Eckel seckel@jhsph.edu 22 April 2008 Probability helps us by: Allowing us to translate scientific questions into mathematical

More information

A Universal Turing Machine

A Universal Turing Machine A Universal Turing Machine A limitation of Turing Machines: Turing Machines are hardwired they execute only one program Real Computers are re-programmable Solution: Universal Turing Machine Attributes:

More information

T Machine Learning: Basic Principles

T Machine Learning: Basic Principles Machine Learning: Basic Principles Bayesian Networks Laboratory of Computer and Information Science (CIS) Department of Computer Science and Engineering Helsinki University of Technology (TKK) Autumn 2007

More information

Semigroup presentations via boundaries in Cayley graphs 1

Semigroup presentations via boundaries in Cayley graphs 1 Semigroup presentations via boundaries in Cayley graphs 1 Robert Gray University of Leeds BMC, Newcastle 2006 1 (Research conducted while I was a research student at the University of St Andrews, under

More information