1 00:00:00,000 --> 00:00:00,890 2 00:00:00,890 --> 00:00:03,020 In this problem, we'll be looking at an ambulance that 3 00:00:03,020 --> 00:00:06,790 is traveling back and forth in interval of size l. 4 00:00:06,790 --> 00:00:09,030 Say from 0 to l. 5 00:00:09,030 --> 00:00:11,900 At some point in time, there's an accident occurring, let's 6 00:00:11,900 --> 00:00:14,070 say at location x. 7 00:00:14,070 --> 00:00:16,940 And we'll assume the accident occurs in a random location so 8 00:00:16,940 --> 00:00:21,540 that x is uniformly distributed between 0 and l. 9 00:00:21,540 --> 00:00:24,280 Now, at this point in time, let's say the ambulance turns 10 00:00:24,280 --> 00:00:26,640 out to be at location y. 11 00:00:26,640 --> 00:00:29,860 Again, we'll assume that y is a uniform random variable 12 00:00:29,860 --> 00:00:34,110 between 0 and l, and also that x and y are independently 13 00:00:34,110 --> 00:00:35,570 distributed. 14 00:00:35,570 --> 00:00:39,100 The question we're interested in answering is how long it 15 00:00:39,100 --> 00:00:42,760 would take an ambulance to respond to travel from point y 16 00:00:42,760 --> 00:00:44,500 to point x. 17 00:00:44,500 --> 00:00:48,240 Let's call this time T. And in particular, we want to know 18 00:00:48,240 --> 00:00:52,170 everything about distribution of T. For example, what is the 19 00:00:52,170 --> 00:00:56,330 CDF of T given by the probability of big T, less 20 00:00:56,330 --> 00:01:00,710 than or equal to little t, or the PDF, which is done by 21 00:01:00,710 --> 00:01:03,680 differentiating the CDF once we have it. 22 00:01:03,680 --> 00:01:08,850 Now, to start, we'll express T you as a function of X and Y. 23 00:01:08,850 --> 00:01:10,450 Since we know that the ambulance 24 00:01:10,450 --> 00:01:13,301 travels at a speed V-- 25 00:01:13,301 --> 00:01:16,990 V meters or V units of distance per second-- 26 00:01:16,990 --> 00:01:21,420 then we can write that big T is simply equal to Y minus X, 27 00:01:21,420 --> 00:01:25,160 absolute value the distance between X and Y, divided by 28 00:01:25,160 --> 00:01:27,620 the speed at which the ambulance is traveling at, V. 29 00:01:27,620 --> 00:01:32,910 So now if we look at the probability of T less than or 30 00:01:32,910 --> 00:01:36,950 equal to little t, this is then equal to the probability 31 00:01:36,950 --> 00:01:40,720 that Y minus X divided by V less than or 32 00:01:40,720 --> 00:01:43,300 equal to little t. 33 00:01:43,300 --> 00:01:46,620 We now take off the absolute value by writing the 34 00:01:46,620 --> 00:01:52,690 expression as negative vt less equal to Y minus X less equal 35 00:01:52,690 --> 00:01:55,060 to positive vt. 36 00:01:55,060 --> 00:01:59,350 Here we multiply v on the other side of t, and then took 37 00:01:59,350 --> 00:02:02,210 out the absolute value sign. 38 00:02:02,210 --> 00:02:06,280 As a final step, we'll also move X to the other side of 39 00:02:06,280 --> 00:02:12,080 inequalities by writing this as X minus vt less equal to y 40 00:02:12,080 --> 00:02:16,560 less equal to x plus vt. 41 00:02:16,560 --> 00:02:20,960 To compute this quantity, we'll define a set A as a set 42 00:02:20,960 --> 00:02:24,870 of all points that satisfies this condition right here. 43 00:02:24,870 --> 00:02:30,890 In particular, it's a pair of all X and Y such that X minus 44 00:02:30,890 --> 00:02:37,580 vt less equal to little y less equal to X plus vt, and also 45 00:02:37,580 --> 00:02:45,570 that X is within 0 and l, and so is Y. 46 00:02:45,570 --> 00:02:48,420 So the set A will be the set of values we'll 47 00:02:48,420 --> 00:02:50,040 be integrating over. 48 00:02:50,040 --> 00:02:53,620 Now that we have A, we can express the above probability 49 00:02:53,620 --> 00:03:00,870 as the integral of all X and Y, this pair within the set A, 50 00:03:00,870 --> 00:03:06,840 integrating the PDF of f of X, Y, little x, little y. 51 00:03:06,840 --> 00:03:12,100 52 00:03:12,100 --> 00:03:15,130 Let's now evaluate this expression right here in a 53 00:03:15,130 --> 00:03:16,460 graphical way. 54 00:03:16,460 --> 00:03:19,710 On the right, we're plotting out what we just illustrated 55 00:03:19,710 --> 00:03:23,860 here, where the shaded region is precisely the set A. As we 56 00:03:23,860 --> 00:03:27,930 can see, this is a set of values of X and Y where Y is 57 00:03:27,930 --> 00:03:33,150 sandwiched between two lines, the upper one being X plus vt 58 00:03:33,150 --> 00:03:39,190 right here, and the lower line being X minus vt, right here. 59 00:03:39,190 --> 00:03:45,310 So these are the values that correspond to the set A. 60 00:03:45,310 --> 00:03:48,250 Now that we have A, let's look f of x, y. 61 00:03:48,250 --> 00:03:51,840 We know that both x and y are uniform random variables 62 00:03:51,840 --> 00:03:55,700 between 0 and l, and therefore, since they're 63 00:03:55,700 --> 00:04:00,390 independent, the probability density of x and y being at 64 00:04:00,390 --> 00:04:06,000 any point between 0 and l is precisely 1 over l squared, 65 00:04:06,000 --> 00:04:11,810 where l squared is the size of this square box right here. 66 00:04:11,810 --> 00:04:16,730 So given this picture, all we need to do is to multiply by 1 67 00:04:16,730 --> 00:04:25,940 over l squared the area of the region A. And depending on the 68 00:04:25,940 --> 00:04:27,640 value of T, we'll get different 69 00:04:27,640 --> 00:04:30,010 answers as right here. 70 00:04:30,010 --> 00:04:33,440 If T is less than 0, obviously, the area of A 71 00:04:33,440 --> 00:04:35,880 diminishes to nothing, so we get 0. 72 00:04:35,880 --> 00:04:40,180 If T is greater than l over V, the area of A fills up the 73 00:04:40,180 --> 00:04:42,830 entire square, and we get 1. 74 00:04:42,830 --> 00:04:46,570 Now, if T is somewhere in between 0 and l over v, we 75 00:04:46,570 --> 00:04:51,540 will have 1 over l squared, multiply by the area looking 76 00:04:51,540 --> 00:04:55,440 like something like that right here-- the shaded region. 77 00:04:55,440 --> 00:04:58,020 Now, if you wonder how we arrive at exactly this 78 00:04:58,020 --> 00:05:01,170 expression right here, here is a simple way to calculate it. 79 00:05:01,170 --> 00:05:05,820 What we want is 1 over l squared times the area A. Now, 80 00:05:05,820 --> 00:05:12,320 area A can be viewed as the entire square, l squared, 81 00:05:12,320 --> 00:05:16,810 minus whatever's not in area A, which is these two 82 00:05:16,810 --> 00:05:19,990 triangles right here. 83 00:05:19,990 --> 00:05:27,090 Now, each triangle has area 1/2, l minus vt squared. 84 00:05:27,090 --> 00:05:30,830 This multiply 2, and this, after some algebra, will give 85 00:05:30,830 --> 00:05:33,270 the answer right here. 86 00:05:33,270 --> 00:05:35,660 At this point, we have obtained the probability of 87 00:05:35,660 --> 00:05:37,470 big T less equal to little t. 88 00:05:37,470 --> 00:05:43,425 Namely, we have gotten the CDF for T. And as a final step, we 89 00:05:43,425 --> 00:05:46,430 can also compute the probability density function 90 00:05:46,430 --> 00:05:50,720 for T. We'll call it little f of t. 91 00:05:50,720 --> 00:05:54,580 And we do so by simply differentiating the CDF in 92 00:05:54,580 --> 00:05:57,270 different regions of T. 93 00:05:57,270 --> 00:06:01,670 To begin, we'll look at t between 0 and l over v right 94 00:06:01,670 --> 00:06:06,210 here at differentiating the expression right here with 95 00:06:06,210 --> 00:06:07,410 respect to t. 96 00:06:07,410 --> 00:06:12,660 And doing so will give us 2v over l minus 2v 97 00:06:12,660 --> 00:06:16,350 squared t over L squared. 98 00:06:16,350 --> 00:06:22,350 And this applies to t greater or equal to 0, less than l/v. 99 00:06:22,350 --> 00:06:26,680 Now, any other region, either t less than 0 or t greater 100 00:06:26,680 --> 00:06:32,860 than l/v, we have a constant for the CDF, and hence its 101 00:06:32,860 --> 00:06:34,770 derivative will be 0. 102 00:06:34,770 --> 00:06:37,246 So this is for any other t. 103 00:06:37,246 --> 00:06:39,430 We call it otherwise. 104 00:06:39,430 --> 00:06:42,620 Now, this completely characterized the PDF of big 105 00:06:42,620 --> 00:06:45,270 T, and hence, we've also finished a problem. 106 00:06:45,270 --> 00:06:46,520