1 00:00:00,500 --> 00:00:02,370 We often think of a Bernoulli process 2 00:00:02,370 --> 00:00:04,700 as a stream of arriving traffic. 3 00:00:04,700 --> 00:00:07,410 What happens if we merge two streams? 4 00:00:07,410 --> 00:00:11,300 For example, consider a server that receives traffic 5 00:00:11,300 --> 00:00:14,760 from two independent sources. 6 00:00:14,760 --> 00:00:17,270 How do we describe the total traffic 7 00:00:17,270 --> 00:00:19,380 that arrives to this server? 8 00:00:19,380 --> 00:00:21,420 Here's a precise model. 9 00:00:21,420 --> 00:00:25,420 We have two streams that correspond 10 00:00:25,420 --> 00:00:29,880 to Bernoulli processes with some parameters each, p and q, 11 00:00:29,880 --> 00:00:31,060 respectively. 12 00:00:31,060 --> 00:00:34,440 And each one of these processes receives arrivals 13 00:00:34,440 --> 00:00:38,140 at certain times that we indicate by crosses; 14 00:00:38,140 --> 00:00:40,220 and similarly, for the second process. 15 00:00:46,780 --> 00:00:50,330 We assume that these two processes are independent. 16 00:00:50,330 --> 00:00:53,150 And what we mean by this is that any collection 17 00:00:53,150 --> 00:00:56,010 of random variables associated with the first process 18 00:00:56,010 --> 00:00:59,370 will be independent from any collection of random variables 19 00:00:59,370 --> 00:01:02,350 associated with the second process. 20 00:01:02,350 --> 00:01:05,870 We now merge the two processes as follows. 21 00:01:05,870 --> 00:01:11,260 Whenever there's an arrival in any of the original processes, 22 00:01:11,260 --> 00:01:15,260 we record an arrival in the merged process, 23 00:01:15,260 --> 00:01:18,390 as in this picture. 24 00:01:18,390 --> 00:01:22,150 Notice that we do not to make a distinction between those slots 25 00:01:22,150 --> 00:01:24,380 at which there was an arrival in only 26 00:01:24,380 --> 00:01:27,690 one of the original [processes] versus those slots 27 00:01:27,690 --> 00:01:31,900 in which there was an arrival in both of the original processes. 28 00:01:31,900 --> 00:01:34,000 In both cases, we just say that there 29 00:01:34,000 --> 00:01:36,560 was an arrival in the merged process, 30 00:01:36,560 --> 00:01:39,410 and so collisions-- arrivals in both 31 00:01:39,410 --> 00:01:41,780 of the original processes-- are counted 32 00:01:41,780 --> 00:01:46,500 as only one arrival in the merged process. 33 00:01:46,500 --> 00:01:49,380 Now, what can we say about the merged process? 34 00:01:49,380 --> 00:01:51,670 We will argue that it is a Bernoulli 35 00:01:51,670 --> 00:01:55,690 process with a certain parameter that we will compute. 36 00:01:55,690 --> 00:01:58,460 To check the Bernoulli property for the merged process, 37 00:01:58,460 --> 00:02:00,680 the first thing we need to ensure 38 00:02:00,680 --> 00:02:05,100 is the independence assumption, independence across slots. 39 00:02:05,100 --> 00:02:08,300 Let us look at two typical slots. 40 00:02:08,300 --> 00:02:11,860 And to do this, it helps to define some notation 41 00:02:11,860 --> 00:02:16,050 that Xt and Yt be the original processes, 42 00:02:16,050 --> 00:02:19,480 and let Zt be the merged process. 43 00:02:19,480 --> 00:02:24,890 The random variable Zt is determined in some way 44 00:02:24,890 --> 00:02:27,450 by the random variables Xt and Yt. 45 00:02:27,450 --> 00:02:30,610 If I tell you there was an arrival in the first 46 00:02:30,610 --> 00:02:32,370 and to the second process, you can 47 00:02:32,370 --> 00:02:36,230 tell whether there was an arrival in the merged process. 48 00:02:36,230 --> 00:02:39,360 And similarly, the random variable Zt plus 1 49 00:02:39,360 --> 00:02:47,400 is determined in some way from Xt plus 1 and Yt plus 1. 50 00:02:47,400 --> 00:02:50,290 What this is saying is that whether we 51 00:02:50,290 --> 00:02:53,850 have an arrival at this slot is determined 52 00:02:53,850 --> 00:02:56,600 by what happens in these two slots. 53 00:02:56,600 --> 00:02:58,930 And whether we have an arrival in this slot 54 00:02:58,930 --> 00:03:03,310 is determined by whatever happens in these two slots. 55 00:03:03,310 --> 00:03:07,320 Now, we have assumed that the two processes are independent. 56 00:03:07,320 --> 00:03:09,040 So these two random variables are 57 00:03:09,040 --> 00:03:12,130 independent from those two random variables. 58 00:03:12,130 --> 00:03:15,200 And furthermore, across time, this random variable 59 00:03:15,200 --> 00:03:17,270 will be independent from that random variable. 60 00:03:17,270 --> 00:03:19,280 And this random variable will be independent 61 00:03:19,280 --> 00:03:21,060 from that random variable. 62 00:03:21,060 --> 00:03:27,450 So these four random variables are independent of each other. 63 00:03:27,450 --> 00:03:31,750 Because of this, we have Zt, a function 64 00:03:31,750 --> 00:03:35,810 of two random variables that are independent from the two 65 00:03:35,810 --> 00:03:42,220 random variables that determine Zt plus 1. 66 00:03:42,220 --> 00:03:47,940 And for this reason, Zt and Zt plus 1 will be independent. 67 00:03:47,940 --> 00:03:50,950 This proves a pairwise independence property 68 00:03:50,950 --> 00:03:54,010 for the merged process, but we can extend this argument 69 00:03:54,010 --> 00:03:59,660 to argue that the collection of random variables, Z1 up to Zt, 70 00:03:59,660 --> 00:04:03,630 is a collection of independent random variables. 71 00:04:03,630 --> 00:04:06,030 So we have the independence property. 72 00:04:06,030 --> 00:04:10,110 Now, let us calculate the probability of an arrival 73 00:04:10,110 --> 00:04:13,340 during a typical slot. 74 00:04:13,340 --> 00:04:16,120 During a typical time slot, there 75 00:04:16,120 --> 00:04:19,970 are four possibilities for what may occur. 76 00:04:19,970 --> 00:04:22,820 And these possibilities have to do with 77 00:04:22,820 --> 00:04:26,440 whether in the X process, we have an arrival 78 00:04:26,440 --> 00:04:29,680 or not; and in the Y process, whether we have an arrival 79 00:04:29,680 --> 00:04:32,250 or not. 80 00:04:32,250 --> 00:04:35,280 The probability that we have an arrival in both processes, 81 00:04:35,280 --> 00:04:38,070 because of independence, is the product of the probability 82 00:04:38,070 --> 00:04:40,740 that we have an arrival in the first process 83 00:04:40,740 --> 00:04:42,280 with the probability that we have 84 00:04:42,280 --> 00:04:44,780 an arrival in the second process. 85 00:04:44,780 --> 00:04:47,310 Similarly, there's a probability p 86 00:04:47,310 --> 00:04:48,830 of an arrival in the first process 87 00:04:48,830 --> 00:04:51,290 and no arrival in the second. 88 00:04:51,290 --> 00:04:53,875 There's a probability 1 minus p of no arrival 89 00:04:53,875 --> 00:04:55,750 in the first process and [a probability q of] 90 00:04:55,750 --> 00:04:58,010 an arrival in the second process. 91 00:04:58,010 --> 00:05:01,200 And finally, there is probability 1 minus p times 1 92 00:05:01,200 --> 00:05:07,830 minus q of no arrival in either of the two processes. 93 00:05:07,830 --> 00:05:12,110 The probability that we have an arrival in the merged process 94 00:05:12,110 --> 00:05:17,070 is the probability of this green event. 95 00:05:17,070 --> 00:05:20,230 These are the cases in which an arrival gets 96 00:05:20,230 --> 00:05:22,960 recorded in the merged process. 97 00:05:22,960 --> 00:05:25,840 So the probability of an arrival in the merged process 98 00:05:25,840 --> 00:05:28,040 is the sum of those three probabilities. 99 00:05:28,040 --> 00:05:32,770 Or another way to calculate it is 1 minus this probability 100 00:05:32,770 --> 00:05:37,990 here; namely, 1 minus 1 minus p times 1 minus q. 101 00:05:37,990 --> 00:05:40,190 And after you expand this product 102 00:05:40,190 --> 00:05:42,790 and do some cancellations, you end up 103 00:05:42,790 --> 00:05:46,500 with this expression, which is the probability of an arrival 104 00:05:46,500 --> 00:05:49,920 during a slot in the merged process. 105 00:05:49,920 --> 00:05:53,350 Of course, this probability is constant across time. 106 00:05:53,350 --> 00:05:56,280 And this, together with the independence property, 107 00:05:56,280 --> 00:05:59,159 establishes that the merged process is actually 108 00:05:59,159 --> 00:06:01,440 a Bernoulli process. 109 00:06:01,440 --> 00:06:05,200 Now, let us end by answering one more question. 110 00:06:05,200 --> 00:06:08,260 If I tell you that at a certain time slot, 111 00:06:08,260 --> 00:06:12,260 there was at least one arrival in the two processes, which 112 00:06:12,260 --> 00:06:15,900 means that there was an arrival in the merged process, 113 00:06:15,900 --> 00:06:17,680 what is the probability that there 114 00:06:17,680 --> 00:06:22,130 was an arrival in the first process? 115 00:06:22,130 --> 00:06:25,610 Now, the event that there was an arrival in the first process 116 00:06:25,610 --> 00:06:27,700 is this event here. 117 00:06:27,700 --> 00:06:30,560 So we're trying to calculate the conditional probability 118 00:06:30,560 --> 00:06:35,040 of the blue event given that the green event has occurred. 119 00:06:35,040 --> 00:06:38,130 We use the definition of conditional probabilities. 120 00:06:38,130 --> 00:06:41,750 A conditional probability is equal to the probability 121 00:06:41,750 --> 00:06:45,320 that both events happen, which in this case 122 00:06:45,320 --> 00:06:48,240 is the intersection of the blue and the green event, 123 00:06:48,240 --> 00:06:50,260 which coincides with the blue event. 124 00:06:50,260 --> 00:06:52,159 And the probability of the blue event 125 00:06:52,159 --> 00:06:55,350 is the sum of these two numbers, is equal to p. 126 00:06:55,350 --> 00:06:58,420 And then we divide by the probability of the conditioning 127 00:06:58,420 --> 00:07:01,630 event, this is the probability of an arrival. 128 00:07:01,630 --> 00:07:04,610 But this is what we have just calculated, 129 00:07:04,610 --> 00:07:10,280 which is p plus q minus p times q.