1 00:00:00,000 --> 00:00:00,420 2 00:00:00,420 --> 00:00:01,720 Hi everyone. 3 00:00:01,720 --> 00:00:04,370 Today I'm going to talk about Bernoulli process practice 4 00:00:04,370 --> 00:00:05,840 number one. 5 00:00:05,840 --> 00:00:09,290 In this problem, you are visiting a rain forest. 6 00:00:09,290 --> 00:00:12,920 But unfortunately you have run out of insect repellent. 7 00:00:12,920 --> 00:00:16,020 As a result, the probability of you getting mosquito bites 8 00:00:16,020 --> 00:00:17,350 is really high. 9 00:00:17,350 --> 00:00:20,720 At each second, the probability that a mosquito 10 00:00:20,720 --> 00:00:23,820 will land on your neck is 0.5. 11 00:00:23,820 --> 00:00:27,130 If a mosquito lands on your neck, the probability that it 12 00:00:27,130 --> 00:00:29,210 will bite you is 0.2. 13 00:00:29,210 --> 00:00:33,520 And the probability that it will never bother you is 0.8. 14 00:00:33,520 --> 00:00:35,750 All of this happens independently among all 15 00:00:35,750 --> 00:00:37,400 mosquitoes. 16 00:00:37,400 --> 00:00:40,530 For part A of the problem, we're interested in finding 17 00:00:40,530 --> 00:00:43,550 the expected value of the time between successive mosquito 18 00:00:43,550 --> 00:00:46,740 bites and the variance of the time between successive 19 00:00:46,740 --> 00:00:48,680 mosquito bites. 20 00:00:48,680 --> 00:00:52,260 From the problem statement we know that the probability 21 00:00:52,260 --> 00:00:54,950 distributions of getting mosquito bites at different 22 00:00:54,950 --> 00:00:59,400 times are identically distributed and independent. 23 00:00:59,400 --> 00:01:03,480 Therefore, the mosquito bites occur as a Bernoulli process 24 00:01:03,480 --> 00:01:07,150 with parameter p, where p represents the probability of 25 00:01:07,150 --> 00:01:10,210 getting a mosquito bite at each second. 26 00:01:10,210 --> 00:01:17,930 And p can be calculated as the probability that a mosquito 27 00:01:17,930 --> 00:01:22,590 lands on your neck at each second multiplied by the 28 00:01:22,590 --> 00:01:26,315 probability that a mosquito will bite you, given that it 29 00:01:26,315 --> 00:01:28,220 has landed on your neck. 30 00:01:28,220 --> 00:01:33,170 31 00:01:33,170 --> 00:01:43,410 And this is equal to 0.5 times 0.2, which is equal to 0.1. 32 00:01:43,410 --> 00:01:47,240 Next let us define x as the time between successive 33 00:01:47,240 --> 00:01:49,540 mosquito bites. 34 00:01:49,540 --> 00:01:52,270 Because of the memory-less property of the Bernoulli 35 00:01:52,270 --> 00:01:55,470 process, which means the probability of getting 36 00:01:55,470 --> 00:01:59,260 mosquito bites at different times are independent, x is 37 00:01:59,260 --> 00:02:02,890 equivalent to the time until the next mosquito bite. 38 00:02:02,890 --> 00:02:06,160 And x is a geometrical random variable whose 39 00:02:06,160 --> 00:02:07,770 PMF is like the following. 40 00:02:07,770 --> 00:02:17,030 41 00:02:17,030 --> 00:02:21,120 For all x, let's say equal to 0, the probabilities 42 00:02:21,120 --> 00:02:23,570 are equal to 0. 43 00:02:23,570 --> 00:02:27,280 For x equal to 1, the probability that it takes 1 44 00:02:27,280 --> 00:02:33,720 second to the next mosquito bite is simply equal to p. 45 00:02:33,720 --> 00:02:38,240 And for x equal to 2, the probability that it takes 2 46 00:02:38,240 --> 00:02:42,170 seconds until the next mosquito bite is equal to 1 47 00:02:42,170 --> 00:02:43,890 minus p times p. 48 00:02:43,890 --> 00:02:47,710 49 00:02:47,710 --> 00:02:51,190 And for x equal to 3, the probability that it takes 3 50 00:02:51,190 --> 00:02:54,840 seconds until the next mosquito bite is equal to 1 51 00:02:54,840 --> 00:03:00,360 minus p to the power of 2 times p. 52 00:03:00,360 --> 00:03:04,800 Similarly, for x equal to k, the probability that it takes 53 00:03:04,800 --> 00:03:08,720 k seconds until the next mosquito bite is equal to 1 54 00:03:08,720 --> 00:03:12,960 minus p to the power of k minus 1 times p. 55 00:03:12,960 --> 00:03:16,550 56 00:03:16,550 --> 00:03:23,040 Therefore the expected value of x is equal to 1 over p, 57 00:03:23,040 --> 00:03:28,880 which is equal to 1 over 0.1, which is equal to 10. 58 00:03:28,880 --> 00:03:37,430 And the variance of x is equal to 1 minus p over p squared, 59 00:03:37,430 --> 00:03:44,680 which is equal to 1 minus 0.1 over 0.1 squared, which is 60 00:03:44,680 --> 00:03:47,270 equal to 90. 61 00:03:47,270 --> 00:03:49,910 For part B of the problem, we're considering 62 00:03:49,910 --> 00:03:51,660 another type of bug. 63 00:03:51,660 --> 00:03:55,720 Similar to the case as the mosquitoes, here at each 64 00:03:55,720 --> 00:04:00,460 second the probability that a tick will land on your neck is 65 00:04:00,460 --> 00:04:02,600 equal to 0.1. 66 00:04:02,600 --> 00:04:05,860 And if a tick lands on your neck, the probability that it 67 00:04:05,860 --> 00:04:08,310 will bite you is equal to 0.7. 68 00:04:08,310 --> 00:04:10,210 And the probability that it will never bother 69 00:04:10,210 --> 00:04:12,630 you is equal to 0.3. 70 00:04:12,630 --> 00:04:15,980 And all this happens independently among all ticks 71 00:04:15,980 --> 00:04:18,339 and all mosquitoes. 72 00:04:18,339 --> 00:04:22,930 So similar to the case as part A, where mosquito bites occurs 73 00:04:22,930 --> 00:04:27,400 as a Bernoulli process with parameter p equal to 0.1, here 74 00:04:27,400 --> 00:04:30,500 the tick bites also across a Bernoulli process with 75 00:04:30,500 --> 00:04:36,660 parameter q equal to 0.1 times 0.7, which is equal to 0.07. 76 00:04:36,660 --> 00:04:40,700 And q is the probability of getting a tick 77 00:04:40,700 --> 00:04:43,910 bite at each second. 78 00:04:43,910 --> 00:04:49,120 Therefore, the bug bites occurs as a merged process 79 00:04:49,120 --> 00:04:52,570 from the mosquito bites and the tick bites. 80 00:04:52,570 --> 00:04:57,640 And let r represent the parameter for the bug bites. 81 00:04:57,640 --> 00:05:06,920 So here r is equal to the probability of getting either 82 00:05:06,920 --> 00:05:11,467 a mosquito bite or a tick bite. 83 00:05:11,467 --> 00:05:23,460 84 00:05:23,460 --> 00:05:28,120 And this is equivalent to 1 minus the probability of 85 00:05:28,120 --> 00:05:42,743 getting no mosquito bite and no tick bite. 86 00:05:42,743 --> 00:05:47,440 87 00:05:47,440 --> 00:05:50,290 Because the mosquito bites and the tick bites happens 88 00:05:50,290 --> 00:05:54,540 independently, therefore this can be written as 1 minus the 89 00:05:54,540 --> 00:06:07,210 probability of no mosquito bites times the probability of 90 00:06:07,210 --> 00:06:12,380 no tick bites at each second. 91 00:06:12,380 --> 00:06:22,620 And this is equal to 1 minus p times 1 minus q, which is p 92 00:06:22,620 --> 00:06:34,080 plus q minus pq, which is equal to 0.1 plus 0.7 minus 93 00:06:34,080 --> 00:06:37,370 0.1 times 0.7. 94 00:06:37,370 --> 00:06:45,130 Which is equal to 0.163. 95 00:06:45,130 --> 00:06:53,230 Next, let us define y as the time between 96 00:06:53,230 --> 00:06:54,938 successive bug bites. 97 00:06:54,938 --> 00:07:08,780 98 00:07:08,780 --> 00:07:15,160 So similar as x in part a, here y is a geometric 99 00:07:15,160 --> 00:07:18,550 distribution with parameter r. 100 00:07:18,550 --> 00:07:26,160 And therefore the expected value of y is equal to 1 over 101 00:07:26,160 --> 00:07:31,850 r, which is equal to 1 over 0.163. 102 00:07:31,850 --> 00:07:37,930 That is approximately 6.135. 103 00:07:37,930 --> 00:07:51,740 And the variance of y is equal to 1 minus r over r squared, 104 00:07:51,740 --> 00:08:02,120 which is equal to 1 minus 0.163 over 0.163 squared. 105 00:08:02,120 --> 00:08:10,700 And this is approximately 31.503. 106 00:08:10,700 --> 00:08:20,350 So this gives us the expected value of the time between 107 00:08:20,350 --> 00:08:24,280 successive bug bites and the variance of the time between 108 00:08:24,280 --> 00:08:25,950 successive bug bites. 109 00:08:25,950 --> 00:08:28,280 And this concludes our two days practice 110 00:08:28,280 --> 00:08:29,530 on Bernoulli process. 111 00:08:29,530 --> 00:08:30,550