1 00:00:00,000 --> 00:00:00,260 2 00:00:00,260 --> 00:00:03,330 In this problem, Romeo and Juliet are to meet up for a 3 00:00:03,330 --> 00:00:08,530 date, where Romeo arrives at time x and Juliet at time y, 4 00:00:08,530 --> 00:00:12,490 where x and y are independent exponential random variables, 5 00:00:12,490 --> 00:00:13,750 with parameters lambda. 6 00:00:13,750 --> 00:00:16,340 And we're interested in knowing the difference between 7 00:00:16,340 --> 00:00:19,450 the two times of arrivals, we'll call it z, 8 00:00:19,450 --> 00:00:21,940 written as x minus y. 9 00:00:21,940 --> 00:00:25,180 And we'll like to know what the distribution of z is, 10 00:00:25,180 --> 00:00:29,400 expressed by the probability density function, f of z. 11 00:00:29,400 --> 00:00:32,430 Now, we'll do so by using the so-called convolution formula 12 00:00:32,430 --> 00:00:34,220 that we learn in the lecture. 13 00:00:34,220 --> 00:00:38,130 Recall that if we have a random variable w that is the 14 00:00:38,130 --> 00:00:44,160 sum of two independent random variables, x plus y, now, if 15 00:00:44,160 --> 00:00:47,400 that's the case, we can write the probability [INAUDIBLE] 16 00:00:47,400 --> 00:00:50,320 function, fw, [INAUDIBLE] 17 00:00:50,320 --> 00:00:52,360 as the following integration-- 18 00:00:52,360 --> 00:01:01,130 negative infinity to infinity fx little x times f of y w 19 00:01:01,130 --> 00:01:05,540 minus x, integrated over x. 20 00:01:05,540 --> 00:01:08,800 And to use this expression to calculate f of z, we need to 21 00:01:08,800 --> 00:01:10,490 do a bit more work. 22 00:01:10,490 --> 00:01:14,170 Notice w is expressed as a sum of two random variables, 23 00:01:14,170 --> 00:01:19,120 whereas z is expressed as the subtraction of y from x. 24 00:01:19,120 --> 00:01:21,370 But that's fairly easy to fix. 25 00:01:21,370 --> 00:01:23,090 Now, we can write z. 26 00:01:23,090 --> 00:01:28,820 Instead of a subtraction, write it as addition of x plus 27 00:01:28,820 --> 00:01:30,250 negative y. 28 00:01:30,250 --> 00:01:33,120 So in the expression of the convolution formula, we'll 29 00:01:33,120 --> 00:01:37,225 simply replace y by negative y, as it will 30 00:01:37,225 --> 00:01:38,640 show on the next slide. 31 00:01:38,640 --> 00:01:44,600 Using the convolution formula, we can write f of z little z 32 00:01:44,600 --> 00:01:51,090 as the integration of f of x little x and f of negative y z 33 00:01:51,090 --> 00:01:54,210 minus x dx. 34 00:01:54,210 --> 00:01:58,900 Now, we will use the fact that f of negative y, evaluated z 35 00:01:58,900 --> 00:02:05,450 minus x, is simply equal to f of y evaluated at x minus z. 36 00:02:05,450 --> 00:02:08,530 To see why this is true, let's consider, let's say, a 37 00:02:08,530 --> 00:02:10,759 discreet random variable, y. 38 00:02:10,759 --> 00:02:15,830 And now, the probability that negative y is equal to 39 00:02:15,830 --> 00:02:19,440 negative 1 is simply the same as probability that 40 00:02:19,440 --> 00:02:21,400 y is equal to 1. 41 00:02:21,400 --> 00:02:24,930 And the same is true for probability density functions. 42 00:02:24,930 --> 00:02:28,590 With this fact in mind, we can further write equality as the 43 00:02:28,590 --> 00:02:38,900 integration of x times f of y x minus z dx. 44 00:02:38,900 --> 00:02:40,120 We're now ready to compute. 45 00:02:40,120 --> 00:02:44,310 We'll first look at the case where z is less than 0. 46 00:02:44,310 --> 00:02:46,490 On the right, I'm writing out the distribution of an 47 00:02:46,490 --> 00:02:49,710 exponential random variable with a parameter lambda. 48 00:02:49,710 --> 00:02:52,520 In this case, using the integration above, we could 49 00:02:52,520 --> 00:02:57,130 write it as 0 to infinity, lambda e to the negative 50 00:02:57,130 --> 00:03:05,130 lambda x times lambda e to the negative lambda x minus z dx. 51 00:03:05,130 --> 00:03:08,530 Now, the reason we chose a region to integrate from 0 to 52 00:03:08,530 --> 00:03:11,880 positive infinity is because anywhere else, as we can 53 00:03:11,880 --> 00:03:15,910 verify from the expression of fx right here, that the 54 00:03:15,910 --> 00:03:20,300 product of fx times fy here is 0. 55 00:03:20,300 --> 00:03:21,560 Follow this through. 56 00:03:21,560 --> 00:03:23,080 We'll pull out the constant. 57 00:03:23,080 --> 00:03:28,430 Lambda e to the lambda z, the integral from 0 to infinity, 58 00:03:28,430 --> 00:03:34,660 lambda e to the negative 2 lambda x dx. 59 00:03:34,660 --> 00:03:41,610 This will give us lambda e to the lambda z minus 1/2 e to 60 00:03:41,610 --> 00:03:48,970 the negative 2 lambda x infinity minus this expression 61 00:03:48,970 --> 00:03:50,900 value at 0. 62 00:03:50,900 --> 00:03:57,250 And this will give us lamdba over 2 e to the lambda z. 63 00:03:57,250 --> 00:04:02,640 So now, we have an expression for f of z evaluated at little 64 00:04:02,640 --> 00:04:07,660 z when little z is less than 0. 65 00:04:07,660 --> 00:04:10,870 Now that have the distribution of f of z when z is less than 66 00:04:10,870 --> 00:04:13,340 0, we'd like to know what happens when z is greater or 67 00:04:13,340 --> 00:04:14,620 equal to 0. 68 00:04:14,620 --> 00:04:16,820 In principle, we can go through the same procedure of 69 00:04:16,820 --> 00:04:19,450 integration and calculate that value. 70 00:04:19,450 --> 00:04:22,250 But it turns out, there's something much simpler. 71 00:04:22,250 --> 00:04:27,470 z is the difference between x and y, at negative z, simply 72 00:04:27,470 --> 00:04:29,850 the difference between y and x. 73 00:04:29,850 --> 00:04:33,710 Now, x and y are independent and identically distributed. 74 00:04:33,710 --> 00:04:36,270 And therefore, x minus y has the same 75 00:04:36,270 --> 00:04:38,760 distribution as y minus x. 76 00:04:38,760 --> 00:04:42,350 So that tells us z and negative z have the same 77 00:04:42,350 --> 00:04:43,300 distribution. 78 00:04:43,300 --> 00:04:46,650 What that means is, is the distribution of z now must be 79 00:04:46,650 --> 00:04:48,610 symmetric around 0. 80 00:04:48,610 --> 00:04:53,530 In other words, if we know that the shape of f of z below 81 00:04:53,530 --> 00:04:57,910 0 is something like that, then the shape of it above 0 must 82 00:04:57,910 --> 00:04:59,190 be symmetric. 83 00:04:59,190 --> 00:05:01,570 So here's the origin. 84 00:05:01,570 --> 00:05:06,750 For example, if we were to evaluate f of z at 1, well, 85 00:05:06,750 --> 00:05:12,140 this will be equal to the value of f of z at negative 1. 86 00:05:12,140 --> 00:05:16,880 So this will equal to f of z at negative 1. 87 00:05:16,880 --> 00:05:20,490 Well, with this information in mind, we know that in general, 88 00:05:20,490 --> 00:05:26,310 f of z little z is equal to f of z negative little z. 89 00:05:26,310 --> 00:05:30,750 So what this allows us to do is to get all the information 90 00:05:30,750 --> 00:05:35,290 for z less than 0 and generalize it to the case 91 00:05:35,290 --> 00:05:38,250 where z is greater or equal to 0. 92 00:05:38,250 --> 00:05:42,150 In particular, by the symmetry here, we can write, for the 93 00:05:42,150 --> 00:05:46,960 case z greater or equal to 0, as lambda over 2 e to the 94 00:05:46,960 --> 00:05:49,410 negative lambda z. 95 00:05:49,410 --> 00:05:52,350 So the negative sign comes from the fact that the 96 00:05:52,350 --> 00:05:55,650 distribution of f of z is symmetric around 0. 97 00:05:55,650 --> 00:05:58,080 And simply, we can go back to the expression 98 00:05:58,080 --> 00:06:00,370 here to get the value. 99 00:06:00,370 --> 00:06:04,220 And all in all, this implies that f of z little z is equal 100 00:06:04,220 --> 00:06:07,780 to lambda over 2 e to the negative lambda 101 00:06:07,780 --> 00:06:09,820 absolute value of z. 102 00:06:09,820 --> 00:06:11,070 This completes our problem. 103 00:06:11,070 --> 00:06:12,150