If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

# Random variables

## Video transcript

what I want to discuss a little bit in this video is the idea of a random variable and random variables at first can be a little bit confusing because we will want to think of them as traditional variables that you are first exposed to in an algebra class and that's not quite what random variables are random variables are really ways to map outcomes of random processes to numbers so if you have a random process like you're flipping a coin or you are rolling dice or you are measuring the rain that might fall tomorrow so random process you are really just your word really just mapping outcomes of that outcomes of that to two numbers you're quantifying you're quantifying the outcomes so let's what's an example of a random variable well let's define one right over here so I'm going to define random variable capital X and they tend to be denoted by capital letters so random variable capital X I will define it as it is going to be equal to 1 if my fair die rolls heads heads if let me write it this way if heads if heads and it's going to be equal to 0 if tails I could have defined this any way I want to do this is actually a fairly typical way of defining a random variable especially for a coin flip but I could have defined this as 100 and I could have defined this is 703 and this would still be a legitimate random variable it might not make it might not be as pure way of thinking about it as defining one is heads and zeros tails but that would have been a random variable notice we have taken this random process flipping a coin and we've mapped the outcomes of that random process and we've quantified them one if heads 0 if tails we can define another random variable capital y capital y is equal to let's say the sum the sum of roles of let's say 7 7 dice and when we talk about the sum we're talking about the sum of the seven let me write this the sum of the top the the upward facing the upward face upward face upward face after rolling after rolling seven dice seven dice once again we are quantifying an outcome for a random process we are the random processes rolling these seven dice and seeing what sides show up on top and then we are taking those and we were taking the sum and we are defining a random variable in that way so the natural question you might ask is why are we doing this what's so useful about defining random variables like this it will become more apparent as we get a little bit deeper in probability but the simple way of thinking about it is as soon as you quantify outcomes you can start to do a little bit more math on the on the outcomes and you can start to use a little bit more of mathematical notation on the outcome so for example if you cared about the probability that the sum of the upward phases after rolling 7-7 dice if you cared about the probability that that sum is less than or equal to 30 the old way that you would have to have written it is the probability that the sum of the sum the sum of and you would have to write all what I just wrote here is less than or equal to is less than or equal to 30 you would have had to write that big thing and if you wanted to write and nu and then you would try to figure it out somehow if you had some information but now we can just write the probability that Capital y is less than or equal to 30 it's a little bit cleaner notation and if we now care if someone else cares about the probability that the sum of the upward face after rolling seven dice if they say hey what's the probability that that's even instead of having to write all of that over they can say well what's the probability that Y is y is even now the one thing that I do want to emphasize is how these are different than traditional variables traditional variables that you see in your algebra class like X plus 5 is equal six usually denoted by lowercase variables y is equal to X plus seven these variables you can essentially assign values you either have can solve for them so in this case X is an unknown you can subtract 5 from both sides and solve for X say that X is going to be equal to 1 in this case you could say well X is going to be very is going to vary we can assign a value to X and see how Y varies as a function of X you can either assign variable you can assign values to them or you can solve for them you could say hey X is going to be 1 in this case that's not going to be the case with a random variable a random variable can take on many many many many many different values with different probabilities and it makes much more sense to talk about the probability of a random variable equaling a value or the probability that is less than or greater than something or the probability that it has some property and you see that in either of these cases in the next video we'll continue this discussion and we'll talk a little bit about the types of random variables you can have