Introduction to Random Variables
I’ll now introduce you to the concept of a random variable and for me this is some maybe has a lot of trouble that getting my head around. And that’s really because it’s a buy product of what it’s called and this called a variable. And were use the variables all you know that it’s a kind of unknown in the equation if I write x+3=7, the variable was x and maybe you can solve for it or maybe you could have an equation of y=43x-2. And then here y and x are both variables, if you input one x and you could solve for the other variable y. And if you can change them and the variables where the kind of things that could change that you could solve for and they can take on particular values.
A random variable is kind of the same thing and that can take on multiple values but it’s not something that you really ever solve for. So, just so you get used to the notation, a random variable is usually a capital letter. Use the capital x and y and use the capital x and what really the first from a traditional variable is that it can take on a bunch of different values like a traditional variable but you never solve for it.
And really it’s a little misleading the quadrant variable at all. It’s really a function and it’s a function that maps you from the world of random processes to an actual number. So, let say I wanted to somehow quantify a random process, is it going to rain or not tomorrow. So, let see if rain tomorrow or no rain. So, you could observe that and you can until tomorrow and see if it rains or not. But then how you quantify it?
Well, we can define a random variable that it will quantify. We can see this random variable is going to be equal to one, if its rain tomorrow and it equals to zero if it doesn’t rain tomorrow. And we didn’t have to assign one and zero, those tend be a little bit more useful and they make sense. But we can have assigned this as 21 and this is a hundred.
It’s however you define it. So, it’s important to keep this things in your mind that a random variable, it isn’t a variable in the traditional sense of the world. It’s more of a function that maps us from the world of a random process to a number. And then this number is going to be random because we don’t know if it’s going to rain or not tomorrow and maybe we have some sense of the probabilities. So, this variable can take on either value or that lead us and let me draw a couple of more random variable definitions. So, you get the intuition that these really are function.
So, we can define a random variable x is equal to, well actually allow me that, it could just be a very obvious numeric matter. It could just be the number facing up when I role a pair of dice and that could be a random variable. I could have also said it’s a number most facing east when I roll a pair of dice although that’s a little use and less useful and you could also define a random variable x=1 if I get its head and I could say if tails. Or I could have done it the other way around.
Once again, this heads and tails are outcomes of an experiment, right. When I flip a coin that’s a random process, each flip is an experiment and then the random variable is just quantifying that experiment. So, I know it sounds a little technical with the terminology but what we are really doing is barely something simple. Were just assigning of one if we get a head and zero if we get a tails and the random variable is just to that function mapping
Now I’m going into all of this random variable business which I didn’t do before when we did probability because it doesn’t start to become a little bit useful notationally. Because we’ll start to talk about things like probability distributions in a expected values and it really as useful to quantify things a random variable. And with that said, now let’s talk about probability distributions in expected values. So, if there are first thing probability distributions, actually let me define something else. There is two types of random variables and you can have discrete random variables or continuous.
Discrete, it would be like really all of the definitions that we have up until now. The rule over the flip of a coin and you get a one or zero. There are two discrete cases. When I roll a dice, there is one of six different outcomes like that I can have. Whether it rains tomorrow and there is one of two outcomes, yes or no. So, in all of this situations, you can almost say that you could almost say that you have a countable number of outcomes. A continuous random variable, I can take it on an infinite number of outcomes.
So, continuous random variable could be the exact, it could be x is equal to the exact amount of rain in inches tomorrow. Now, why it’s just continuous, right? Well, if you think about it and that can take on any of an infinite set of values. And you might have one inch of rain tomorrow or you might have 1.1 inches or rain. You might have 1.11 inches or rain and you might have 2.111 inches or rain.
As you can see, you can come up with an infinite number of combinations of the amount of rain you have. And to get the exact, well I go into more of this when I talk about probability and density functions. But in general even though you might say, “Well, you know I can’t imagine having an infinite amount of rain because what if I can have a hundred gallons of rain tomorrow but if you think about that you could take an any value between one and two inches of rain.
There is actually infinite number of values between zero and one, right. For any value you could find a number that’s little, you know, just to think about it between zero and one. ½ is in between of those and you can always find a number that’s halfway between those and then a number that’s halfway between those. There’s an infinite number of numbers between any two numbers. While with the discrete random variables, it just took on a finite number values and those one up here, it could only take one or zero. It could didn’t take on 1.1 and it couldn’t take on an infinity.
And I make that difference because actually how we look out even in terms of their probability distributions, this are little different but they are much related. So, discrete random variable like the once that when you define at the beginning of this videos and they have a probability distributions. So, let’s do it for, we going to let say x is equal to the number facing up on a pair dice.
So, we already know that to get each outcome, there is six outcomes including it the one, two, three, four, five, or six facing up. So, let’s redraw the probability distribution. So, here all the outcomes and I’ll draw that on the horizontal axis. So, the one outcome is one, two, three, four, five, and six and then in the y axis where in the vertical that you plot and what is the probability of each of those outcomes occurring.
What’s the probability? I’ll switch colors. So, what is the probability of getting one? Well, its 1/6, right. So, if I draw 1/6 here, 1/6 is the probability as of each this occurring and [7:52] I didn’t want to do like that are 1/6. Essentially it like a histogram or bar chart and this is going to be each of this, my intention is to draw them all the exact same height, alright. This is just telling us that each of this, there is a 1/6 chance of it occurring. If I were to draw a probability distribution for, I were to find the random variable x=1 if heads, x=0 if tails. This has a very simple probability distribution; there are only two outcomes.
Here they going to get a one or zero and then in the y axis, they have the probabilities. Each of this, such a pair of dice is going to be ½ probability that you get and draw a little box like that. That tells you each of a more of our½.
Now let that you had another probability distribution function that looks something like this. And those are kind of very random of the many examples. But what if I have something like this? Let say, where I had some dice and let say, we had some weird on it. Where it had an outcome of one, I had a one/six chance. So, it’s like that. Let’s say that for some reason, a two could never happen and maybe there is no two. Let say, three has a 1/6 chance, a four has a 1/6 chance, a 5 has 1/6 chance. And let say, there is two sixes, right. It like if we raise the two and we put six where the two [9:49], so the six has 2/6 chance. So, the six would be 2/6 chance.
So, now I think you can see where the probability distribution function starts to become a little bit more interesting, right. And the other one, it was kind of what we
call Uniform Distribution. All of the outcomes are equally you like. That’s the uniform distribution. Once again this is a uniform distribution. This one all of the sudden is not a uniform distribution. One is just we have three, four, five, two is impossible to happen but six is twice as like way to happen is everything else is 2/6.
So, if someone gives you a probability of density functions or if they give you a little chart like this. You can immediately say what the probability of different events occurring, right is. So, if you said that x is equal to the number on pair dice that’s describe by this probability distribution function that if I were to ask you the probability that x is equal to six. The probability x equal to six is equal to 2/6 or 1/3, right. If I were to say what’s the probability that the random variable x is given by this definition is greater than five and you would take. Well, let say less or greater or equal to five, right. Now you want to include five and at least I did. So, it would include this situation and this situation.
So, it will be 1/6 plus 2/6 and so you could that’s 3/6 or ½. So, it gets pretty interesting when you don’t have a completely uniform distribution. And I’m doing all of this because in the next couple of videos, we want to move away from discrete and actually to study continuous probability distribution which are called probability density function. And then we will go to study kind of a lot of distributions that show up the nature.
The uniform distribution is one of them and this also the binomial distribution and the normal distribution which is lot of some people called the— or the bell curve which is kind of a very common thing. But anyway I’m all out of time and I’ll see you in the next video.
Transcription by:
Scribe4you Transcription Services