Current time:0:00Total duration:11:57

# Discrete and continuous randomÂ variables

## Video transcript

We already know a little
bit about random variables. What we're going to
see in this video is that random variables
come in two varieties. You have discrete
random variables, and you have continuous
random variables. And discrete random
variables, these are essentially
random variables that can take on distinct
or separate values. And we'll give examples
of that in a second. So that comes straight from the
meaning of the word discrete in the English language--
distinct or separate values. While continuous-- and I
guess just another definition for the word discrete
in the English language would be polite, or not
obnoxious, or kind of subtle. That is not what
we're talking about. We are not talking about random
variables that are polite. We're talking about ones that
can take on distinct values. And continuous random
variables, they can take on any
value in a range. And that range could
even be infinite. So any value in an interval. So with those two
definitions out of the way, let's look at some actual
random variable definitions. And I want to think together
about whether you would classify them as discrete or
continuous random variables. So let's say that I have a
random variable capital X. And it is equal to--
well, this is one that we covered
in the last video. It's 1 if my fair coin is heads. It's 0 if my fair coin is tails. So is this a discrete or a
continuous random variable? Well, this random
variable right over here can take on distinctive values. It can take on either a 1
or it could take on a 0. Another way to think
about it is you can count the number
of different values it can take on. This is the first
value it can take on, this is the second value
that it can take on. So this is clearly a
discrete random variable. Let's think about another one. Let's define random
variable Y as equal to the mass of a random
animal selected at the New Orleans zoo, where I
grew up, the Audubon Zoo. Y is the mass of a random animal
selected at the New Orleans zoo. Is this a discrete
random variable or a continuous random variable? Well, the exact mass--
and I should probably put that qualifier here. I'll even add it here just to
make it really, really clear. The exact mass of a random
animal, or a random object in our universe, it can take on
any of a whole set of values. I mean, who knows
exactly the exact number of electrons that are
part of that object right at that moment? Who knows the
neutrons, the protons, the exact number of
molecules in that object, or a part of that animal
exactly at that moment? So that mass, for
example, at the zoo, it might take on a value
anywhere between-- well, maybe close to 0. There's no animal
that has 0 mass. But it could be close to zero,
if we're thinking about an ant, or we're thinking
about a dust mite, or maybe if you consider
even a bacterium an animal. I believe bacterium is
the singular of bacteria. And it could go all the way. Maybe the most massive
animal in the zoo is the elephant of some kind. And I don't know what it
would be in kilograms, but it would be fairly large. So maybe you can
get up all the way to 3,000 kilograms,
or probably larger. Let's say 5,000 kilograms. I don't know what the mass of a
very heavy elephant-- or a very massive elephant, I
should say-- actually is. It may be something
fun for you to look at. But any animal could have a
mass anywhere in between here. It does not take
on discrete values. You could have an animal that
is exactly maybe 123.75921 kilograms. And even there, that actually
might not be the exact mass. You might have to get even
more precise, --10732. 0, 7, And I think
you get the picture. Even though this is the
way I've defined it now, a finite interval, you can take
on any value in between here. They are not discrete values. So this one is clearly a
continuous random variable. Let's think about another one. Let's think about-- let's say
that random variable Y, instead of it being this, let's say it's
the year that a random student in the class was born. Is this a discrete or a
continuous random variable? Well, that year, you
literally can define it as a specific discrete year. It could be 1992, or it could
be 1985, or it could be 2001. There are discrete values
that this random variable can actually take on. It won't be able to take on
any value between, say, 2000 and 2001. It'll either be 2000 or
it'll be 2001 or 2002. Once again, you can count
the values it can take on. Most of the times that
you're dealing with, as in the case right here,
a discrete random variable-- let me make it clear
this one over here is also a discrete
random variable. Most of the time
that you're dealing with a discrete random
variable, you're probably going to be dealing
with a finite number of values. But it does not have to be
a finite number of values. You can actually have an
infinite potential number of values that it
could take on-- as long as the
values are countable. As long as you
can literally say, OK, this is the first
value it could take on, the second, the third. And you might be counting
forever, but as long as you can literally
list-- and it could be even an infinite list. But if you can list the
values that it could take on, then you're dealing with a
discrete random variable. Notice in this
scenario with the zoo, you could not list all
of the possible masses. You could not even count them. You might attempt to--
and it's a fun exercise to try at least
once, to try to list all of the values
this might take on. You might say,
OK, maybe it could take on 0.01 and maybe 0.02. But wait, you just skipped
an infinite number of values that it could take on, because
it could have taken on 0.011, 0.012. And even between those,
there's an infinite number of values it could take on. There's no way for you to
count the number of values that a continuous random
variable can take on. There's no way for
you to list them. With a discrete random variable,
you can count the values. You can list the values. Let's do another example. Let's let random
variable Z, capital Z, be the number ants born
tomorrow in the universe. Now, you're probably
arguing that there aren't ants on other planets. Or maybe there are
ant-like creatures, but they're not going to
be ants as we define them. But how do we know? So number of ants
born in the universe. Maybe some ants have figured
out interstellar travel of some kind. So the number of ants born
tomorrow in the universe. That's my random variable Z. Is
this a discrete random variable or a continuous random variable? Well, once again, we
can count the number of values this could take on. This could be 1. It could be 2. It could be 3. It could be 4. It could be 5 quadrillion ants. It could be 5 quadrillion and 1. We can actually
count the values. Those values are discrete. So once again, this
right over here is a discrete random variable. This is fun, so let's
keep doing more of these. Let's say that I have
random variable X. So we're not using this
definition anymore. Now I'm going to define
random variable X to be the winning time-- now
let me write it this way. The exact winning time for
the men's 100-meter dash at the 2016 Olympics. So the exact time that it took
for the winner-- who's probably going to be Usain Bolt,
but it might not be. Actually, he's
aging a little bit. But whatever the exact
winning time for the men's 100-meter in the 2016 Olympics. And not the one that you
necessarily see on the clock. The exact, the
precise time that you would see at the
men's 100-meter dash. Is this a discrete or a
continuous random variable? Well, the way I've defined, and
this one's a little bit tricky. Because you might
say it's countable. You might say, well,
it could either be 956, 9.56 seconds, or 9.57
seconds, or 9.58 seconds. And you might be
tempted to believe that, because when you watch the
100-meter dash at the Olympics, they measure it to the
nearest hundredths. They round to the
nearest hundredth. That's how precise
their timing is. But I'm talking about the exact
winning time, the exact number of seconds it takes
for that person to, from the starting gun,
to cross the finish line. And there, it can
take on any value. It can take on any
value between-- well, I guess they're limited
by the speed of light. But it could take on any
value you could imagine. It might be anywhere between 5
seconds and maybe 12 seconds. And it could be anywhere
in between there. It might not be 9.57. That might be what
the clock says, but in reality the exact
winning time could be 9.571, or it could be 9.572359. I think you see what I'm saying. The exact precise time could
be any value in an interval. So this right over here is a
continuous random variable. Now what would be
the case, instead of saying the
exact winning time, if instead I defined X to be the
winning time of the men's 100 meter dash at the 2016
Olympics rounded to the nearest hundredth? Is this a discrete or a
continuous random variable? So let me delete this. I've changed the
random variable now. Is this going to
be a discrete or a continuous random variable? Well now, we can actually
count the actual values that this random
variable can take on. It might be 9.56. It could be 9.57. It could be 9.58. We can actually list them. So in this case, when we round
it to the nearest hundredth, we can actually list of values. We are now dealing with a
discrete random variable. Anyway, I'll let you go there. Hopefully this gives you
a sense of the distinction between discrete and
continuous random variables.