1 00:00:00,500 --> 00:00:03,580 We will now go through a beautiful example, in which we 2 00:00:03,580 --> 00:00:08,150 approach the same question in a number of different ways 3 00:00:08,150 --> 00:00:11,300 and see that by reasoning based on the intuitive 4 00:00:11,300 --> 00:00:13,630 properties of a Poisson process, we 5 00:00:13,630 --> 00:00:16,750 can arrive quickly to the right answer. 6 00:00:16,750 --> 00:00:18,130 The problem is as follows. 7 00:00:18,130 --> 00:00:21,080 We have three lightbulbs, and each light bulb 8 00:00:21,080 --> 00:00:24,920 is being lit at time zero, it starts working, 9 00:00:24,920 --> 00:00:28,010 and the light bulb lasts for a certain amount 10 00:00:28,010 --> 00:00:29,630 of time, which is random. 11 00:00:29,630 --> 00:00:33,090 So this light bulb lasts so long, this one lasts so long, 12 00:00:33,090 --> 00:00:36,080 this one lasts that long. 13 00:00:36,080 --> 00:00:40,090 The lifetime of a light bulb, the time until it burns out, 14 00:00:40,090 --> 00:00:42,380 will be a random variable, and we 15 00:00:42,380 --> 00:00:44,220 make the following assumptions. 16 00:00:44,220 --> 00:00:46,670 The lifetimes of the three light bulbs, 17 00:00:46,670 --> 00:00:50,100 which we denote by X, Y, and Z, will 18 00:00:50,100 --> 00:00:52,880 be independent random variables, each of which 19 00:00:52,880 --> 00:00:55,760 is an exponential random variable with the parameter 20 00:00:55,760 --> 00:00:56,680 lambda. 21 00:00:56,680 --> 00:00:58,880 We're interested in the question of calculating 22 00:00:58,880 --> 00:01:02,430 the expected time until a light bulb burns out 23 00:01:02,430 --> 00:01:03,680 for the first time. 24 00:01:03,680 --> 00:01:06,870 So in this picture, the light bulb that burned out first 25 00:01:06,870 --> 00:01:09,920 is the second light bulb, and this quantity 26 00:01:09,920 --> 00:01:12,740 is the time until the first burnout. 27 00:01:12,740 --> 00:01:15,270 How do we calculate this quantity? 28 00:01:15,270 --> 00:01:18,200 The time until a first light bulb burns out 29 00:01:18,200 --> 00:01:22,800 is the minimum of the times at which each one of them 30 00:01:22,800 --> 00:01:24,370 burns out. 31 00:01:24,370 --> 00:01:26,490 So we're interested in the expected 32 00:01:26,490 --> 00:01:28,560 value of this quantity. 33 00:01:28,560 --> 00:01:31,030 It's a random variable, which is a function of three 34 00:01:31,030 --> 00:01:32,440 random variables. 35 00:01:32,440 --> 00:01:34,740 How do we calculate the expected value 36 00:01:34,740 --> 00:01:36,740 of a function of random variables? 37 00:01:36,740 --> 00:01:39,370 We can use the expected value rule. 38 00:01:39,370 --> 00:01:42,410 Let us take the function of interest, 39 00:01:42,410 --> 00:01:45,210 which is the minimum of three numbers. 40 00:01:45,210 --> 00:01:50,370 Then we need to multiply by the joint PDF or these three 41 00:01:50,370 --> 00:01:52,970 random variables X, Y and Z. Now, 42 00:01:52,970 --> 00:01:55,570 because these three random variables are independent, 43 00:01:55,570 --> 00:02:00,130 the joint PDF is the product of their individual PDFs, 44 00:02:00,130 --> 00:02:02,230 which are all exponential. 45 00:02:02,230 --> 00:02:06,440 And so we obtain this expression for the joint PDF. 46 00:02:06,440 --> 00:02:12,370 And we need to integrate this over all x's, y's, and z's. 47 00:02:12,370 --> 00:02:14,290 So it's going to be an integral that 48 00:02:14,290 --> 00:02:19,730 goes for each one of the three variables from 0 to infinity. 49 00:02:19,730 --> 00:02:24,650 And here we have dx, dy, dz. 50 00:02:24,650 --> 00:02:27,270 So this is one approach that can give us 51 00:02:27,270 --> 00:02:31,980 the answer if you're able to manipulate and keep 52 00:02:31,980 --> 00:02:36,370 track of everything that happens in this three-dimensional 53 00:02:36,370 --> 00:02:37,310 integral. 54 00:02:37,310 --> 00:02:41,770 But this is too tedious and this is not a good way to go. 55 00:02:41,770 --> 00:02:44,329 Let us try to think of an alternative way. 56 00:02:44,329 --> 00:02:46,990 Can we figure out the distribution 57 00:02:46,990 --> 00:02:48,891 of this random variable? 58 00:02:48,891 --> 00:02:51,390 It's a function of three random variables, so in some sense, 59 00:02:51,390 --> 00:02:53,530 it's a derived distribution problem, 60 00:02:53,530 --> 00:02:57,320 so we can try to calculate the cumulative distribution 61 00:02:57,320 --> 00:03:00,650 function of the minimum of the three. 62 00:03:00,650 --> 00:03:05,350 So for the cumulative, we would be looking at the probability 63 00:03:05,350 --> 00:03:10,160 that the minimum of these three random variables is less than 64 00:03:10,160 --> 00:03:12,220 or equal to a certain number. 65 00:03:12,220 --> 00:03:14,400 It turns out that the calculations 66 00:03:14,400 --> 00:03:17,570 are a little faster if we look at the probability 67 00:03:17,570 --> 00:03:21,560 that this is larger than or equal to a certain number. 68 00:03:21,560 --> 00:03:23,130 What is this event? 69 00:03:23,130 --> 00:03:26,060 The minimum is larger than or equal to t, 70 00:03:26,060 --> 00:03:29,660 if, and only if, all three of them 71 00:03:29,660 --> 00:03:32,000 are larger than or equal to t. 72 00:03:32,000 --> 00:03:34,930 So the probability of this event is the same as the probability 73 00:03:34,930 --> 00:03:37,210 that X is larger than or equal to t, 74 00:03:37,210 --> 00:03:41,910 Y larger than or equal to t, and Z larger than or equal to t. 75 00:03:41,910 --> 00:03:45,110 But now X, Y, and Z are independent, 76 00:03:45,110 --> 00:03:48,230 so we need to multiply the probability that X 77 00:03:48,230 --> 00:03:50,570 is larger than or equal to t, which 78 00:03:50,570 --> 00:03:52,170 for an exponential random variable 79 00:03:52,170 --> 00:03:55,250 is e to the minus lambda t, then the probability 80 00:03:55,250 --> 00:03:59,060 of the second event which is again e to the minus lambda t, 81 00:03:59,060 --> 00:04:01,630 and, finally, the probability of the third event, which 82 00:04:01,630 --> 00:04:04,010 is, again, e to the minus lambda t, 83 00:04:04,010 --> 00:04:06,620 which is e to the minus 3 lambda t. 84 00:04:10,730 --> 00:04:13,630 Now, we look at this expression for the probability 85 00:04:13,630 --> 00:04:15,740 that the random variable is larger than or equal 86 00:04:15,740 --> 00:04:19,790 to t and recognize that this is the expression that we have 87 00:04:19,790 --> 00:04:25,050 when we have an exponential random variable with parameter 88 00:04:25,050 --> 00:04:27,190 equal to 3 lambda. 89 00:04:27,190 --> 00:04:30,680 If you want to do it formally, subtract this quantity from 1 90 00:04:30,680 --> 00:04:33,210 to find the CDF, take the derivative, 91 00:04:33,210 --> 00:04:35,820 and you will find an exponential PDF. 92 00:04:35,820 --> 00:04:39,700 So the conclusion is that this random variable 93 00:04:39,700 --> 00:04:43,260 is exponential with parameter 3 lambda. 94 00:04:46,000 --> 00:04:49,250 And since it's an exponential with parameter 3 lambda, 95 00:04:49,250 --> 00:04:52,070 then we know what the expected value is. 96 00:04:52,070 --> 00:04:55,270 It is going to be 1 over 3 lambda. 97 00:04:55,270 --> 00:04:57,540 And this is the answer to the question 98 00:04:57,540 --> 00:05:00,350 that we were interested in. 99 00:05:00,350 --> 00:05:03,630 Now, the fact that this is an exponential random variable, 100 00:05:03,630 --> 00:05:08,380 but with a different parameter, is a pretty clean fact, 101 00:05:08,380 --> 00:05:12,190 and so it should have a good explanation. 102 00:05:12,190 --> 00:05:18,930 Let us now try to think about a good explanation for this fact. 103 00:05:18,930 --> 00:05:22,660 Whenever we deal with an exponential random variable, 104 00:05:22,660 --> 00:05:25,120 one way of thinking about it is that 105 00:05:25,120 --> 00:05:29,370 this exponential random variable is the first time in a Poisson 106 00:05:29,370 --> 00:05:30,300 process. 107 00:05:30,300 --> 00:05:33,040 So imagine that there's a Poisson process that 108 00:05:33,040 --> 00:05:38,400 runs forever, and X is the first arrival time. 109 00:05:38,400 --> 00:05:41,180 For this light bulb, we can think the same way, 110 00:05:41,180 --> 00:05:44,650 and since X and Y are assumed to be independent, 111 00:05:44,650 --> 00:05:48,010 we can assume that here we have an independent Poisson 112 00:05:48,010 --> 00:05:50,360 process, independent from the first one, 113 00:05:50,360 --> 00:05:53,690 it has its own arrival times, and Y is the first arrival 114 00:05:53,690 --> 00:05:55,640 time in this Poisson process. 115 00:05:55,640 --> 00:05:59,040 And finally, we have a third independent Poisson process, 116 00:05:59,040 --> 00:06:02,180 and the random variable Z is the first arrival 117 00:06:02,180 --> 00:06:04,290 time in that Poisson process. 118 00:06:04,290 --> 00:06:08,010 So X, Y and Z are interpreted as first arrivals 119 00:06:08,010 --> 00:06:11,040 in three independent Poisson processes. 120 00:06:11,040 --> 00:06:14,200 Now, let us take these three Poisson processes 121 00:06:14,200 --> 00:06:15,540 and merge them. 122 00:06:15,540 --> 00:06:18,750 If we merge these three processes, what we obtain 123 00:06:18,750 --> 00:06:22,890 is a merged process, which is Poisson with parameter 124 00:06:22,890 --> 00:06:27,500 equal to the sum of the rates or parameters of each one 125 00:06:27,500 --> 00:06:29,820 of the processes, so it's a Poisson process 126 00:06:29,820 --> 00:06:32,450 with parameter 3 lambda. 127 00:06:32,450 --> 00:06:37,280 Now, how can we interpret the random variable of interest, 128 00:06:37,280 --> 00:06:41,420 the first burnout time, in terms of the merged process? 129 00:06:41,420 --> 00:06:44,200 So the merged process has an arrival 130 00:06:44,200 --> 00:06:47,680 whenever one of those three processes has an arrival. 131 00:06:47,680 --> 00:06:50,570 The first arrival in the merged process 132 00:06:50,570 --> 00:06:55,390 will happen the first time that one of these three processes 133 00:06:55,390 --> 00:06:57,570 is going to have an arrival. 134 00:06:57,570 --> 00:07:00,990 Therefore, we can interpret the random variable 135 00:07:00,990 --> 00:07:03,180 of interest, the first burnout time, 136 00:07:03,180 --> 00:07:06,650 as the first arrival time in a merged process. 137 00:07:06,650 --> 00:07:10,045 But now the merged process is Poisson with parameter 3 138 00:07:10,045 --> 00:07:13,740 lambda, therefore, this random variable 139 00:07:13,740 --> 00:07:18,100 is going to be an exponential random variable with parameter 140 00:07:18,100 --> 00:07:19,830 3 lambda. 141 00:07:19,830 --> 00:07:23,010 And from this, we also obtain the expected value 142 00:07:23,010 --> 00:07:25,890 of that random variable. 143 00:07:25,890 --> 00:07:30,270 The beauty of this last approach for coming up with the answer 144 00:07:30,270 --> 00:07:33,390 by reasoning in terms of merged Poisson processes 145 00:07:33,390 --> 00:07:37,540 is that we didn't have to do any calculations at all, just 146 00:07:37,540 --> 00:07:40,960 use the intuitive understanding of Poisson processes 147 00:07:40,960 --> 00:07:43,010 and, especially, the interpretation 148 00:07:43,010 --> 00:07:46,830 of an exponential random variable as the first arrival 149 00:07:46,830 --> 00:07:50,400 time in a Poisson process. 150 00:07:50,400 --> 00:07:54,190 Let us now try to solve a somewhat harder problem. 151 00:07:54,190 --> 00:07:56,750 Let us try to calculate the expected time 152 00:07:56,750 --> 00:08:01,430 until all the light bulbs burn out. 153 00:08:01,430 --> 00:08:05,540 So one light bulb will burn out, then another one will burn out, 154 00:08:05,540 --> 00:08:08,110 and, finally, the third one will burn out. 155 00:08:08,110 --> 00:08:11,700 We want to find the expected time until this happens. 156 00:08:11,700 --> 00:08:15,720 Once more, we will be thinking of these burnout times 157 00:08:15,720 --> 00:08:19,690 as the first arrival times in Poisson processes. 158 00:08:22,560 --> 00:08:25,780 The total time until the third burnout 159 00:08:25,780 --> 00:08:29,860 can be split into different periods. 160 00:08:29,860 --> 00:08:33,808 There's a time until one light bulb burns out. 161 00:08:33,808 --> 00:08:37,058 And the expected value of this period 162 00:08:37,058 --> 00:08:40,120 here is going to be 1 over 3 lambda. 163 00:08:43,049 --> 00:08:45,540 What happens at this time? 164 00:08:45,540 --> 00:08:50,300 The second light bulb has burned out, so we can forget about it, 165 00:08:50,300 --> 00:08:52,960 take it out of the picture. 166 00:08:52,960 --> 00:08:55,830 We have two lightbulbs. 167 00:08:55,830 --> 00:08:58,390 Let us look at the time it will take 168 00:08:58,390 --> 00:09:02,610 until one of these two light bulbs burns out. 169 00:09:02,610 --> 00:09:07,110 So we're interested in this period of time. 170 00:09:07,110 --> 00:09:11,370 Now, the Poisson process starts fresh at this time. 171 00:09:11,370 --> 00:09:13,940 After this time, whatever happens 172 00:09:13,940 --> 00:09:16,640 is just an ordinary Poisson process 173 00:09:16,640 --> 00:09:19,350 as if it were starting at this time. 174 00:09:19,350 --> 00:09:23,630 So this is going to be an exponential random variable 175 00:09:23,630 --> 00:09:24,930 starting from this time. 176 00:09:24,930 --> 00:09:28,680 And this is going to be another exponential random variable. 177 00:09:28,680 --> 00:09:32,670 So the time until the next light bulb burns out in this case 178 00:09:32,670 --> 00:09:34,410 is going to be the minimum of two 179 00:09:34,410 --> 00:09:36,370 exponential random variables. 180 00:09:36,370 --> 00:09:39,300 We can think again about merging these two Poisson 181 00:09:39,300 --> 00:09:42,475 processes to obtain a Poisson process with total rate 2 182 00:09:42,475 --> 00:09:46,450 lambda, and the time until one of these two turns out 183 00:09:46,450 --> 00:09:50,670 is going to be the first arrival time in that merged process. 184 00:09:50,670 --> 00:09:54,775 And so the expected time until the first arrival 185 00:09:54,775 --> 00:09:59,730 of the merged process is going to be 1 over 2 lambda. 186 00:09:59,730 --> 00:10:03,540 And finally, once this burnout has happened, 187 00:10:03,540 --> 00:10:06,160 we can forget about this light bulb. 188 00:10:06,160 --> 00:10:10,200 We're left just with one light bulb, and starting from here, 189 00:10:10,200 --> 00:10:13,130 we wait until that light bulb burns out. 190 00:10:13,130 --> 00:10:16,480 Once more, because of the fresh start property of the Poisson 191 00:10:16,480 --> 00:10:19,960 process, starting from here until it burns out 192 00:10:19,960 --> 00:10:22,010 is going to be a random variable, which 193 00:10:22,010 --> 00:10:24,210 is an exponential random variable. 194 00:10:24,210 --> 00:10:27,150 And in this case, an exponential random variable with rate 195 00:10:27,150 --> 00:10:28,620 just lambda. 196 00:10:28,620 --> 00:10:31,100 And by adding these three quantities, 197 00:10:31,100 --> 00:10:38,440 we get the expected time until all three have burned out. 198 00:10:38,440 --> 00:10:39,970 This is a problem that would have 199 00:10:39,970 --> 00:10:44,960 been quite hard to solve in a more analytical way. 200 00:10:44,960 --> 00:10:47,670 We're dealing with a random variable, which is now 201 00:10:47,670 --> 00:10:52,450 the maximum of X, Y, and Z. And the distribution 202 00:10:52,450 --> 00:10:56,770 of this random variable is not so simple to write down. 203 00:10:56,770 --> 00:11:00,130 So that would not be a very good approach 204 00:11:00,130 --> 00:11:02,430 for going about this problem. 205 00:11:02,430 --> 00:11:04,930 But we managed to find the expected value 206 00:11:04,930 --> 00:11:08,030 of this random variable without having to write down 207 00:11:08,030 --> 00:11:12,020 its distribution, by breaking this random variable 208 00:11:12,020 --> 00:11:17,650 into a sum of three particular random variables, each of which 209 00:11:17,650 --> 00:11:20,490 had a nice intuitive interpretation. 210 00:11:20,490 --> 00:11:24,580 And that was the key to the solution of this problem.