1 00:00:00,770 --> 00:00:04,310 We now follow a program that parallels our development 2 00:00:04,310 --> 00:00:06,780 for the case of the Bernoulli process. 3 00:00:06,780 --> 00:00:10,460 We will study the time until the first arrival, 4 00:00:10,460 --> 00:00:13,870 a random variable that we denote by T1. 5 00:00:13,870 --> 00:00:15,940 We're interested in finding the probability 6 00:00:15,940 --> 00:00:18,050 distribution of this random variable. 7 00:00:18,050 --> 00:00:20,600 And later on, we will continue and try 8 00:00:20,600 --> 00:00:25,060 to study the time until the kth arrival. 9 00:00:25,060 --> 00:00:27,720 Now T1 is a continuous random variable, 10 00:00:27,720 --> 00:00:30,270 because the Poisson process runs in continuous time. 11 00:00:30,270 --> 00:00:32,070 And therefore, it has a PDF. 12 00:00:32,070 --> 00:00:34,550 But instead of finding the PDF directly, 13 00:00:34,550 --> 00:00:38,530 we will first find the CDF of this random variable. 14 00:00:38,530 --> 00:00:42,940 So we fix a certain time, T. And we're 15 00:00:42,940 --> 00:00:45,950 asking for the probability that the first arrival happens 16 00:00:45,950 --> 00:00:47,600 during this interval. 17 00:00:47,600 --> 00:00:49,760 Now this is 1 minus the probability 18 00:00:49,760 --> 00:00:52,980 that the first arrival happens outside this interval. 19 00:00:52,980 --> 00:00:57,060 So we can write this probability as 1 minus the probability 20 00:00:57,060 --> 00:00:59,680 that T1 is bigger than t. 21 00:00:59,680 --> 00:01:01,520 But what is this event? 22 00:01:01,520 --> 00:01:05,760 The first arrival occurring after time, little t, 23 00:01:05,760 --> 00:01:09,610 is the same as saying that there were no arrivals in the time 24 00:01:09,610 --> 00:01:13,160 interval from 0 to little t. 25 00:01:13,160 --> 00:01:16,660 And this probability of 0 arrivals 26 00:01:16,660 --> 00:01:20,170 in a time interval of length t is 27 00:01:20,170 --> 00:01:23,380 something for which we already have a formula. 28 00:01:23,380 --> 00:01:28,830 Take this formula and replace k by 0, tau by t. 29 00:01:28,830 --> 00:01:31,650 When k is equal to 0, this term is 30 00:01:31,650 --> 00:01:34,289 something to the 0-th power equal to 1. 31 00:01:34,289 --> 00:01:37,710 Using our convention, that 0 factorial is equal to 1, 32 00:01:37,710 --> 00:01:40,990 we're left just with e to the minus lambda t. 33 00:01:40,990 --> 00:01:44,479 And this is the answer for the CDF of the time 34 00:01:44,479 --> 00:01:46,440 until the first arrival. 35 00:01:46,440 --> 00:01:48,320 We then take the derivative. 36 00:01:48,320 --> 00:01:52,550 And we find that the PDF of the time until the first arrival 37 00:01:52,550 --> 00:01:56,700 has this form, which is the PDF of an exponential random 38 00:01:56,700 --> 00:01:57,650 variable. 39 00:01:57,650 --> 00:01:59,660 Of course, this calculation here is 40 00:01:59,660 --> 00:02:04,190 only valid for t's that are non-negative. 41 00:02:04,190 --> 00:02:08,910 For negative t's, the PDF of T1 is, of course, 0. 42 00:02:08,910 --> 00:02:10,669 For the exponential random variable, 43 00:02:10,669 --> 00:02:14,600 we have seen that it has certain memorylessness properties. 44 00:02:14,600 --> 00:02:17,860 Namely, if I condition on an event 45 00:02:17,860 --> 00:02:21,420 that nothing has occurred until a certain time, 46 00:02:21,420 --> 00:02:25,910 t, and I am interested in the time from now 47 00:02:25,910 --> 00:02:29,850 until the first arrival occurs, this remaining 48 00:02:29,850 --> 00:02:33,780 until the first arrival is again an exponential distribution. 49 00:02:33,780 --> 00:02:36,620 That is, looking ahead from this time, 50 00:02:36,620 --> 00:02:39,810 I will still wait an exponentially distributed 51 00:02:39,810 --> 00:02:43,340 amount of time until I see the first arrival. 52 00:02:43,340 --> 00:02:45,490 Whatever happened in the past and how long 53 00:02:45,490 --> 00:02:47,920 I have been waiting doesn't matter. 54 00:02:47,920 --> 00:02:50,050 Starting from this time, I will still 55 00:02:50,050 --> 00:02:53,540 wait an exponentially distributed amount of time. 56 00:02:53,540 --> 00:02:55,250 This is essentially an expression 57 00:02:55,250 --> 00:02:59,150 of a fresh start property of the Poisson process, which 58 00:02:59,150 --> 00:03:01,870 is analogous to the fresh start properties for the Bernoulli 59 00:03:01,870 --> 00:03:02,440 process. 60 00:03:02,440 --> 00:03:04,640 And we will be discussing this fresh start 61 00:03:04,640 --> 00:03:06,540 property a lot more. 62 00:03:06,540 --> 00:03:08,890 Having figured out the distribution 63 00:03:08,890 --> 00:03:10,880 of the time of the first arrival, 64 00:03:10,880 --> 00:03:15,590 let us now study the time of the k-th arrival, a random variable 65 00:03:15,590 --> 00:03:19,400 that we denote by Y sub k, similar to the case 66 00:03:19,400 --> 00:03:21,030 of the Bernoulli process. 67 00:03:21,030 --> 00:03:22,990 This random variable is a continuous one, 68 00:03:22,990 --> 00:03:25,260 because arrivals happen in continuous time, 69 00:03:25,260 --> 00:03:26,940 so it takes continuous values. 70 00:03:26,940 --> 00:03:30,110 And therefore, it will be described by a PDF. 71 00:03:30,110 --> 00:03:32,710 And this is what we want to find. 72 00:03:32,710 --> 00:03:36,990 In order to find it, we will make use of the Poisson PMF 73 00:03:36,990 --> 00:03:40,220 that we have already derived for the number of arrivals 74 00:03:40,220 --> 00:03:43,320 during an interval of a fixed length. 75 00:03:43,320 --> 00:03:46,650 One approach to finding the PDF of Yk 76 00:03:46,650 --> 00:03:48,950 is the usual program, similar again 77 00:03:48,950 --> 00:03:52,540 to what we did for the case of the first arrival time. 78 00:03:52,540 --> 00:03:57,470 We can first find CDF, and then differentiate to find the PDF. 79 00:03:57,470 --> 00:03:59,040 So what is the CDF? 80 00:03:59,040 --> 00:04:01,070 We want to calculate the probability 81 00:04:01,070 --> 00:04:07,690 that Yk is less than or equal to some number, little y. 82 00:04:07,690 --> 00:04:09,740 Now what is this event? 83 00:04:09,740 --> 00:04:14,820 The k-th arrival occurs by time y. 84 00:04:14,820 --> 00:04:19,800 This means that by time y, we've had at least k arrivals. 85 00:04:19,800 --> 00:04:24,860 We've had k arrivals, or maybe k plus 1, or maybe k plus 2. 86 00:04:24,860 --> 00:04:28,120 We've had some number of arrivals, n, 87 00:04:28,120 --> 00:04:32,320 in an interval of length, y. 88 00:04:32,320 --> 00:04:37,050 And this is an event that happens with this probability. 89 00:04:37,050 --> 00:04:41,290 But we need to take into account all of the possible values of n 90 00:04:41,290 --> 00:04:45,780 that are at least as large as k. 91 00:04:45,780 --> 00:04:49,690 Now we have a formula for this probability, the probability 92 00:04:49,690 --> 00:04:52,420 of n arrivals in an interval of given length. 93 00:04:52,420 --> 00:04:56,490 This is the Poisson PMF with appropriate changes of symbols. 94 00:04:56,490 --> 00:05:00,880 So we can take this expression, substitute it here, and then 95 00:05:00,880 --> 00:05:04,720 differentiate to do some algebra and find the answer. 96 00:05:04,720 --> 00:05:06,550 Instead of carrying out this algebra, 97 00:05:06,550 --> 00:05:10,665 however, we will proceed in a more intuitive way that 98 00:05:10,665 --> 00:05:13,930 will get us there perhaps faster. 99 00:05:13,930 --> 00:05:17,110 And the derivation that we would follow actually 100 00:05:17,110 --> 00:05:20,110 parallels the one that we went through 101 00:05:20,110 --> 00:05:22,610 in the case of the Bernoulli process. 102 00:05:22,610 --> 00:05:24,690 The intuitive argument that we will use 103 00:05:24,690 --> 00:05:27,690 will rest on the interpretation of a PDF 104 00:05:27,690 --> 00:05:30,970 in terms of probabilities of small intervals. 105 00:05:30,970 --> 00:05:34,270 So the PDF evaluated at some particular point, 106 00:05:34,270 --> 00:05:38,909 y, times delta, is approximately the probability 107 00:05:38,909 --> 00:05:43,240 that our random variable falls within a delta interval 108 00:05:43,240 --> 00:05:46,560 from this number, little y, that we're considering. 109 00:05:46,560 --> 00:05:51,870 So here's time 0, here's time y, and here's time y plus delta. 110 00:05:51,870 --> 00:05:54,930 We want to find or to say something 111 00:05:54,930 --> 00:05:59,560 about the probability of falling inside this small interval. 112 00:05:59,560 --> 00:06:02,880 Now what does it mean for the k-th arrival 113 00:06:02,880 --> 00:06:05,890 to fall inside this interval? 114 00:06:05,890 --> 00:06:09,000 This is an event that can happen as follows. 115 00:06:09,000 --> 00:06:11,790 The k-th arrival falls in this interval, 116 00:06:11,790 --> 00:06:16,840 and we've had k minus 1 arrivals during the previous interval. 117 00:06:16,840 --> 00:06:21,100 What is the probability of this event? 118 00:06:21,100 --> 00:06:23,280 A basic assumption about the Poisson process 119 00:06:23,280 --> 00:06:25,100 is the independence assumption. 120 00:06:25,100 --> 00:06:29,170 Therefore, having k minus 1 arrivals in this interval 121 00:06:29,170 --> 00:06:31,490 and having one arrival in this interval 122 00:06:31,490 --> 00:06:33,430 are independent events. 123 00:06:33,430 --> 00:06:35,659 Therefore, the probability of this scenario 124 00:06:35,659 --> 00:06:39,100 is the product of the probabilities 125 00:06:39,100 --> 00:06:44,250 that we've had k minus 1 arrivals in an interval 126 00:06:44,250 --> 00:06:47,480 of length, y, times the probability 127 00:06:47,480 --> 00:06:51,560 that we've had one arrival in an interval of length delta. 128 00:06:51,560 --> 00:06:54,590 And that latter probability is approximately 129 00:06:54,590 --> 00:06:56,920 equal to lambda times delta. 130 00:06:56,920 --> 00:07:00,050 So I should write here an approximate equality instead 131 00:07:00,050 --> 00:07:01,880 of an exact equality, to indicate 132 00:07:01,880 --> 00:07:04,730 that there are other terms, order of delta squared, 133 00:07:04,730 --> 00:07:09,040 for example, but which are much smaller compared to the delta. 134 00:07:09,040 --> 00:07:11,290 However, this is not the only way 135 00:07:11,290 --> 00:07:14,700 that we can get the k-th arrival in this interval. 136 00:07:14,700 --> 00:07:16,710 There's an alternative scenario. 137 00:07:16,710 --> 00:07:22,230 We might have had k minus 2 arrivals during this interval, 138 00:07:22,230 --> 00:07:25,950 and then two arrivals during that little interval. 139 00:07:25,950 --> 00:07:28,290 In this case, the k-th arrival again 140 00:07:28,290 --> 00:07:30,680 occurs within that little interval. 141 00:07:30,680 --> 00:07:35,310 So we need to also calculate the probability of this scenario. 142 00:07:35,310 --> 00:07:37,600 The probability of that scenario is 143 00:07:37,600 --> 00:07:40,920 the probability of k minus 2 arrivals in an interval 144 00:07:40,920 --> 00:07:44,950 of length, y, times the probability of two arrivals. 145 00:07:44,950 --> 00:07:46,640 But the probability of two arrivals 146 00:07:46,640 --> 00:07:50,230 is something that's order of delta squared. 147 00:07:50,230 --> 00:07:52,960 And order of delta squared is much smaller 148 00:07:52,960 --> 00:07:55,590 than this term, which is linear in delta. 149 00:07:55,590 --> 00:07:59,500 And so this term can be ignored as long as we're just 150 00:07:59,500 --> 00:08:01,580 keeping track of the dominant terms, 151 00:08:01,580 --> 00:08:03,740 those are linear in delta. 152 00:08:03,740 --> 00:08:06,360 And then, they would be similar expressions. 153 00:08:06,360 --> 00:08:10,010 For example, the scenario that we have three arrivals up 154 00:08:10,010 --> 00:08:13,610 to time y, and then three more arrivals 155 00:08:13,610 --> 00:08:16,160 during that little interval, which is again 156 00:08:16,160 --> 00:08:18,350 an event of probability, order of delta 157 00:08:18,350 --> 00:08:20,920 squared, that we get three arrivals there. 158 00:08:20,920 --> 00:08:23,620 And all of those terms are insignificant, 159 00:08:23,620 --> 00:08:26,150 and we can ignore them. 160 00:08:26,150 --> 00:08:29,790 And we end up with an approximate equality 161 00:08:29,790 --> 00:08:37,308 between this term and this expression here. 162 00:08:37,308 --> 00:08:42,520 Delta shows up on both sides, so we can cancel delta. 163 00:08:42,520 --> 00:08:48,100 And therefore, we have ended up with a formula for the PDF. 164 00:08:48,100 --> 00:08:52,280 In particular, the PDF is equal to this probability times 165 00:08:52,280 --> 00:08:53,320 lambda. 166 00:08:53,320 --> 00:08:54,640 What is this probability? 167 00:08:54,640 --> 00:08:56,550 We have a formula for it. 168 00:08:56,550 --> 00:08:58,190 But we just need to substitute. 169 00:08:58,190 --> 00:09:04,500 Put k minus 1 in the place of k, and put y in the place of tau. 170 00:09:04,500 --> 00:09:10,050 This gives us lambda y to the power k minus 1, e 171 00:09:10,050 --> 00:09:16,850 to the minus lambda y, divided by k minus 1 factorial. 172 00:09:16,850 --> 00:09:18,510 And then we have the extra factor 173 00:09:18,510 --> 00:09:22,890 of lambda, which can be put together with this lambda 174 00:09:22,890 --> 00:09:24,860 to the k minus 1 here. 175 00:09:24,860 --> 00:09:30,100 And we end up with this final formula for the PDF of Yk. 176 00:09:30,100 --> 00:09:31,720 The distribution that we have here 177 00:09:31,720 --> 00:09:33,720 is called an Erlang distribution. 178 00:09:33,720 --> 00:09:36,260 But actually, it's not just one distribution. 179 00:09:36,260 --> 00:09:38,640 We have different distributions depending 180 00:09:38,640 --> 00:09:41,130 on what k we're considering. 181 00:09:41,130 --> 00:09:43,950 The distribution of the time of the third arrival 182 00:09:43,950 --> 00:09:45,510 is different from the distribution 183 00:09:45,510 --> 00:09:47,120 of the 10th arrival. 184 00:09:47,120 --> 00:09:49,580 So if we fix a particular k, then 185 00:09:49,580 --> 00:09:53,680 we say that we have an Erlang distribution of order k. 186 00:09:56,300 --> 00:09:59,520 For the case where k is equal to 1, 187 00:09:59,520 --> 00:10:03,840 this term here disappears, k minus 1 is equal to 0. 188 00:10:03,840 --> 00:10:06,060 And the denominator term disappears, 189 00:10:06,060 --> 00:10:10,260 and we end up with lambda times e to the minus lambda y. 190 00:10:10,260 --> 00:10:12,480 But this is the exponential distribution 191 00:10:12,480 --> 00:10:16,730 that we had already derived with a different method earlier. 192 00:10:16,730 --> 00:10:18,900 As you increase k, of course, you 193 00:10:18,900 --> 00:10:20,580 get different distributions. 194 00:10:20,580 --> 00:10:23,820 And these tend to shift towards the right. 195 00:10:23,820 --> 00:10:25,610 This makes sense. 196 00:10:25,610 --> 00:10:28,430 The time of the second arrival is 197 00:10:28,430 --> 00:10:30,280 likely to take certain values. 198 00:10:30,280 --> 00:10:32,890 The time of the third arrival is likely to take 199 00:10:32,890 --> 00:10:34,310 values that are higher. 200 00:10:34,310 --> 00:10:37,640 And the more you increase k, the more the distribution 201 00:10:37,640 --> 00:10:39,900 will be shifting towards the right.