1 00:00:00,650 --> 00:00:03,320 In this segment, we go through an example 2 00:00:03,320 --> 00:00:06,690 to get some practice with Poisson process calculations. 3 00:00:06,690 --> 00:00:08,420 The example is as follows. 4 00:00:08,420 --> 00:00:11,610 You go fishing and fish are caught according 5 00:00:11,610 --> 00:00:15,020 to a Poisson process with an arrival rate-- that 6 00:00:15,020 --> 00:00:20,970 is the rate at which fish are caught-- of 0.6 fish per hour. 7 00:00:20,970 --> 00:00:24,530 You will fish for two hours no matter what. 8 00:00:24,530 --> 00:00:26,140 And if during those two hours you 9 00:00:26,140 --> 00:00:28,940 have caught at least one fish, then you stop. 10 00:00:28,940 --> 00:00:32,280 As in this scenario, in which you have caught three fish 11 00:00:32,280 --> 00:00:35,380 during the first two hours, and then you stop. 12 00:00:35,380 --> 00:00:40,640 Otherwise, you will continue until you catch one fish. 13 00:00:40,640 --> 00:00:44,280 And at that time, you will stop. 14 00:00:44,280 --> 00:00:47,580 We will answer a few questions and we will write down 15 00:00:47,580 --> 00:00:51,100 the answers to these questions in terms of the notation 16 00:00:51,100 --> 00:00:52,850 that we have introduced. 17 00:00:52,850 --> 00:00:55,580 And here, for reference, we have all of the formulas 18 00:00:55,580 --> 00:00:58,570 that we have developed so far. 19 00:00:58,570 --> 00:01:01,240 The first question is, what is the probability 20 00:01:01,240 --> 00:01:04,269 that you get to fish for more than two hours? 21 00:01:04,269 --> 00:01:07,710 Well, you get to fish for more than two hours if and only 22 00:01:07,710 --> 00:01:12,490 if you didn't catch any fish during the first two hours. 23 00:01:12,490 --> 00:01:15,289 So this is the probability of catching 24 00:01:15,289 --> 00:01:19,039 zero fish in the first two hours. 25 00:01:19,039 --> 00:01:20,740 And we can use this formula. 26 00:01:20,740 --> 00:01:24,690 Substitute k equal to 0, tau equal to 2, 27 00:01:24,690 --> 00:01:27,210 lambda equal to 0.6. 28 00:01:27,210 --> 00:01:30,150 Plug in the numbers and obtain a numerical answer. 29 00:01:30,150 --> 00:01:32,229 We will not bother [with] the numerical answers, 30 00:01:32,229 --> 00:01:35,320 we will just be writing down the expressions that 31 00:01:35,320 --> 00:01:37,860 give us the answers. 32 00:01:37,860 --> 00:01:43,470 Now, in this question we could have a different approach. 33 00:01:43,470 --> 00:01:46,020 You will fish for more than two hours 34 00:01:46,020 --> 00:01:49,350 if and only if there are no arrivals during the first two 35 00:01:49,350 --> 00:01:52,190 hours, which means that the first arrival 36 00:01:52,190 --> 00:01:57,229 in the Poisson process of fishing happens after time 2. 37 00:01:57,229 --> 00:02:02,080 So we're talking about the event that the first arrival, T1, 38 00:02:02,080 --> 00:02:04,440 is bigger than 2. 39 00:02:04,440 --> 00:02:06,320 And we're looking into the probability 40 00:02:06,320 --> 00:02:12,170 of this event, which is the integral of the density 41 00:02:12,170 --> 00:02:15,040 of the first arrival time. 42 00:02:15,040 --> 00:02:17,740 And the integral is taken over the range 43 00:02:17,740 --> 00:02:20,030 of values of interest-- larger than 2. 44 00:02:20,030 --> 00:02:23,329 That is, from 2 to infinity. 45 00:02:23,329 --> 00:02:25,900 We know that this density is exponential, 46 00:02:25,900 --> 00:02:29,840 so we can write down this integral and evaluate it. 47 00:02:29,840 --> 00:02:33,090 So notice the difference between these two approaches. 48 00:02:33,090 --> 00:02:36,490 Here we think in terms of the random variables that 49 00:02:36,490 --> 00:02:39,360 correspond to the number of arrivals 50 00:02:39,360 --> 00:02:41,670 during a certain time interval. 51 00:02:41,670 --> 00:02:45,560 Here we're reasoning in terms of inter-arrival times. 52 00:02:45,560 --> 00:02:48,700 And more generally, for Poisson process problems, 53 00:02:48,700 --> 00:02:50,760 an event of interest sometimes can 54 00:02:50,760 --> 00:02:54,720 be expressed in terms of number of arrivals. 55 00:02:54,720 --> 00:02:57,710 Or sometimes it can be expressed in terms 56 00:02:57,710 --> 00:03:00,590 of arrival and inter-arrival times. 57 00:03:00,590 --> 00:03:03,520 Or sometimes both approaches are possible. 58 00:03:03,520 --> 00:03:05,850 But usually one of the two approaches 59 00:03:05,850 --> 00:03:07,380 will be simpler than the other. 60 00:03:07,380 --> 00:03:10,130 For example, here we already have a formula, 61 00:03:10,130 --> 00:03:13,520 whereas here we would need to evaluate an integral. 62 00:03:13,520 --> 00:03:16,890 Here is now our next question, which is a little bit more 63 00:03:16,890 --> 00:03:18,570 complicated. 64 00:03:18,570 --> 00:03:20,079 What is the probability that you get 65 00:03:20,079 --> 00:03:24,270 to fish for more than two hours, and also you 66 00:03:24,270 --> 00:03:29,329 get to fish for less than five hours? 67 00:03:29,329 --> 00:03:32,360 This is the scenario, again, that you 68 00:03:32,360 --> 00:03:35,460 fish for more than two hours, which means that no fish were 69 00:03:35,460 --> 00:03:37,500 caught during the first two hours. 70 00:03:37,500 --> 00:03:39,470 And then you continue fishing. 71 00:03:39,470 --> 00:03:44,310 And by time 5 you have already caught your fish 72 00:03:44,310 --> 00:03:46,180 and you have left. 73 00:03:46,180 --> 00:03:49,440 Now, it is convenient of thinking about the Poisson 74 00:03:49,440 --> 00:03:51,460 process as follows. 75 00:03:51,460 --> 00:03:54,130 Think about the Poisson process of catching fish 76 00:03:54,130 --> 00:03:57,950 at the rate of 0.6 per hour as going on forever. 77 00:03:57,950 --> 00:04:02,490 So there's a fisherman who fishes forever, 78 00:04:02,490 --> 00:04:07,020 except that this fisherman at either this time, 79 00:04:07,020 --> 00:04:11,490 under this scenario, or at that time, under this scenario, 80 00:04:11,490 --> 00:04:14,520 raises a flag and says, OK, this is 81 00:04:14,520 --> 00:04:17,600 the time I should be stopping. 82 00:04:17,600 --> 00:04:21,600 So even though the fisherman will stop fishing at this time, 83 00:04:21,600 --> 00:04:27,860 we can imagine the Poisson process keeps going on. 84 00:04:27,860 --> 00:04:30,490 With this way of thinking, the fact 85 00:04:30,490 --> 00:04:35,460 that you stopped fishing before time 5 is the event 86 00:04:35,460 --> 00:04:38,570 and that the number of fish caught, 87 00:04:38,570 --> 00:04:42,100 or the number of Poisson arrivals during the interval 88 00:04:42,100 --> 00:04:48,560 from 2 to 5 is at least equal to 1, larger than or equal to 1. 89 00:04:48,560 --> 00:04:51,310 So the event of interest consists of the intersection 90 00:04:51,310 --> 00:04:56,440 of two events, zero fish caught during the first two hours-- 91 00:04:56,440 --> 00:05:02,880 which has this probability-- and at least one 92 00:05:02,880 --> 00:05:07,020 arrival in the Poisson process between times 2 and 5-- 93 00:05:07,020 --> 00:05:10,870 this is a time interval of length 3. 94 00:05:10,870 --> 00:05:13,280 And having at least one arrival is 95 00:05:13,280 --> 00:05:17,450 1 minus the probability of 0 arrivals 96 00:05:17,450 --> 00:05:20,720 in a time interval of length 3. 97 00:05:20,720 --> 00:05:24,450 Notice that I'm multiplying those two probabilities here. 98 00:05:24,450 --> 00:05:26,340 Why am I doing this? 99 00:05:26,340 --> 00:05:28,740 In a Poisson process, whatever happens 100 00:05:28,740 --> 00:05:33,230 in disjoint time intervals are independent events. 101 00:05:33,230 --> 00:05:36,010 So an event having to do with this interval-- 102 00:05:36,010 --> 00:05:38,290 the event that no fish were caught-- 103 00:05:38,290 --> 00:05:41,200 and the event that has to do with this interval-- at least 104 00:05:41,200 --> 00:05:44,540 one fish caught, at least one arrival during this time 105 00:05:44,540 --> 00:05:47,020 interval-- these two events are independent. 106 00:05:47,020 --> 00:05:51,040 And this is why we can multiply their probabilities. 107 00:05:51,040 --> 00:05:53,370 Now, let us think of the alternative approach, 108 00:05:53,370 --> 00:05:56,360 a different way of describing this event using 109 00:05:56,360 --> 00:05:58,760 arrival and inter-arrival times. 110 00:05:58,760 --> 00:05:59,710 What is this event? 111 00:05:59,710 --> 00:06:02,140 This is the event that no arrival happened 112 00:06:02,140 --> 00:06:06,920 until this time, but an arrival happened before time 5. 113 00:06:06,920 --> 00:06:11,580 So this is the event that the first arrival 114 00:06:11,580 --> 00:06:17,020 happens after time 2, but before time 5. 115 00:06:17,020 --> 00:06:18,810 And we're looking at the probability 116 00:06:18,810 --> 00:06:22,440 of this event, which we can find by integrating 117 00:06:22,440 --> 00:06:29,910 the PDF of the first arrival time from 2 until 5. 118 00:06:29,910 --> 00:06:32,040 The next question is, what is the probability 119 00:06:32,040 --> 00:06:34,425 that we catch at least two fish? 120 00:06:34,425 --> 00:06:38,770 Under this scenario, we catch one fish and we stop. 121 00:06:38,770 --> 00:06:43,490 Therefore, this scenario must have materialized. 122 00:06:43,490 --> 00:06:46,430 The event of catching at least two fish 123 00:06:46,430 --> 00:06:51,170 is the scenario that from time from 0 until 2, 124 00:06:51,170 --> 00:06:54,170 we caught at least two fish. 125 00:06:54,170 --> 00:06:56,020 So we're talking about the probability 126 00:06:56,020 --> 00:06:59,090 of catching at least two fish, which 127 00:06:59,090 --> 00:07:04,540 is the probability of catching k fish during a time 128 00:07:04,540 --> 00:07:11,441 interval of length 2, where k can be anything from 2 129 00:07:11,441 --> 00:07:11,940 to infinity. 130 00:07:15,030 --> 00:07:17,100 So this is the probability that the number 131 00:07:17,100 --> 00:07:20,800 of fish caught during these two time units 132 00:07:20,800 --> 00:07:22,830 is at least equal to 2. 133 00:07:22,830 --> 00:07:25,900 And an alternative way of writing this expression 134 00:07:25,900 --> 00:07:28,690 so that we do not have to evaluate an infinite sum, 135 00:07:28,690 --> 00:07:33,060 it is 1 minus the probability of catching 0 fish, 136 00:07:33,060 --> 00:07:36,385 and minus the probability of catching 1 fish. 137 00:07:39,060 --> 00:07:41,790 If we were to write this in terms of arrival 138 00:07:41,790 --> 00:07:47,150 and inter-arrival times, we will catch at least two fish 139 00:07:47,150 --> 00:07:52,480 if and only if by the time we stop-- which will be time 2-- 140 00:07:52,480 --> 00:07:56,760 we've had 2 arrivals, which means that the second arrival 141 00:07:56,760 --> 00:07:59,990 time happened before time 2. 142 00:07:59,990 --> 00:08:02,870 So we're looking into the probability 143 00:08:02,870 --> 00:08:08,010 that the second arrival time happened before time 2, which 144 00:08:08,010 --> 00:08:11,660 is the integral from 0 to 2 of the density 145 00:08:11,660 --> 00:08:15,130 of the second arrival time. 146 00:08:15,130 --> 00:08:17,890 We have a formula for this density 147 00:08:17,890 --> 00:08:20,510 given by the Erlang PDF. 148 00:08:20,510 --> 00:08:24,090 So we could take this expression, plug it in here, 149 00:08:24,090 --> 00:08:27,720 evaluate the integral, and obtain the same answer 150 00:08:27,720 --> 00:08:29,700 as we would have obtained here. 151 00:08:29,700 --> 00:08:32,750 Clearly, in this case as well, this first approach 152 00:08:32,750 --> 00:08:36,100 would be a simpler one because these probabilities are already 153 00:08:36,100 --> 00:08:39,280 available to us. 154 00:08:39,280 --> 00:08:41,010 The next question is the following. 155 00:08:41,010 --> 00:08:44,080 Suppose that you already fished for three hours. 156 00:08:44,080 --> 00:08:46,620 This is something that can only happen 157 00:08:46,620 --> 00:08:49,150 under the second scenario. 158 00:08:49,150 --> 00:08:51,860 So no fish have being caught until time 2. 159 00:08:51,860 --> 00:08:52,650 You continue. 160 00:08:52,650 --> 00:08:55,380 No fish were caught until time 3. 161 00:08:55,380 --> 00:08:58,460 And given that this event has occurred, 162 00:08:58,460 --> 00:09:03,070 what is the expected value of the future fishing time? 163 00:09:03,070 --> 00:09:08,710 The expected value until a fish gets caught for the first time? 164 00:09:08,710 --> 00:09:13,670 Well, the Poisson process starts fresh at time 3, 165 00:09:13,670 --> 00:09:16,090 no matter what happened in the past, 166 00:09:16,090 --> 00:09:18,660 no matter what information we're given in the past. 167 00:09:18,660 --> 00:09:21,870 Now you're sitting at time 3 and looking into the future. 168 00:09:21,870 --> 00:09:25,520 You have a fresh starting Poisson process, 169 00:09:25,520 --> 00:09:28,730 as if this was the initial time. 170 00:09:28,730 --> 00:09:32,870 Starting from this time, the time until the first arrival 171 00:09:32,870 --> 00:09:36,550 is going to have an exponential distribution with parameter 172 00:09:36,550 --> 00:09:39,770 lambda, and the expected value of this distribution 173 00:09:39,770 --> 00:09:44,270 is equal to 1 over lambda. 174 00:09:44,270 --> 00:09:47,780 Finally, let's look at a different type of question. 175 00:09:47,780 --> 00:09:51,010 What is the expected value of the total time 176 00:09:51,010 --> 00:09:53,510 that you get to fish? 177 00:09:53,510 --> 00:09:56,470 Let us introduce here some notation. 178 00:09:56,470 --> 00:10:01,070 Let us call the total fishing time capital F. 179 00:10:01,070 --> 00:10:04,900 And the total fishing time consists of two pieces. 180 00:10:04,900 --> 00:10:09,500 There's a time until time 2 that you 181 00:10:09,500 --> 00:10:13,300 will be fishing no matter what. 182 00:10:13,300 --> 00:10:16,660 And then there's going to be the remaining fishing 183 00:10:16,660 --> 00:10:18,610 time after time 2. 184 00:10:22,210 --> 00:10:24,880 So now let's look at the expectation 185 00:10:24,880 --> 00:10:27,870 of the remaining fishing time after time 2. 186 00:10:27,870 --> 00:10:29,480 Here there are two scenarios. 187 00:10:29,480 --> 00:10:31,880 In the first scenario, you stop. 188 00:10:31,880 --> 00:10:34,440 In the second scenario, you continue. 189 00:10:34,440 --> 00:10:36,830 And we will take into account these two scenarios 190 00:10:36,830 --> 00:10:40,780 by using the total expectation theorem. 191 00:10:40,780 --> 00:10:45,600 The first scenario happens with some probability. 192 00:10:45,600 --> 00:10:49,580 This is the probability that you stop fishing at time 2. 193 00:10:49,580 --> 00:10:53,620 And in that case, your remaining fishing time 194 00:10:53,620 --> 00:10:56,980 is going to be equal to 0 because you do not 195 00:10:56,980 --> 00:10:59,510 continue under that scenario. 196 00:10:59,510 --> 00:11:01,710 But there's the other scenario that you 197 00:11:01,710 --> 00:11:06,870 get to fish for more than 2 time units. 198 00:11:06,870 --> 00:11:10,840 And then we multiply this term with 199 00:11:10,840 --> 00:11:14,670 the conditional expectation of the remaining fishing time, 200 00:11:14,670 --> 00:11:18,060 given that you got to fish for more than 2 times units. 201 00:11:21,540 --> 00:11:22,620 So what is this term? 202 00:11:22,620 --> 00:11:25,510 The probability that you get to fish for more than 2 time 203 00:11:25,510 --> 00:11:28,610 units, this is the probability that no fish 204 00:11:28,610 --> 00:11:31,630 were caught during the first time units. 205 00:11:31,630 --> 00:11:34,700 This is the probability of the second scenario. 206 00:11:34,700 --> 00:11:38,660 And then we have this conditional expectation. 207 00:11:38,660 --> 00:11:42,100 Given that you didn't catch anything 208 00:11:42,100 --> 00:11:45,750 and, therefore, you will be continuing fishing, 209 00:11:45,750 --> 00:11:51,090 what is the expected amount of time-- F minus 2-- 210 00:11:51,090 --> 00:11:53,520 that you will be fishing? 211 00:11:53,520 --> 00:11:56,890 Now the Poisson process starts fresh at time 2. 212 00:11:56,890 --> 00:11:58,700 So looking into the future, we're 213 00:11:58,700 --> 00:12:00,650 faced with a Poisson process and we're 214 00:12:00,650 --> 00:12:04,550 asking for the expected time until the first arrival. 215 00:12:04,550 --> 00:12:11,510 And this time has an expected value equal to 1 over lambda. 216 00:12:11,510 --> 00:12:14,710 Our last question is of a similar type. 217 00:12:14,710 --> 00:12:18,650 What is the expected number of fish you're going to catch? 218 00:12:18,650 --> 00:12:23,260 Once more, we will break this into two pieces. 219 00:12:23,260 --> 00:12:26,510 Number of fish caught during the first two hours, 220 00:12:26,510 --> 00:12:31,780 and number of fish caught during the remaining hours. 221 00:12:31,780 --> 00:12:35,480 During the first two hours, the expected number 222 00:12:35,480 --> 00:12:39,650 of fish that you catch is given by this formula. 223 00:12:39,650 --> 00:12:46,650 It is equal to lambda tau-- and in our case lambda is 0.6 224 00:12:46,650 --> 00:12:52,870 and tau is equal to 2-- plus the expected number of fish 225 00:12:52,870 --> 00:12:56,150 that are caught afterwards. 226 00:12:56,150 --> 00:12:58,060 What is this expected value? 227 00:12:58,060 --> 00:13:01,520 Again, we think in terms of the total expectation theorem. 228 00:13:01,520 --> 00:13:05,000 There's one scenario that has a certain probability, 229 00:13:05,000 --> 00:13:08,390 and under that scenario you do not catch any fish. 230 00:13:08,390 --> 00:13:11,070 So that doesn't give us any contribution. 231 00:13:11,070 --> 00:13:13,840 Then there is this scenario, the second one, 232 00:13:13,840 --> 00:13:17,220 that has this probability of occurring. 233 00:13:17,220 --> 00:13:19,470 The probability of catching no fish here, 234 00:13:19,470 --> 00:13:22,280 so that the second scenario materializes. 235 00:13:22,280 --> 00:13:24,720 And if that second scenario materializes, 236 00:13:24,720 --> 00:13:28,480 how many fish are you going to catch after time 2? 237 00:13:28,480 --> 00:13:31,045 It's going to be one fish with certainty. 238 00:13:33,820 --> 00:13:36,780 And this is the final answer to this question. 239 00:13:36,780 --> 00:13:40,110 Notice that in answering both of these questions 240 00:13:40,110 --> 00:13:44,440 we used the divide and conquer strategy twice. 241 00:13:44,440 --> 00:13:48,830 We first divided the time horizon into two pieces 242 00:13:48,830 --> 00:13:52,850 and dealt separately with each one of the pieces. 243 00:13:52,850 --> 00:13:56,660 And then in order to deal with this second piece-- 244 00:13:56,660 --> 00:14:00,740 the time after time 2-- we used divide 245 00:14:00,740 --> 00:14:03,820 and conquer into the two different scenarios 246 00:14:03,820 --> 00:14:07,400 and using the total expectation theorem.