1 00:00:00,000 --> 00:00:01,770 2 00:00:01,770 --> 00:00:03,900 In this problem, we're going to look at the probability 3 00:00:03,900 --> 00:00:07,090 that when you take a stick and break it into three pieces 4 00:00:07,090 --> 00:00:10,300 randomly that these three pieces can actually be used to 5 00:00:10,300 --> 00:00:12,560 form a triangle. 6 00:00:12,560 --> 00:00:16,300 All right, so we start out with a stick of 7 00:00:16,300 --> 00:00:18,010 unit length, so-- 8 00:00:18,010 --> 00:00:19,680 length 1. 9 00:00:19,680 --> 00:00:25,580 And we'll choose a point along the stick to break. 10 00:00:25,580 --> 00:00:28,540 And we'll choose that point uniformly at random. 11 00:00:28,540 --> 00:00:31,565 So let's say that we chose it here, that was the point where 12 00:00:31,565 --> 00:00:33,380 we'll break it. 13 00:00:33,380 --> 00:00:37,180 And then independently of this first choice we'll again 14 00:00:37,180 --> 00:00:39,970 choose a second point to break it. 15 00:00:39,970 --> 00:00:43,000 Again, uniformly at random along the entire stick. 16 00:00:43,000 --> 00:00:47,780 So let's say the second point we chose was here. 17 00:00:47,780 --> 00:00:50,560 So what we have now is, we'll break it here, here, and so 18 00:00:50,560 --> 00:00:51,610 we'll have three pieces-- 19 00:00:51,610 --> 00:00:54,310 the first one, the left one and the right one. 20 00:00:54,310 --> 00:00:56,730 And we want to know, what's the probability that when you 21 00:00:56,730 --> 00:01:00,810 take these three pieces you could form a triangle? 22 00:01:00,810 --> 00:01:02,110 So the first thing we should ask ourselves 23 00:01:02,110 --> 00:01:04,200 is, what do you need-- 24 00:01:04,200 --> 00:01:07,050 what conditions must be satisfied in order to actually 25 00:01:07,050 --> 00:01:09,790 be able to form a triangle with three pieces? 26 00:01:09,790 --> 00:01:13,070 So you could think about, what would stop you from being able 27 00:01:13,070 --> 00:01:14,110 to do that? 28 00:01:14,110 --> 00:01:18,130 Well, one possibility is that you have pieces 29 00:01:18,130 --> 00:01:19,380 that look like this. 30 00:01:19,380 --> 00:01:22,990 31 00:01:22,990 --> 00:01:27,910 So in that case you would try to form something 32 00:01:27,910 --> 00:01:32,540 that looks like this. 33 00:01:32,540 --> 00:01:35,800 But you can't get a triangle because these two pieces are 34 00:01:35,800 --> 00:01:37,990 too short and they can't touch each other. 35 00:01:37,990 --> 00:01:42,220 So actually the condition that must be satisfied is that when 36 00:01:42,220 --> 00:01:48,490 you take any two of the three pieces, their combined length 37 00:01:48,490 --> 00:01:50,430 has to be greater than the length of the 38 00:01:50,430 --> 00:01:52,200 remaining third piece. 39 00:01:52,200 --> 00:01:53,900 And that has to be true for any two pieces. 40 00:01:53,900 --> 00:01:56,500 41 00:01:56,500 --> 00:02:01,590 And really that's just so that any two pieces, they can touch 42 00:02:01,590 --> 00:02:04,970 and still form a triangle. 43 00:02:04,970 --> 00:02:08,870 So let's try to add some probability to this. 44 00:02:08,870 --> 00:02:13,440 So we have a unit length stick. 45 00:02:13,440 --> 00:02:17,510 So let's actually give a coordinate system. 46 00:02:17,510 --> 00:02:20,430 The stick goes from 0 to 1. 47 00:02:20,430 --> 00:02:23,120 And let's say that we break it at these two points. 48 00:02:23,120 --> 00:02:30,790 49 00:02:30,790 --> 00:02:38,090 So the first point where we choose, we'll call that x. 50 00:02:38,090 --> 00:02:40,990 So that's the first point that we choose to break it. 51 00:02:40,990 --> 00:02:44,670 And then the second point we choose, we'll call that y. 52 00:02:44,670 --> 00:02:50,700 Now note that I've drawn it so that x is to the left of y. 53 00:02:50,700 --> 00:02:53,760 But it could actually be the case that the first point I 54 00:02:53,760 --> 00:02:55,860 chose is here and the second point that I 55 00:02:55,860 --> 00:02:57,680 chose is to the left. 56 00:02:57,680 --> 00:03:05,840 But for now, let's first assume that 57 00:03:05,840 --> 00:03:07,640 this scenario holds. 58 00:03:07,640 --> 00:03:12,850 That the first point is to the left of the second point. 59 00:03:12,850 --> 00:03:18,930 So under this assumption, we can see that-- 60 00:03:18,930 --> 00:03:21,370 from the definition of these random variables-- we can 61 00:03:21,370 --> 00:03:24,640 actually see that the lengths are given 62 00:03:24,640 --> 00:03:26,560 by these three lengths. 63 00:03:26,560 --> 00:03:29,620 64 00:03:29,620 --> 00:03:36,210 So the lengths are x, the left most piece has length x. 65 00:03:36,210 --> 00:03:41,840 The second, middle piece has length y minus x. 66 00:03:41,840 --> 00:03:44,618 And the last piece has length 1 minus y. 67 00:03:44,618 --> 00:03:48,420 68 00:03:48,420 --> 00:03:54,270 And now let's recall our three conditions. 69 00:03:54,270 --> 00:03:59,420 So the conditions were that any two of these, the sum of 70 00:03:59,420 --> 00:04:01,070 any two lengths, has to be at least-- 71 00:04:01,070 --> 00:04:04,840 has to be greater than the length of the third piece. 72 00:04:04,840 --> 00:04:07,690 So let's do these together. 73 00:04:07,690 --> 00:04:15,700 So x plus y minus x has to be greater than 1 minus y. 74 00:04:15,700 --> 00:04:21,329 So with these two pieces you can cover this third piece. 75 00:04:21,329 --> 00:04:28,450 We also need that with the first and third pieces, we can 76 00:04:28,450 --> 00:04:31,910 cover the middle piece. 77 00:04:31,910 --> 00:04:41,460 And we need with the second and third pieces, we can cover 78 00:04:41,460 --> 00:04:43,870 the first piece. 79 00:04:43,870 --> 00:04:46,140 Now this looks kind of messy, but in fact we can actually 80 00:04:46,140 --> 00:04:48,260 simplify this. 81 00:04:48,260 --> 00:04:50,500 So this actually simplifies. 82 00:04:50,500 --> 00:04:52,790 x minus x, that disappears. 83 00:04:52,790 --> 00:04:57,550 And so this actually simplifies to 2y has 84 00:04:57,550 --> 00:04:58,530 to be at least 1. 85 00:04:58,530 --> 00:05:02,645 Or even more simply, y has to be greater than 1/2. 86 00:05:02,645 --> 00:05:05,500 87 00:05:05,500 --> 00:05:07,510 What about this one? 88 00:05:07,510 --> 00:05:11,190 This one, we can rearrange things again. 89 00:05:11,190 --> 00:05:12,460 x we can move over. 90 00:05:12,460 --> 00:05:13,870 y we can move over here. 91 00:05:13,870 --> 00:05:18,680 And we get that 2x plus 1 has to be greater than 2y. 92 00:05:18,680 --> 00:05:26,465 Or put in other words, y is less than x plus 1/2. 93 00:05:26,465 --> 00:05:29,140 94 00:05:29,140 --> 00:05:32,420 And for the last one, again we can simplify. 95 00:05:32,420 --> 00:05:34,020 The y's cancel each other out. 96 00:05:34,020 --> 00:05:36,870 And we're left with 2x is less than 1. 97 00:05:36,870 --> 00:05:39,590 98 00:05:39,590 --> 00:05:41,980 Or x is less than 1/2. 99 00:05:41,980 --> 00:05:44,900 100 00:05:44,900 --> 00:05:48,430 So these are our three conditions 101 00:05:48,430 --> 00:05:50,400 that need to be satisfied. 102 00:05:50,400 --> 00:05:52,640 So now we just have to figure out what's the probability 103 00:05:52,640 --> 00:05:55,180 that this is actually satisfied? 104 00:05:55,180 --> 00:06:06,030 Now let's go back to original definition and see what are 105 00:06:06,030 --> 00:06:07,740 the actual distributions for these random 106 00:06:07,740 --> 00:06:08,660 variables, x and y. 107 00:06:08,660 --> 00:06:12,370 Remember, we defined them to be x is the location of the 108 00:06:12,370 --> 00:06:16,390 first break and y is the location of the second break. 109 00:06:16,390 --> 00:06:20,000 And as we said in the problem, these are chosen uniformly at 110 00:06:20,000 --> 00:06:23,010 random and they're independent. 111 00:06:23,010 --> 00:06:28,740 And so we can actually draw out their joint PDF. 112 00:06:28,740 --> 00:06:34,740 So x and y, you can cover any point in the square. 113 00:06:34,740 --> 00:06:42,200 And moreover, it's actually uniform within the square. 114 00:06:42,200 --> 00:06:46,200 Because each one is chosen uniformly at random and 115 00:06:46,200 --> 00:06:47,830 they're independent. 116 00:06:47,830 --> 00:06:51,240 So it's anywhere in here. 117 00:06:51,240 --> 00:06:53,770 And so what do we need to do? 118 00:06:53,770 --> 00:06:56,540 We just need to identify, what is the probability that these 119 00:06:56,540 --> 00:06:57,790 three conditions hold? 120 00:06:57,790 --> 00:07:03,800 121 00:07:03,800 --> 00:07:08,600 Rewrite this, line these up. 122 00:07:08,600 --> 00:07:13,980 So these are our three conditions that we need. 123 00:07:13,980 --> 00:07:16,250 And now remember, we're still working under the assumption 124 00:07:16,250 --> 00:07:19,900 that the first point that we chose is actually to the left 125 00:07:19,900 --> 00:07:21,630 of the second point. 126 00:07:21,630 --> 00:07:24,440 So what does that mean? 127 00:07:24,440 --> 00:07:27,920 That means that we are actually in this top 128 00:07:27,920 --> 00:07:30,100 triangle, top half-- 129 00:07:30,100 --> 00:07:33,000 x is less than y. 130 00:07:33,000 --> 00:07:35,540 All right, so what do we need? 131 00:07:35,540 --> 00:07:38,910 We need y to be at least 1/2, so here's 1/2. 132 00:07:38,910 --> 00:07:41,990 So we need y to be above this line. 133 00:07:41,990 --> 00:07:43,780 We need x to be less than 1/2. 134 00:07:43,780 --> 00:07:47,270 So we need x to be to the left of here. 135 00:07:47,270 --> 00:07:51,640 So now so far we're stuck in this upper square. 136 00:07:51,640 --> 00:07:55,070 And the last thing we need is y to be less than x plus 1/2. 137 00:07:55,070 --> 00:07:56,420 What is y? 138 00:07:56,420 --> 00:08:02,310 The line y equals x and a 1/2, x plus 1/2, is this one. 139 00:08:02,310 --> 00:08:06,880 So y has to be less than that, so it would have to be in this 140 00:08:06,880 --> 00:08:08,360 triangle here. 141 00:08:08,360 --> 00:08:11,670 So these three conditions tell us that in order for us to 142 00:08:11,670 --> 00:08:17,330 have a triangle we need to for x and y to fall jointly in 143 00:08:17,330 --> 00:08:19,710 this small triangle here. 144 00:08:19,710 --> 00:08:24,190 Now because the joint distribution is uniform, we 145 00:08:24,190 --> 00:08:26,450 know that the density is just 1, right? 146 00:08:26,450 --> 00:08:30,150 Because the area here is just 1. 147 00:08:30,150 --> 00:08:32,600 So the height is just 1 as well. 148 00:08:32,600 --> 00:08:36,809 And so the density, or the probability of falling within 149 00:08:36,809 --> 00:08:41,020 this small triangle, is just going to be also the area of 150 00:08:41,020 --> 00:08:41,840 this triangle. 151 00:08:41,840 --> 00:08:44,900 And what is the area of this triangle? 152 00:08:44,900 --> 00:08:48,090 Well, you can fit 8 of these triangles in here, or you 153 00:08:48,090 --> 00:08:50,580 could think of it as 1/2 times 1/2 times 1/2. 154 00:08:50,580 --> 00:08:54,450 So the area is just 1/8. 155 00:08:54,450 --> 00:09:00,565 So assuming that x is less than y, then the probability 156 00:09:00,565 --> 00:09:04,900 of forming a triangle is 1/8. 157 00:09:04,900 --> 00:09:06,910 Now, that's only half this story, though. 158 00:09:06,910 --> 00:09:10,580 Because it's possible that when you chose these two break 159 00:09:10,580 --> 00:09:16,930 points that we actually had the opposite result. 160 00:09:16,930 --> 00:09:21,900 That x, the point that you chose first, falls to the 161 00:09:21,900 --> 00:09:24,630 right of the point that you chose second. 162 00:09:24,630 --> 00:09:28,120 In which case everything kind of flips. 163 00:09:28,120 --> 00:09:34,040 Now we assume that y is less than x, which means that now 164 00:09:34,040 --> 00:09:38,760 we're in this lower triangle in the square. 165 00:09:38,760 --> 00:09:41,140 Now we can go through this whole exercise again. 166 00:09:41,140 --> 00:09:44,560 But really, what we can see is that all we've really done is 167 00:09:44,560 --> 00:09:47,770 just swap the names. 168 00:09:47,770 --> 00:09:53,520 Instead of having x and y we now call x-- we call x y and 169 00:09:53,520 --> 00:09:55,330 we call y x. 170 00:09:55,330 --> 00:09:59,930 And so if we just swap names, we can see that-- 171 00:09:59,930 --> 00:10:01,870 let's just fast forward through all these steps and 172 00:10:01,870 --> 00:10:04,590 see that we could just swap names here, too, as well, in 173 00:10:04,590 --> 00:10:05,210 the three conditions. 174 00:10:05,210 --> 00:10:09,260 So instead of needing y to be greater than 1/2, we just need 175 00:10:09,260 --> 00:10:11,990 x to be greater than 1/2. 176 00:10:11,990 --> 00:10:15,620 Instead of having x less than 1/2, we need y less than 1/2. 177 00:10:15,620 --> 00:10:18,220 We also swap this. 178 00:10:18,220 --> 00:10:25,300 So we need x to be less than y plus 1/2 or y is greater than 179 00:10:25,300 --> 00:10:28,430 x minus 1/2. 180 00:10:28,430 --> 00:10:33,130 All right, now let's figure out what this corresponds to. 181 00:10:33,130 --> 00:10:36,660 We need x to be greater than 1/2, so it needs to be to the 182 00:10:36,660 --> 00:10:37,850 right of here. 183 00:10:37,850 --> 00:10:40,530 We need y to be less than 1/2, so we need it to 184 00:10:40,530 --> 00:10:42,710 be below this line. 185 00:10:42,710 --> 00:10:46,800 And we need y to be greater than x minus 1/2. 186 00:10:46,800 --> 00:10:50,570 What is the line y equals x minus 1/2? 187 00:10:50,570 --> 00:10:53,710 That is this line here. 188 00:10:53,710 --> 00:10:56,330 And we need y to be greater than that, so it needs to be 189 00:10:56,330 --> 00:10:57,510 above this line. 190 00:10:57,510 --> 00:11:02,930 And so we get that this is the triangle, the small triangle 191 00:11:02,930 --> 00:11:05,230 that we need in this case. 192 00:11:05,230 --> 00:11:08,960 And notice that it's exactly the same area 193 00:11:08,960 --> 00:11:10,480 as this one, right? 194 00:11:10,480 --> 00:11:13,320 And so we get another contribution of 1/8 here. 195 00:11:13,320 --> 00:11:19,490 So the final answer is 1/8 plus 1/8 is 1/4. 196 00:11:19,490 --> 00:11:23,430 So the probability of forming a triangle using this three 197 00:11:23,430 --> 00:11:26,270 pieces is exactly 1/4. 198 00:11:26,270 --> 00:11:31,250 And so notice that we've done is, you've set things up very 199 00:11:31,250 --> 00:11:33,660 methodically in the beginning by assigning 200 00:11:33,660 --> 00:11:34,550 these random variables. 201 00:11:34,550 --> 00:11:37,540 And you consider different cases. 202 00:11:37,540 --> 00:11:41,020 Because you don't actually know the order in which x and 203 00:11:41,020 --> 00:11:44,630 y might fall, let's just assume that one particular 204 00:11:44,630 --> 00:11:46,190 order and work from there. 205 00:11:46,190 --> 00:11:48,550 And then do the other case, as well. 206 00:11:48,550 --> 00:11:52,770 And it just so happened that because of the symmetry of the 207 00:11:52,770 --> 00:11:55,570 problem the second case was actually very simple. 208 00:11:55,570 --> 00:11:58,820 We could just see that it is actually symmetric and so we 209 00:11:58,820 --> 00:12:01,160 get the same answer. 210 00:12:01,160 --> 00:12:03,930 So this is kind of an interesting problem because 211 00:12:03,930 --> 00:12:06,550 it's actually a practical application of something that 212 00:12:06,550 --> 00:12:07,540 you might actually do. 213 00:12:07,540 --> 00:12:11,460 And you can see that just by applying these probability 214 00:12:11,460 --> 00:12:13,540 concepts you can actually--