 Hi, I'm Zor. Welcome to Unisor Education. We continue talking about theory of probabilities. Today's topic is random variables. That's introduction to random variables. I do suggest you to study this material, watching this lecture on Unisor.com, because the lectures over there are presented with notes, and also registered students can take exams and just do some self-study, especially if it's about the problem-solving lectures. Before going into any problem-solving lecture, watching this lecture, it would be very beneficial if you will just try to solve these problems yourself. I mean, that's the purpose of the entire course, actually, to teach you to solve problems. All right, now, this is a more theoretical material. It's not anything related to problems. I have to introduce a new concept, a concept of random variable. That's what it is. Okay, theory of probabilities historically was developed based on basically the games, the gambling, if you wish. People wanted to analyze the chances of having this or that particular game won or lost. Now, obviously, with each game, there was some kind of a monetary financial arrangement. So, people were winning or losing money. So, there is certain quantitative characteristic of the game, amount you are winning or amount you are losing. So, that's where the roots of the random variables actually are. So, not only we want to evaluate all the different results of our random experiments, all the different elementary events, but we also want to have certain quantitative characteristics of each event. All right, now, let me give you an example. You are flipping a coin. Not only you are interested in whether it actually shows the heads or the tails and whether you can guess it in this way or that, you probably bet money on it. So, let's consider you bet $1 on heads. You are playing with your partner. So, the partner flips the coin and if it falls showing the heads, then you win and he pays you $1. If it's tails, you lose and you are paying him $1. Well, that seems to be a fair game, right? So, what is a dollar? A dollar is a quantitative measurement of the event. So, what's our sample space? Sample space contains two different elementary events, heads and tails. So, this is my omega. This is my sample space. It has two elementary events. Now, what are the probabilities of these events? Well, the probabilities are P of heads equals 1.5 and P of tails equals 1.5 and obviously, the sum of these is equal to 1 because that's the total probability of anything happening. Now, I associate with these two different elementary events two different numbers. One number is 1 with heads and another number is minus 1 with tails. This is my winning $1. This is my losing $1. So, basically, the game when I am betting on the heads can be described in these terms. Now, what are these? Well, this is actually an example of a random variable. Random variable is basically a function, if you wish, which is defined on these two elementary events and taking values in corresponding with two different numerical values, real values. So, usually random function, random variable is introduced in exactly this fashion. You have to have certain sample space with elementary events and for each elementary event, you have certain numerical characteristics of this. Not necessarily, by the way, different. Sometimes they might be similar, same or whatever. So, this basically has this property of being a quantitative characteristic of the winning or losing. So, these are elementary events. These are the probabilities of these events and these are random variables, different values of random variable which is defined on this set of elementary events. So, again, you can actually think about random variable as a function which has certain domain where it's defined and it has certain values. So, where it's defined is the set of elementary events and the set of values are real numbers. Okay, next. Next, let me give you a couple of examples. Okay, couple of examples of random variables. Very simple examples. The sample first is you have a certain number, let's say, 10 people in a room. A, B, C, D, E, F. Well, let's have sex. I don't want to have 10 too many. All right. Now, the random experiment is picking a simple, one simple pick, simple pick of one person. All right. So, you're picking one person from the room. So, each person has certain age. All right, let's say this has 23, this has 20, this has 22, this has 20, this has 30 and this is 55. So, if I am selecting a particular person out of this set and this person has certain age. So, the age is basically a result of a numerical result of the random experiment of selecting the person. So, if I am selecting with equal chances, then each one of these has one six probability. There are six of them, right? So, the probability associated with each elementary event is one six. So, my random variable takes values 23, 20, 20, 30 and 55, with probabilities correspondingly one six, one six, one six, one six, one six and one six. Now, what's interesting, by the way, that two different values, they're not really different, right? So, if I'm asking what's the probability of my random variable to take the value 20, well, that's one six and one six. So, it's actually two six, which is one third. So, the probability of taking the value 20 is greater than the probability of taking 23 or 22 or 30 or 55. All right, in any case, this is an example of a random variable where the set where it's defined, the elementary events is a set of six people and the value of the random variable is the age of randomly selected person. Next example. Next example is the game of roulette. Now, the game of roulette and there are certain variations in America. The game of roulette has numbers from one to 36 and then zero and double zero. So, it's 38 different position on the wheel and the ball is actually spinning and the wheel is spinning and wherever the ball stops, that's the number. Now, there are also some other aspects of this game like the color of the number, etc. But let's just completely forget about all this. We are talking about the game when you have to guess a number. So, let's say you are predicting that the number will be 23. Now, the game as it is played actually in the casino, if you are playing on a particular number, then casino pays you on each dollar which you put 36 dollars if you win and win and you are losing a dollar, your bet. That's what you lose if you don't really guess correctly. Well, considering there are 38 different positions of the ball, only one of them is the winning position and each of them probably is equal chances if the casino is playing a fair game. So, the probability of each position is 138. So, the probability of your winning is 138. So, with the probability of 138, you get 36 dollars and the probability of 37, 38, so all other cases you are losing a dollar. Well, which seems to be relatively fair. Obviously, there is something which casino is winning but we will talk about this later. But in large probabilities, you lose a small amount of money and with a small probability you win a lot of money. So, that's basically how it works. But in any case, I wanted to present this case as an example of a random variable which takes two values, 36 and minus 1. One is the probability of 138 and another is with the probability of 37, 38. Now, the elementary events where this function actually is defined is all these numbers. So, omega is 1 to 36, 0 and double 0 and the probability of each is equal to 1 over 38. So, these are elementary events and only on one of these events, the 23, which I am predicting, I am winning my 36 dollars and in all other cases, I am losing my dollar. So, that's how the function is defined on this set of values. All these except 23 are associated with a number minus 1 and the 23 is associated with a number 36. That's my numerical function. That's my quantitative equivalent of this whole random experiment. Alright, and I have a third example. The third example is the following. Let's say you have a nuclear reactor and the engineer actually is measuring the temperature. The temperature should always be watched because if it's rising, then we have to pull the fuel rod from the reactor to cool it down and if it's to cool, then it should be pushed back. So, basically, the temperature is a very important characteristic. So, at certain time, like every hour or something like this, an engineer is measuring temperature and he knows that the normal temperature is supposed to be, let's say, 800 degrees Celsius or whatever. I don't know what it is. But, its actual reading of the temperature are different obviously because sometimes he has 790, sometimes he has 802, sometimes he has 810, etc. So, basically, all these experiments which he is making, one after another, after another, give you certain event, certain elementary event. And let's say you're observing the whole thing for 24 hours. So, your set of 24 different temperature measurements are the values of your random variable. So, the time when you make this measurement can be your, let's say you have 12 o'clock, 1 o'clock, etc., up to 23 o'clock in military time. So, every time, no, that's actually zero supposed to be. If it's military, it's zero, right? So, from zero to 23. So, these 24 different elementary events correspond to 24 different temperatures. And that's basically your set of elementary events and numerical equivalent of your experiment. That's the random variable. So, you might say, observing your random variable during a certain period of time, like in this case 24 hours, you can say that, okay, it takes certain values with certain probabilities. And you can actually observe that something around 800 is occurring more often than further from the 800, which means the reactor is working normally. So, just an example, and that's, in this particular case, it might be related actually with certain fluctuations within the nuclear reactor, whatever the nuclear reaction is actually occurring. Okay, so, examples, fine. Now, let me point out that in this particular course, we're talking about theory of probabilities, which is related to finite number of elementary events. So, whatever the experiment is, we have certain finite number of elementary events. And for each of these elementary events, we have the function defined as a random variable on it, right? So, let's consider it this way. You have elementary events, e1, e2, et cetera, en. Now, not necessarily they have equal chances of occurring. Sometimes it has, they have equal, sometimes not. But so, let's consider a general case. So, the probability of event ei, where i is just an index from 1 to n, is equal, let's say, it's pi. So, you have probabilities of this thing. Now, the random variable, as I was saying, is basically a function. Well, in, I used to use the Greek letter c for a function. And so, the function of e1, let's say, will be value x1 for e2, it will be x2, et cetera, and for en, it will be xn. So, these are values which my random variable takes on each of these elementary events. Now, what's important, actually, to understand that to analyze how the random variable acts, it's not really necessary to go to the elementary events. What is necessary is to go to the probabilities of these elementary events, because sometimes two different elementary events can lead to the same value of the function. Like, you saw it on, with example, with roulette, for instance. Everything except number 23 had a value of the random variable equals to minus 1, right? So, and only 23 had 36. So, what makes sense is to analyze the probabilities of the random variable to take certain values. So, what I can say right now is that the probability of random variable c equals to x1 is equal to p1, p1, that's not pi, p. The probability of random variable c to equal to x2 is equal to p2. And the probability of random variable c to equal to any xi is actually pi. So, that's what's important. This is basically, they're saying it's a distribution of the random variable among different values. That's what it's describing here. So, this value with this probability, this value with this probability, etc. So, that's basically enough to analyze the behavior of the random variable. The probabilities of having this random variable take certain values. So, we need to know the values and we need to know the probabilities of these values. And that's enough to analyze our random variable. So, in these terms, if you go back to our game of roulette, you can say that the probability of c equals to 36 equals to 138, when you are guessing one number out of 36 numbers, zero and double zero. And the probability of c equals to minus one equals to 37, 38. So, our variable, random variable c takes only two values, 36 and minus one, with these probabilities. And that's basically a sufficient description of the random variable, because after that, we can do something like an average dispersion, etc., etc., all the different properties, which will be addressed later in a different lecture. So, right now, I'm just introducing you to the concept of what is random variable. So, on one hand, that's a function defined on a set of elementary events. For each elementary event, there is some kind of a numerical value. But if you will abstract out the fact that these are elementary events and just concentrate on the probabilities, because the probabilities is what's important, actually. Yes, you can describe this function in a different manner. c of one is equal to minus one, c of two is equal to minus one, etc., c of 22 is equal to minus one, c of 23 is equal to 36, and c of 24 is equal to again minus one, etc., c of zero is equal to minus one, and c of zero is equal to that. So, this is also a description. But this is not basically as interesting and as short, actually, as this one, because to analyze the function c, you really don't need this. What's sufficient is to have just these two. Okay, it takes two values, all these are minus one, and there are 37 of them. That's why it's 37, 38, and this one is only one single value, and that's why it's 36, with a one over 38 probability. All right, so that's my introduction to the concept of a random variable. Obviously, the random variables are much more studied and analyzed than the pure elementary events, per se, because what's interesting about elementary events, only their probability, whether it happens or it doesn't happen with certain probability. With random variables, we can do numerical manipulation. We can add them, we can multiply them. I mean, there are many different things which we can do with random variables. And that's actually where the theory of probabilities goes into really depths, really very deep analysis. And that's where we can learn something about events. We can learn about averaging, about dispersion, standard deviation, and stuff like this. But that's in future lectures. All right, so that's just an introduction. Thanks very much for listening to me. Maybe it makes sense, actually, to read again on unizor.com notes to this lecture. They contain basically the same material, but maybe slightly differently presented. And it's always good to repeat whatever, whatever you have learned here from the lecture. Thanks a lot and good luck.