1 00:00:00,560 --> 00:00:03,460 As a warm-up towards finding the distribution of the 2 00:00:03,460 --> 00:00:06,860 function of random variables, let us start by considering 3 00:00:06,860 --> 00:00:08,200 the discrete case. 4 00:00:08,200 --> 00:00:14,160 So let X be a discrete random variable and let Y be defined 5 00:00:14,160 --> 00:00:19,190 as a given function of X. We know the PMF of X and wish to 6 00:00:19,190 --> 00:00:23,130 find the PMF of Y. Here's a simple example. 7 00:00:23,130 --> 00:00:26,800 The random variable X takes the values 2, 3, 4, and 5 with 8 00:00:26,800 --> 00:00:32,049 the probabilities given in the figure, and Y is the function 9 00:00:32,049 --> 00:00:33,870 indicated here. 10 00:00:33,870 --> 00:00:39,000 Then, for example, the probability that Y takes a 11 00:00:39,000 --> 00:00:40,780 value of 4. 12 00:00:40,780 --> 00:00:46,500 This is also the value of the PMF of Y evaluated at 4. 13 00:00:46,500 --> 00:00:51,610 This is simply the sum of the probabilities of the possible 14 00:00:51,610 --> 00:00:55,890 values of X that give rise to a value of Y 15 00:00:55,890 --> 00:00:57,870 that is equal to 4. 16 00:00:57,870 --> 00:01:03,670 Therefore, this expression is equal to the probability that 17 00:01:03,670 --> 00:01:08,100 X equals to 4 plus the probability that 18 00:01:08,100 --> 00:01:10,560 X is equal to 5. 19 00:01:10,560 --> 00:01:16,140 Or, in PMF notation, we can write it in this manner. 20 00:01:20,380 --> 00:01:26,990 And in this numerical example, it would be 0.3 plus 0.4. 21 00:01:26,990 --> 00:01:31,890 More generally, for any given value of little y, the 22 00:01:31,890 --> 00:01:36,520 probability that the random variable capital Y takes this 23 00:01:36,520 --> 00:01:40,280 particular value is the sum of the probabilities of the 24 00:01:40,280 --> 00:01:44,150 little x that result in that particular value. 25 00:01:44,150 --> 00:01:47,070 So the probability that the random variable capital Y, 26 00:01:47,070 --> 00:01:51,100 which is the same as g of X, takes on a specific value is 27 00:01:51,100 --> 00:01:56,060 the sum of the probabilities of all possible values of 28 00:01:56,060 --> 00:02:00,140 little x where we only consider those values of 29 00:02:00,140 --> 00:02:05,040 little x that give rise to the specific value, little y, that 30 00:02:05,040 --> 00:02:07,080 you're interested. 31 00:02:07,080 --> 00:02:09,728 Let us now look into the special case where we have a 32 00:02:09,728 --> 00:02:12,420 linear function of a discrete random variable. 33 00:02:12,420 --> 00:02:16,060 Suppose that X is described by the PMF shown in this diagram, 34 00:02:16,060 --> 00:02:19,500 and let us consider the random variable Z, which is defined 35 00:02:19,500 --> 00:02:23,950 as 2 times X. We would like to plot the PMF of Z. 36 00:02:23,950 --> 00:02:27,540 First, let us note the values that Z can take. 37 00:02:27,540 --> 00:02:31,340 When X is equal to minus 1, Z is going to be 38 00:02:31,340 --> 00:02:32,960 equal to minus 2. 39 00:02:32,960 --> 00:02:36,280 When X is equal to 1, Z is going to be equal to 2. 40 00:02:36,280 --> 00:02:40,870 And when X is equal to 2, Z is going to be equal to 4. 41 00:02:40,870 --> 00:02:43,590 This event that X is equal to minus 1 happens with 42 00:02:43,590 --> 00:02:47,460 probability 2/6, and when that event happens, Z will take a 43 00:02:47,460 --> 00:02:48,980 value of minus 2. 44 00:02:48,980 --> 00:02:53,590 So this event happens with probability 2/6. 45 00:02:53,590 --> 00:02:58,560 With probability 1/6, X takes a value of 1 so that Z takes a 46 00:02:58,560 --> 00:03:00,320 value of 2. 47 00:03:00,320 --> 00:03:02,210 And this happens with probability 1/6. 48 00:03:02,210 --> 00:03:05,830 6 And finally, this last event here happens 49 00:03:05,830 --> 00:03:08,810 with probability 3/6. 50 00:03:08,810 --> 00:03:12,930 We have thus found the PMF of Z. Notice that it has the same 51 00:03:12,930 --> 00:03:18,100 shape as the PMF of X, except that it is stretched or scaled 52 00:03:18,100 --> 00:03:21,300 horizontally by a factor of 2. 53 00:03:21,300 --> 00:03:25,020 Let us now consider the random variable Y, defined as 2X plus 54 00:03:25,020 --> 00:03:29,640 3, or what is the same as Z plus 3. 55 00:03:32,460 --> 00:03:36,960 With probability 2/6, Z is equal to minus 2. 56 00:03:36,960 --> 00:03:42,350 And in that case, Y is going to be equal to plus 1. 57 00:03:42,350 --> 00:03:45,180 And this event happens with probability 2/6. 58 00:03:48,340 --> 00:03:53,700 With probability 1/6, Z takes a value of 2 so that Y it 59 00:03:53,700 --> 00:03:55,510 takes a value of 5. 60 00:03:59,090 --> 00:04:04,390 And finally, with probability 3/6, Z takes a value of 4 so 61 00:04:04,390 --> 00:04:06,860 that Y it takes a value of 7. 62 00:04:13,170 --> 00:04:17,990 What we see here is that the PMF of Y has exactly the same 63 00:04:17,990 --> 00:04:22,270 shape as the PMF of Z, except that it is shifted to the 64 00:04:22,270 --> 00:04:25,530 right by 3. 65 00:04:25,530 --> 00:04:29,390 To summarize, in order to find the PMF of a linear function 66 00:04:29,390 --> 00:04:33,909 such as 2X plus 3, what we do is that we first stretch the 67 00:04:33,909 --> 00:04:38,070 PMF of X by a factor of 2 and then shift it 68 00:04:38,070 --> 00:04:41,110 horizontally by 3. 69 00:04:41,110 --> 00:04:45,620 We can also describe the PMF of Y through a formula. 70 00:04:45,620 --> 00:04:51,510 For any given value of little y, the PMF is going to be 71 00:04:51,510 --> 00:04:55,390 equal to the probability that our random variable Y takes on 72 00:04:55,390 --> 00:04:57,990 the specific value little y. 73 00:04:57,990 --> 00:05:02,140 Then we recall that Y has been defined in our example to be 74 00:05:02,140 --> 00:05:06,230 equal to 2X plus 3, so we're looking at the probability of 75 00:05:06,230 --> 00:05:08,940 this event. 76 00:05:08,940 --> 00:05:15,040 But this is the same as the event that X takes a value 77 00:05:15,040 --> 00:05:22,240 equal to y minus 3 divided by 2. 78 00:05:22,240 --> 00:05:26,170 And in PMF notation, we can write it in this form. 79 00:05:30,730 --> 00:05:35,200 So what this is saying is that the probability that Y takes 80 00:05:35,200 --> 00:05:40,380 on a specific value is the same as the probability that X 81 00:05:40,380 --> 00:05:43,180 takes on some other specific value. 82 00:05:43,180 --> 00:05:47,950 And that value here is that value of X that would give 83 00:05:47,950 --> 00:05:52,300 rise to this particular value little y. 84 00:05:52,300 --> 00:05:55,680 Now, we can generalize the calculation that we just did. 85 00:05:55,680 --> 00:05:59,540 And more generally, if we have a linear function of a 86 00:05:59,540 --> 00:06:03,220 discrete random variable X, the PMF of the random variable 87 00:06:03,220 --> 00:06:07,590 Y is given by this formula in terms of the PMF of the random 88 00:06:07,590 --> 00:06:10,460 variable X. The derivation is the same. 89 00:06:10,460 --> 00:06:16,330 We use b instead the specific number 3, and we have a 90 00:06:16,330 --> 00:06:19,280 general constant a instead of the 2 that 91 00:06:19,280 --> 00:06:21,050 we had in this example. 92 00:06:21,050 --> 00:06:23,660 And this formula describes exactly what we did 93 00:06:23,660 --> 00:06:27,120 graphically in our previous example. 94 00:06:27,120 --> 00:06:31,720 This factor of a here serves to stretch the PMF by a factor 95 00:06:31,720 --> 00:06:39,690 of a, and this term b here serves to shift the PMF by b.