1 00:00:00,620 --> 00:00:03,520 We are defining a random variable as a real valued 2 00:00:03,520 --> 00:00:05,430 function on the sample space. 3 00:00:05,430 --> 00:00:07,960 So this is a good occasion to make sure that we understand 4 00:00:07,960 --> 00:00:10,130 what a function is. 5 00:00:10,130 --> 00:00:13,670 To define a function, we start with two sets. 6 00:00:13,670 --> 00:00:14,740 One set-- 7 00:00:14,740 --> 00:00:16,160 call it A-- 8 00:00:16,160 --> 00:00:20,420 is the domain of the function. 9 00:00:20,420 --> 00:00:23,520 And we have our second set. 10 00:00:23,520 --> 00:00:29,800 Then a function is a rule that for any element of A 11 00:00:29,800 --> 00:00:36,940 associates an element of B. And we use a notation of this 12 00:00:36,940 --> 00:00:41,700 kind to indicate that we are dealing with a function f that 13 00:00:41,700 --> 00:00:47,470 maps elements of A into elements of B. 14 00:00:47,470 --> 00:00:52,050 Now, two elements of A may be mapped to the same element of 15 00:00:52,050 --> 00:00:55,640 B. This is allowed. 16 00:00:55,640 --> 00:01:00,320 What is important, however, is that every element of A is 17 00:01:00,320 --> 00:01:04,810 mapped to exactly one element of B, not more. 18 00:01:04,810 --> 00:01:08,590 But it is also possible that we have some elements of B 19 00:01:08,590 --> 00:01:13,050 that do not correspond to any of the elements of A. 20 00:01:13,050 --> 00:01:16,770 Now, I said that a function is a rule that assigns points of 21 00:01:16,770 --> 00:01:22,240 A to points in B. But what exactly do we mean by a rule? 22 00:01:22,240 --> 00:01:25,410 If we want to be more precise, a function would 23 00:01:25,410 --> 00:01:27,270 be defined as follows. 24 00:01:27,270 --> 00:01:32,690 It would be defined as a set of pairs of values. 25 00:01:32,690 --> 00:01:39,560 It would be a set of pairs of the form x, y such that x is 26 00:01:39,560 --> 00:01:45,890 always an element of A, y is always an element of B, and 27 00:01:45,890 --> 00:01:47,740 also-- most important-- 28 00:01:47,740 --> 00:01:54,259 each x in A appears in exactly one pair. 29 00:02:00,030 --> 00:02:02,890 So this would be a formal definition of 30 00:02:02,890 --> 00:02:04,330 what a function is. 31 00:02:04,330 --> 00:02:09,000 It is collection of ordered pairs of this kind. 32 00:02:09,000 --> 00:02:14,590 As a concrete example, let us start with the set consisting 33 00:02:14,590 --> 00:02:18,880 of these elements here. 34 00:02:18,880 --> 00:02:24,079 And let B be the set of real numbers. 35 00:02:24,079 --> 00:02:29,100 And consider the function that corresponds to what we usually 36 00:02:29,100 --> 00:02:30,610 call the square. 37 00:02:30,610 --> 00:02:34,320 So it's a function that squares its argument. 38 00:02:34,320 --> 00:02:38,030 Then this function would be represented by the following 39 00:02:38,030 --> 00:02:41,710 collection of pairs. 40 00:02:41,710 --> 00:02:45,690 So this is the value of x. 41 00:02:45,690 --> 00:02:48,820 And this is the corresponding value of y. 42 00:02:48,820 --> 00:02:54,130 Any particular x shows up just once in this 43 00:02:54,130 --> 00:02:56,890 collection of pairs. 44 00:02:56,890 --> 00:02:58,250 But a certain y-- 45 00:02:58,250 --> 00:03:00,210 for example, y equal to 1-- 46 00:03:00,210 --> 00:03:04,960 shows up twice, because minus 1 and plus 1 both map to the 47 00:03:04,960 --> 00:03:08,360 same element of B. 48 00:03:08,360 --> 00:03:13,030 Now, this is a representation in terms of ordered pairs. 49 00:03:13,030 --> 00:03:16,070 But we could also think of the function as being 50 00:03:16,070 --> 00:03:18,770 described by a table. 51 00:03:18,770 --> 00:03:25,340 We could, for instance, put this information here in a 52 00:03:25,340 --> 00:03:30,320 form of a table of this kind and say that this table 53 00:03:30,320 --> 00:03:31,560 describes the function. 54 00:03:31,560 --> 00:03:33,800 For any element x, it tells us what the 55 00:03:33,800 --> 00:03:36,710 corresponding element y is. 56 00:03:36,710 --> 00:03:40,450 However, when the set A is an infinite set it is not clear 57 00:03:40,450 --> 00:03:44,640 what we might mean by saying a table, an infinite table, 58 00:03:44,640 --> 00:03:46,480 whereas this definition in terms of 59 00:03:46,480 --> 00:03:49,310 ordered pairs still applies. 60 00:03:49,310 --> 00:03:53,470 For example, if you're interested in the function 61 00:03:53,470 --> 00:03:56,490 which is, again, the square function from the real 62 00:03:56,490 --> 00:04:00,790 numbers, the way you would specify that function 63 00:04:00,790 --> 00:04:03,540 abstractly would be as follows. 64 00:04:03,540 --> 00:04:13,480 You could write, it's the set of all pairs of this form such 65 00:04:13,480 --> 00:04:18,420 that x is a real number. 66 00:04:18,420 --> 00:04:23,530 And now such pairs, of course, belong to the two dimensional 67 00:04:23,530 --> 00:04:26,350 plane because it's a pair of numbers. 68 00:04:26,350 --> 00:04:29,880 So this set here can be viewed as a formal definition or a 69 00:04:29,880 --> 00:04:32,960 specification of the squaring function. 70 00:04:32,960 --> 00:04:36,050 Now, what this set is is something that we 71 00:04:36,050 --> 00:04:37,540 can actually plot. 72 00:04:37,540 --> 00:04:40,670 If we go in the two dimensional plane, the points 73 00:04:40,670 --> 00:04:44,980 of this form are exactly the points that belong to the 74 00:04:44,980 --> 00:04:47,810 graph of the square function. 75 00:04:47,810 --> 00:04:51,070 So this abstract definition, really all that it says is 76 00:04:51,070 --> 00:04:53,310 that a function is the same thing as the 77 00:04:53,310 --> 00:04:55,550 plot of that function. 78 00:04:55,550 --> 00:04:58,810 But it's important here to make a distinction. 79 00:04:58,810 --> 00:05:02,720 The function is the entire plot-- 80 00:05:02,720 --> 00:05:06,270 so this set here is the function f-- 81 00:05:06,270 --> 00:05:10,400 whereas if I tell you a specific number x, the 82 00:05:10,400 --> 00:05:14,240 corresponding value here would be f of x. 83 00:05:14,240 --> 00:05:19,370 So here x is a number and f of x is also a number. 84 00:05:19,370 --> 00:05:23,510 And those two values, x and f of x, define this particular 85 00:05:23,510 --> 00:05:25,490 point on this plot. 86 00:05:25,490 --> 00:05:30,141 But the function itself is the entire plot. 87 00:05:30,141 --> 00:05:34,159 Let us also take this occasion to talk a little bit about the 88 00:05:34,159 --> 00:05:38,430 notation and the proper way of talking about functions. 89 00:05:38,430 --> 00:05:41,510 Here is the most common way that one 90 00:05:41,510 --> 00:05:43,890 would describe a function. 91 00:05:43,890 --> 00:05:46,320 And this is an appropriate way. 92 00:05:46,320 --> 00:05:48,520 We've described the domain. 93 00:05:48,520 --> 00:05:50,780 We've described the set on which the 94 00:05:50,780 --> 00:05:52,480 function takes values. 95 00:05:52,480 --> 00:05:56,710 And I'm telling you for any x in that set what the value of 96 00:05:56,710 --> 00:05:58,596 the function is. 97 00:05:58,596 --> 00:06:02,060 On the other hand, sometimes people use a more loose 98 00:06:02,060 --> 00:06:05,190 language, such as for example, they would say, 99 00:06:05,190 --> 00:06:07,250 the function x squared. 100 00:06:07,250 --> 00:06:08,420 What does that mean? 101 00:06:08,420 --> 00:06:13,700 Well, what this means is exactly this statement. 102 00:06:13,700 --> 00:06:16,310 Now let us consider this function. 103 00:06:16,310 --> 00:06:18,850 The function f-- 104 00:06:18,850 --> 00:06:20,660 again, from the reals to the reals-- 105 00:06:20,660 --> 00:06:24,440 that's defined by f of z equal to z squared. 106 00:06:24,440 --> 00:06:27,530 Is this a different function or is it the same function? 107 00:06:27,530 --> 00:06:31,870 It's actually the same function, because these two 108 00:06:31,870 --> 00:06:33,710 involve the same sets. 109 00:06:33,710 --> 00:06:37,680 And they produce their outputs, the values of f, 110 00:06:37,680 --> 00:06:40,010 using exactly the same rule. 111 00:06:40,010 --> 00:06:43,480 They take an argument and they square that argument. 112 00:06:43,480 --> 00:06:46,860 Now, if you were to use informal notation, you would 113 00:06:46,860 --> 00:06:49,430 be referring to that second function as 114 00:06:49,430 --> 00:06:52,120 the function z squared. 115 00:06:52,120 --> 00:06:55,420 And now, if you use informal language, it's less clear that 116 00:06:55,420 --> 00:06:58,750 the function x squared and the function z squared are one and 117 00:06:58,750 --> 00:07:02,740 the same thing, whereas with this terminology here, it 118 00:07:02,740 --> 00:07:05,110 would be pretty clear that we're talking 119 00:07:05,110 --> 00:07:07,460 about the same function. 120 00:07:07,460 --> 00:07:10,960 Finally, suppose that we have already defined a function. 121 00:07:10,960 --> 00:07:14,870 How should we refer to it in general? 122 00:07:14,870 --> 00:07:18,620 Should we call it the function f, or should we say the 123 00:07:18,620 --> 00:07:20,780 function f of x? 124 00:07:20,780 --> 00:07:24,840 Well, when x is a number, f of x is also a number. 125 00:07:24,840 --> 00:07:27,760 So f of x is not really a function. 126 00:07:27,760 --> 00:07:30,270 The appropriate language is this one. 127 00:07:30,270 --> 00:07:34,400 We talk about the function f, although quite often, people 128 00:07:34,400 --> 00:07:37,590 will abuse language and they will use this terminology. 129 00:07:37,590 --> 00:07:41,800 But it's important to keep in mind what we really mean. 130 00:07:41,800 --> 00:07:45,970 The idea is that we need to think of a function as some 131 00:07:45,970 --> 00:07:51,520 kind of box or even a computer program, if you wish, that 132 00:07:51,520 --> 00:07:55,640 takes inputs and produces outputs. 133 00:07:55,640 --> 00:07:59,770 And there's a distinction between f, which is the box, 134 00:07:59,770 --> 00:08:04,310 from the value f of x that the function takes if we feed it 135 00:08:04,310 --> 00:08:05,560 with a specific argument.