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.

# Discrete and continuous random variables

Discrete random variables can only take on a finite number of values. For example, the outcome of rolling a die is a discrete random variable, as it can only land on one of six possible numbers. Continuous random variables, on the other hand, can take on any value in a given interval. For example, the mass of an animal would be a continuous random variable, as it could theoretically be any non-negative number. Created by Sal Khan.

## Want to join the conversation?

• Can there really be any value for time? Isn't there a smallest unit of time? And if there isn't shouldn't there be?

If there is such a unit, then the variable cannot be continuous between one smallest unit and the next.
• I think the smallest value of time is currently thought to be Planck time (time required for light to travel 1 planck length)
http://en.wikipedia.org/wiki/Planck_time

so I'm not quite sure whether time is actually discrete or continuous
• About the New Orleans Zoo example...

I think when we say "discrete" it means "countable" or "enumerable". In zoo example, although the exact mass would vary from almost 0 to say 5000kg (if that 5T elephant is indeed the biggest animal found in the zoo), we can count every individual animal at any moment. In other words, then total number of animal is somehow fixed at one moment. Therefore, I might say your zoo example is also an example of "discrete random variable".

How do you think?
• What "discrete" really means is that a measure is separable. For instance, how many elephants does a zoo have? A zoo might have six elephants or seven elephants, but it can't have something between those two. Also, all zoos that have seven elephants definitely have the same number of elephants. Those two features make the number of elephants owned a discrete measure.

By contrast, the weight of an elephant is a continuous measure. If we say that one elephant weighs 945kg and another weighs 946kg, there are any range of possible weights between those two things. In fact, it is impossible for an elephant to weigh 945kg; we really mean that it is close enough to 945kg for our satisfaction. Unlike the count of elephants, a herd of elephants each of whom weighs 945kg each actually weighs something different. These are the clues that weight is a continuous measure and not discrete. Clear?
• Why is the word "random" in front of variable here. What's the difference between a discrete variable and a discrete random variable?
• It might be useful to watch the video previous to this, "Random Variables". He explains quite well how variables and random variables differ.
• so the distinction between discreet and continues random variables is determined by whether or not the possible outcomes are infinitely divisible into more possible outcomes?
• Essentially, yes. It's a nice way of thinking about it.
• I'm struggling to find a rigorous definition of discrete vs continuous. There are a lot of examples of discrete variables which produce integers as data but this doesn't seem to be the definition and I can think of many examples which do not adhere to this. For example:

X = "The number of blonde people divided by the total number of people in the elevator in my office whenever the door opens on the 5th floor." This random variable could yield rational numbers like 7/9 that are not integers, but which seem to be discrete. Is this discrete?

or X = "The length of a hypotenuse c, of a right angle triangle, where the lengths of sides a and b are determined by the roll of two 6 sided dice." Is this a discrete variable? I think it is but I'm not sure. There are only 36 possible lengths of hypotenuse c, but there can be irrational numbers like the square root of 2.

Or what if we defined that last example more mathematically and didn't constrain the lengths of sides a and b to 36 combinations?

Like, X = "the square root of a^2 + b^2, where a and b are any two random integers."
Now there are an infinite number of possible outcomes. Is this variable discrete? I still think it is, but I'm not sure because the definition of discrete and continuous seems a bit vague.

Tell me if you think this is an okay definition for a continuous variable : "A variable that can have an infinite number of possible values within ANY selected range." So in the zoo example that Sal gives at , if you look for any value, even within the range of 1 elephant, you can get an infinite number of possible values. And then discrete is anything that doesn't meet this strict definition of continuous. Does this sound right?
• Good points. Your definition is very close, but to spare yourself a few technicalities (the range of 0 elephants, for example), I would use the definition:
"A discrete variable is one that can take on finitely many, or countably infinitely many values", whereas a continuous random variable is one that is not discrete, i.e. "can take on uncountably infinitely many values", such as a spectrum of real numbers.
Your Pythagorean X is a good example. Although there are infinitely many possible values, they are still countable (because the combinations of a and b are countable), so X is indeed discrete.
• Would the winning time for a horse running in the Kentucky Derby (measured at 121 seconds or 121.25 seconds, for example) be classified as a discrete or continuous variable ?
• Based on the video, it depends on how time is recorded.

For a digital clock with a precision of 1/10,000 of a second, the number of discrete outcomes between 0 and 1 second (exclusive) is 9,999 ( 1/10,000 ... 9,999/10,000 ). Digital clocks and mechanical clocks with ratchets (the ones that tick) all produce discrete positions and the random variable would be discrete.

For a mechanical clock with a sweeping hand--no ratchet (doesn't tick)--the number of outcomes between 0 and 1 second would be infinite. Position the hand between 0 and 1. Now move the hand toward 0, then toward 1, now toward 0, and so on. You could put the hand in a new position each time and it would never repeat any previous position. The random variable is continuous.
• the exact time of the running time in the 2016 Olympics even in the hundredths is still continuous because it is still very hard to get to count a hundredth of a minute. If we do this couldn't we even count thousandths. That was my only problem but still great video and is helping me a lot for my slope test. Way better than my textbook, but still that was kind of confusing.
• I think the point being made is that the exact time it takes to do something is a continuous, while any sort of measurement and recording of the time, no matter how precise it may seem, is discrete since we have to cut off that precision at some point when measuring.
• and conversely, sometimes a discrete variable is actually treated continuously, such as population growth, even though strictly you can't have divisions of people , (what is a 13.43 people?) THe reason why is because we can use the tools of calculus to analyze population growth, and also because the sample space is so large (in the millions or billions), that it is relatively continuous. of course if your population is tiny you might want to use a discrete variable.