1 00:00:03,790 --> 00:00:08,375 All right, now we're ready to see a real life example. 2 00:00:08,375 --> 00:00:10,850 We've called is a thief an alarm. 3 00:00:10,850 --> 00:00:15,505 Imagine that you buy an alarm to a house to prevent thief from going into it. 4 00:00:15,505 --> 00:00:18,590 Either the thief goes into a house, 5 00:00:18,590 --> 00:00:20,035 and the alarm will go off and they will get, 6 00:00:20,035 --> 00:00:23,045 for example, SMS notification. 7 00:00:23,045 --> 00:00:27,890 However, the alarm may give a false alarm in case of an earthquake. 8 00:00:27,890 --> 00:00:30,205 Also, if there is a strong earthquake, 9 00:00:30,205 --> 00:00:34,830 the radio will report about it and so you get another source of them notification. 10 00:00:34,830 --> 00:00:37,900 Here's a graphical model for it. 11 00:00:37,900 --> 00:00:42,095 What is the general probability of the four and the variables, thief, alarm, 12 00:00:42,095 --> 00:00:46,970 earthquake, and the radio is given by the following formula. 13 00:00:46,970 --> 00:00:49,246 To fully define our model, 14 00:00:49,246 --> 00:00:52,980 we need to define these four probabilities. 15 00:00:52,980 --> 00:00:56,315 Let's start with thief and earthquake. 16 00:00:56,315 --> 00:00:59,330 What is the probability that there is a thief in our house? 17 00:00:59,330 --> 00:01:02,335 Let's define it us to 10 to the power of minus three, 18 00:01:02,335 --> 00:01:05,990 that is, one in a thousand houses has been robbed. 19 00:01:05,990 --> 00:01:07,890 What is the probability of an earthquake? 20 00:01:07,890 --> 00:01:11,225 Well, Iet's say it is 10 to the power of mines two. 21 00:01:11,225 --> 00:01:15,825 The earthquakes happened about once in 100 days. 22 00:01:15,825 --> 00:01:18,450 Now, we've defined the probability of alarm, 23 00:01:18,450 --> 00:01:23,205 given the thief as an earthquake so those will be four numbers. 24 00:01:23,205 --> 00:01:24,935 If there is a thief in our house, 25 00:01:24,935 --> 00:01:27,020 the alarm will go for sure. 26 00:01:27,020 --> 00:01:31,635 This is indicated by the ones in the lower row. 27 00:01:31,635 --> 00:01:34,030 If there is no thief and there is no earthquake, 28 00:01:34,030 --> 00:01:37,890 then the alarm has no reason to send us signals. 29 00:01:37,890 --> 00:01:39,725 However, if there is no thief, 30 00:01:39,725 --> 00:01:41,075 but there is an earthquake, 31 00:01:41,075 --> 00:01:44,490 the alarm will notify us for abuse at one time. 32 00:01:44,490 --> 00:01:50,285 Finally, we need to define the probability of the radio report during an earthquake. 33 00:01:50,285 --> 00:01:51,860 If there is no earthquake, 34 00:01:51,860 --> 00:01:54,190 the radio reports it has nothing to tell us about, 35 00:01:54,190 --> 00:01:56,505 and so it will not report about it. 36 00:01:56,505 --> 00:01:58,800 However, if there is an earthquake, 37 00:01:58,800 --> 00:02:02,680 the radio will reports that were permuted one half that is, 38 00:02:02,680 --> 00:02:08,070 it does not report about some small earthquakes. 39 00:02:08,070 --> 00:02:11,125 Here's our model again. 40 00:02:11,125 --> 00:02:13,000 I change an additional bit, 41 00:02:13,000 --> 00:02:14,865 so it would be a bit shorter. 42 00:02:14,865 --> 00:02:19,480 For example, instead of writing T=1, 43 00:02:19,480 --> 00:02:21,712 I would draw it simply T, 44 00:02:21,712 --> 00:02:28,938 and if I want to write down the event that didn't happen for example T=0, 45 00:02:28,938 --> 00:02:30,605 then there is no thief in our house, 46 00:02:30,605 --> 00:02:34,740 I would simply write a bar over the other. 47 00:02:34,740 --> 00:02:39,130 All right. Imagine that you went somewhere out of your house, for example, 48 00:02:39,130 --> 00:02:44,080 for a work, and you got a notification from an alarm system. 49 00:02:44,080 --> 00:02:49,060 You want to estimate the probability that there is a thief in our house, 50 00:02:49,060 --> 00:02:51,065 given that there is an alarm, 51 00:02:51,065 --> 00:02:54,905 given that we've gotten notification from an alarm. 52 00:02:54,905 --> 00:03:03,295 This would be, the probability of a thief during the alarm. 53 00:03:03,295 --> 00:03:08,775 Let's use base formula to compute this probability. 54 00:03:08,775 --> 00:03:13,685 This would be the gen probability. 55 00:03:13,685 --> 00:03:22,197 Probability that there is a thief and alarm over the probability of the alarm. 56 00:03:22,197 --> 00:03:26,610 Now, let's use the sound rule. 57 00:03:26,610 --> 00:03:31,770 I will add another variable the earthquake. 58 00:03:31,770 --> 00:03:35,250 This would be a thing like this. 59 00:03:35,250 --> 00:03:39,165 This would be the probability of thief, alarm, 60 00:03:39,165 --> 00:03:44,745 earthquake plus the probability of thief, 61 00:03:44,745 --> 00:03:48,510 alarm and not earthquake. 62 00:03:48,510 --> 00:03:52,380 Then, you do the same trick for the numerator. 63 00:03:52,380 --> 00:03:56,760 This wouldn't be the probability of thief, alarm, 64 00:03:56,760 --> 00:04:02,150 earthquake, plus probability of thief, alarm, 65 00:04:02,150 --> 00:04:09,230 and not earthquake, plus another two terms, 66 00:04:09,230 --> 00:04:13,060 with no thief in our house. 67 00:04:13,060 --> 00:04:17,085 So, alarm, earthquake, and finally, 68 00:04:17,085 --> 00:04:22,270 probability there was no thief, 69 00:04:22,270 --> 00:04:25,140 alarm notification and no earthquake. 70 00:04:25,140 --> 00:04:28,970 Let's compute these terms. 71 00:04:28,970 --> 00:04:32,935 Let's start with the first one. 72 00:04:32,935 --> 00:04:37,745 What is the general probability of these three events. 73 00:04:37,745 --> 00:04:40,310 We can write them down using the model. 74 00:04:40,310 --> 00:04:44,555 The gen probability actually goes from this model, 75 00:04:44,555 --> 00:04:54,290 to probability of alarm given thief and an earthquake. 76 00:04:54,290 --> 00:04:57,030 That was a probability of thief, 77 00:04:57,030 --> 00:05:02,331 and probability of an earthquake. 78 00:05:02,331 --> 00:05:05,920 All right, where do we get these numbers? 79 00:05:05,920 --> 00:05:09,350 So the probability of the thief is here, 80 00:05:09,350 --> 00:05:12,030 it is this number, 81 00:05:12,030 --> 00:05:17,370 the probability of an earthquake is this number, and finally, 82 00:05:17,370 --> 00:05:20,815 the probability of alarm given that there is a thief and an earthquake, 83 00:05:20,815 --> 00:05:26,250 we can get it from here so it would be this. 84 00:05:26,250 --> 00:05:30,350 Finally, we get 10 to the power of minus three, 85 00:05:30,350 --> 00:05:33,145 times 10 to the power of minus two, times one. 86 00:05:33,145 --> 00:05:37,380 This would be equal to 10 to the power of minus five. 87 00:05:37,380 --> 00:05:46,520 Let's compute 88 00:05:46,520 --> 00:05:48,170 some other probabilities. 89 00:05:48,170 --> 00:05:52,105 For example, let's compute this probability. 90 00:05:52,105 --> 00:05:54,812 What is the probability that there is no thief, 91 00:05:54,812 --> 00:05:57,775 there is no earthquake and there an alarm? 92 00:05:57,775 --> 00:06:02,125 Again, we can write it in a similar way. 93 00:06:02,125 --> 00:06:10,251 It will be a probability of alarm, given no thief, 94 00:06:10,251 --> 00:06:14,915 no earthquake, as a probability of no thief, 95 00:06:14,915 --> 00:06:20,488 and probability of no earthquake. 96 00:06:20,488 --> 00:06:23,145 What is the value of the first term? 97 00:06:23,145 --> 00:06:26,150 This is the probability of alarm, 98 00:06:26,150 --> 00:06:31,005 given that there is no thief and no earthquake so it is 0. 99 00:06:31,005 --> 00:06:35,075 Finally, this probability would be 0. 100 00:06:35,075 --> 00:06:38,659 We can cross it out. 101 00:06:38,659 --> 00:06:44,085 We can compute all of those terms in a similar way. 102 00:06:44,085 --> 00:06:46,335 If we do the math right, 103 00:06:46,335 --> 00:06:49,270 we'll get the value of around 50%. 104 00:06:49,270 --> 00:06:58,155 This would be somewhere around 50%. 105 00:06:58,155 --> 00:07:01,810 So the probability that there is a thief in our house, 106 00:07:01,810 --> 00:07:05,005 we would get alarm notification is around 50%. 107 00:07:05,005 --> 00:07:08,560 Would you trust all your belongings if you're going? 108 00:07:08,560 --> 00:07:10,090 Well, certainly not. 109 00:07:10,090 --> 00:07:12,183 You get into a car, 110 00:07:12,183 --> 00:07:15,955 and head to your house. 111 00:07:15,955 --> 00:07:18,935 On the way home, 112 00:07:18,935 --> 00:07:21,490 you get another notification, 113 00:07:21,490 --> 00:07:23,675 from the radio report. 114 00:07:23,675 --> 00:07:29,230 If you heard a radio report that there was an earthquake in that area near your house. 115 00:07:29,230 --> 00:07:31,510 Now, you want to estimate another probability. 116 00:07:31,510 --> 00:07:37,852 The probability that there is a thief in your house, 117 00:07:37,852 --> 00:07:45,775 given that you heard an alarm and also radio report. 118 00:07:45,775 --> 00:07:49,610 We can do this in a similar way. 119 00:07:49,610 --> 00:07:54,360 This would be the ratio between the joint probability. 120 00:07:54,360 --> 00:07:59,140 So this is thief, alarm, and the radio report, 121 00:07:59,140 --> 00:08:06,675 over the probability of alarm and the radio reports. 122 00:08:06,675 --> 00:08:11,415 Let's add the missing variable to the numerator. 123 00:08:11,415 --> 00:08:12,868 This is an earthquake, 124 00:08:12,868 --> 00:08:15,830 and missing variables to the denominator, 125 00:08:15,830 --> 00:08:20,285 those are the thief, and an earthquake. 126 00:08:20,285 --> 00:08:25,155 You have again, something like this. 127 00:08:25,155 --> 00:08:30,035 Probability of thief, alarm, radio report, 128 00:08:30,035 --> 00:08:34,825 and an earthquake, plus the probability of thief, 129 00:08:34,825 --> 00:08:39,120 alarm, radio reports, and no earthquake. 130 00:08:39,120 --> 00:08:41,625 This is some rule again. 131 00:08:41,625 --> 00:08:47,300 The same thing will be in the denominator so probability of alarm, 132 00:08:47,300 --> 00:08:51,070 radio report, thief and earthquake, 133 00:08:51,070 --> 00:08:55,860 plus probability of alarm, radio report, thief, 134 00:08:55,860 --> 00:08:58,270 not earthquake, and finally, 135 00:08:58,270 --> 00:09:02,595 not finally but, we need more turns. 136 00:09:02,595 --> 00:09:06,390 So alarm, radio report, 137 00:09:06,390 --> 00:09:08,210 not a thief and alarm, 138 00:09:08,210 --> 00:09:11,040 and now finally, the probability of alarm, 139 00:09:11,040 --> 00:09:16,230 radio reports, and no thief and no earthquake. 140 00:09:16,230 --> 00:09:17,512 All right. 141 00:09:17,512 --> 00:09:22,680 Let's compute this in a simple way. 142 00:09:22,680 --> 00:09:25,785 So this term, from our model, 143 00:09:25,785 --> 00:09:28,645 we calls it falling form. 144 00:09:28,645 --> 00:09:33,585 This is probability of an alarm given, 145 00:09:33,585 --> 00:09:36,793 thief and an earthquake, 146 00:09:36,793 --> 00:09:41,238 times probability of the radio report of the earthquake, 147 00:09:41,238 --> 00:09:46,925 times and probability of the thief and probability of an earthquake. 148 00:09:46,925 --> 00:09:49,900 You can find this value interesting. 149 00:09:49,900 --> 00:09:51,780 Also, let's compute, for example, 150 00:09:51,780 --> 00:09:57,165 the probability that there was no earthquake, 151 00:09:57,165 --> 00:10:00,585 there was a thief in our house, and there was a radio report. 152 00:10:00,585 --> 00:10:03,770 In this case, the one of the turns that 153 00:10:03,770 --> 00:10:08,080 the probability of the radio report given that there is no earthquake is 0, 154 00:10:08,080 --> 00:10:10,985 so this term would be 0. 155 00:10:10,985 --> 00:10:15,060 And also this term goes to 0 so, finally, 156 00:10:15,060 --> 00:10:22,260 we get the very overall 1%. 157 00:10:22,260 --> 00:10:27,855 You come home and you get to the probability of 1%. 158 00:10:27,855 --> 00:10:32,895 You think that is a fairly small probability and so you come back to work. 159 00:10:32,895 --> 00:10:36,560 But in the evening, when you come back home you see that your house was 160 00:10:36,560 --> 00:10:42,400 robbed and you ask yourself why this happened. 161 00:10:42,400 --> 00:10:45,080 It seems like you computed the probabilities correctly. 162 00:10:45,080 --> 00:10:49,460 However, it turns out that we define our model 163 00:10:49,460 --> 00:10:55,230 in the wrong way so it is actually there are more thieves when there are earthquakes. 164 00:10:55,230 --> 00:10:59,830 Our model should look like this.