# Discrete and continuous random variables | Probability and Statistics | Khan Academy

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
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.

### 100 Replies to “Discrete and continuous random variables | Probability and Statistics | Khan Academy”

1. Glen Coco says:

lol Yes, Usain won the 100m

2. deborah achor says:

thanks a lot,i was reading my course material and i did not understand anything.but with this video there is clarity and simplicity

3. Shubham Mishra says:

Great video
Usain Bolt won though

4. Divine_Cosmetology says:

I like the ant example.

5. Divine_Cosmetology says:

Bolt did win right? Lol.

6. yayatoure 442 says:

Thank u so much man, really appreciate it

7. Mohammed Sameer says:

Usain Bolt won though lol

8. Shawn Huetter says:

Love how he called out Bolt would win in the 2016 Olympics!

9. Elizabeth Afu says:

This video helped me so much thank you wish you were my professor! thank you thank you thank you!!!!

10. -. says:

استفدت كثيرا 👍+ صوتك رائع ما شاء الله. thank u so muce

11. Thomas Ip says:

You are a lot clearer than my teacher!

12. Tami Provost says:

Great lesson and visuals! Thanks so much! 🙂

13. shida othman says:

I didnt get the last part. Does this means if it is rounded up by nearest thousand, it will be a discrete rv? Does this means 9.56, 9.57, 9.57 are discrete?

14. ThyG says:

WTF Sal grew up in a zoo!!!!!

15. Prabin Ojha says:

2:36
bro, you grew up in a zoo?
XD

16. litso schastlivyy says:

i know this sounds silly, but i think he's wrong Y is a discrete variable because it has a clear beginning and end. could some one help me understand or show me how I'm wrong. I just want to know? Also i do respect the guy his videos are awesome.

17. Fernando Pellegrini says:

I´ve finally understood the difference thanks!

18. Nishchay Sandhu says:

"We're not talking about random variables that are polite" LOL 😛

19. Mayank Bhandari says:

I personally think that Discrete random variable can be identified by a simple test as following, "If bound in a range given by two finite numbers, if the random variable takes infinite values then it cannot be a discrete random variable".

20. Augustina Oguntimehin says:

bolt 2016

21. matieking says:

Bacteria aren't animals tho.

22. Maria saidawi says:

Thanks a lot… I finally understood them.

23. Pink Flower says:

Thank you khan academy very much 😍😍😍

24. Ahmed Khaled says:

bacteria are not animals :/

25. indo mamoro says:

why do math teachers ALWAYS incorporate RANDOM stuff into the lessen just like he did with usain bolt and He's aging lol
my math teacher brought up a drawing she did when she was a kid for a geometry lesson 😂 it's kinda funny honestly

theory of randomness. new theory of random variables with accuracy of more than 90 %. or more. that is. principios de teoria del azar : cualquier clace de variables aleatorias siempre encontraremos cantidades no homogeneas. agrupacion irregular de datos. principio de.bipolarida, esto lo encontramos cuando tenemos valores medios de.vibracion de datos. las resultantes se pueden ir por igual monto tanto a valores positivos como negativos. en historic data estan los artificios matematicos para predecir.el futuro indudablemente. unfortunately for the.scientific community this theory and others are not available for usa. and therefore for no country. sorry

27. Rottie Mom says:

what if you don't know what the numbers represent? how then can you figure it out? is this set of values discrete {6,7,5,2,9,12,3,8} ? if so, why? what about this one? {3.14159, 2.71828, 1.61803, 1.41421, 0.37396} , would those be considered continuous because they are decimals?

28. ScilexGuitar says:

He actually predicted the 100 m dash four years in advance :O Thats impressive

29. Sunny shah says:

There are more numbers between 0 and 1
then from 0 to positive Infinity

30. Nathaniel Mardones says:

In the lecture I attended, the teacher said the best way to tell the diference is to see if the numbers the random variable takes are natural numbers then it's likely a discrete variable, on the other hand if the value the random variable takes is a real number then it might be a continous random variable.

31. T Crew says:

I'm still confused

32. romeo Fuertes says:

thanks your a big help i hope you have input some test on your video

33. P D says:

34. ResidentScrub says:

Space ants!! The Sandkings are coming 😱

35. Dibyajyoti Samal says:

Ants have already figured out interstellar travelling.

Illuminati confirmed.

36. TCRR-97 says:

I did not understand that 1 hour of math class teaching, and now it makes sense. Thank you!

37. Nick Li says:

what if the unverse is infinite, is the ants still a discrete rv?

38. Andrew Zhu says:

When I read the textbook on this topic, it just made my brain literally hurt. But when Khan explained this same exact topic, I understood it completely and I swear my brain relaxed.

39. Sushma Kumari says:

Basically , an event having whole no.as a value it's discrete and a decimal value is a continuous 😎

40. Oren Jimenez says:

ARIGATO I NEEDED THIS LESSON FOR MY PROJECT

41. hyqhyp says:

Because of QM, both exact mass and exact time are discrete. Which begs the question, are there any physical continuous variables? Remember … as per the title of Hawking's book … the rest is man's work.

Ants figure out intrestellar kind of thing

43. Monisha Anila says:

Classic explanation!!! 😊

44. Vishnu says:

We ain't talkin about random variables that are polite. Lol

45. Ali Dubai says:

and yes it was usain bolt

those of you were wondering,an average elephant would weigh 2700-6000 kg depending upon the specie

47. grecia white says:

"well they arre limited by the speed of light" lol sal

48. Lindie Lewinski says:

Had a good laugh when he said "we are not talking about polite random variable" LOL thats funny.

49. Benjamin Dominguez says:

LMAO " We are not talking about variables that are polite." Sal said this in such a way that just made me crack me up

50. Billy Lampa says:

REALLY LOVE ❤❤ your video bro.
– 1st year university student, PHL

51. Max Harrison says:

I feel you got a bit side tracked on this video.

52. alexas hayes says:

Excellent video!!

53. Prateek gUpta says:

The distribution of profits of a blue -chip company relates to discrete or continuous variable?

54. jafar vali Shaik says:

Very Nice explanation on discrete vs continuous variables

55. Andre panganiban says:

That last example enlightened me. Thanks for this vid

56. Najam Siddiqui says:

Basically ALL measurement quantities are continuous random variables.

57. life lover says:

This helped me a lot 😊
God bless you🙏

58. not herbivore says:

mass of elephant (largest) 10886.217kg ?
Don't think it is useful though

59. J Phil says:

So are Likert scale points discrete or continuous? Discrete, right? But are answers to several Likert questions, when combined, for linear regression? Or logistical regression?

60. Mic Lubijar says:

Can random variable have decimal value???

61. harry james says:

I honestly don't know where I'd be without you Sal !

62. Eino L says:

Now the exact winning time is also a discrete random value

63. MANMOHAN SINGH says:

I really wish my lecturer were close to being this good at teaching

64. jonathan Mulugeta says:

thank you

65. Jimmy Denzel says:

nice one

What is statistics

67. Ahlam ahmed says:

Here is a student from Saudi.
Thanks.

68. John Bassey says:

The mass of a massive elephant is approximately 6000 kg 🙂

69. Saurabh Sharma says:

@ 9:13 Usain actually won that one too!😂😂

70. roseobregon says:

Thanks for the great examples! It cleared up a lot of confusion!

71. Brian Kipkoros says:

1985 – J Cole's birthday

72. NO 1 SCIENCE CLLASS says:

Nice Video 😊😊😊😊😊😊😊😊😊👌👌👌👌👌👌👌👌👌👌👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👌👌👌👌😊😊👌👌👌👌👍👍👍

bluw whales can weigh around 190,000kgs and whale sharks about 11,800Kgs.

74. Lethabo says:

you are literally amazing yho

75. JESSICA SEHRAWAT says:

Explain in hindi

76. Sigge says:

For those who don't quite understand, discrete R.V is for counting; continous R.V is for measuring.

77. Sonam Naik says:

thank u💕

78. Mahesh Dhamija says:

Sir what you say we can't understand pls say clearly

79. new account new account says:

did he said new orleans zoo where i grew up. xd. great video though thanks

80. KingLegend76 says:

Argued this with my friend today and he kept saying I was wrong when I was saying continuous is where it is like an irrational number, they can have no ending, no precise number, or infinite values within two numbers, I knew I was right

81. Roberto Silva says:

Thank you very much, it was a very clear and helpful explanation

82. stella unya says:

Thank you^^

83. Cao Jing says:

as usual very boring lectures

85. Anuj Verma says:

What if I had a range of values (such as the mass referred here) but to a given precision (like 2 decimal places)? Would that be discrete or random?

86. pragati parmar says:

just a suggestion that you should have to speak a little clear and loud. In the video you pitch is high in the starting and then slowly the sound disappears

87. Cherry Mae Remedios says:

88. Diosette Polinne Fabularum says:

Lemony Snicket?

89. Jatayu Baxi says:

Best explanation.

90. Controversy Owl says:

Any instrument used to measure time will always have to be rounded or cut off some accuracy, since time is infinitely dense and cannot be measured to the exact value, so any measurements, and any units, of time that one will come across, in actual life and practice, will always be discrete, and the only difference between instruments would be accuracy and less or more discreteness on some place on a spectrum between discrete to truly continuous.

It's the same with mass. Any animal measured with any instrument will produce discrete values, so when do we treat the data recorded as discrete or continuous? Is it based on our intentions? Do I treat a set of data, such as the mass of animals, as discrete if the discrete and inaccurate values are the only thing of consequence to what I am doing, but then continuous if I am concerned with accuracy, but I have used those discrete values by virtue of the fact that my instruments are limited, but I would measure more accurately if it were possible? The data would be the exact same, but I want only the discrete values in the first situation, and I am restricted to them in the second

Much like when you talk about the 100 m sprint that rounded to the nearest 100th, you class this as discrete. What if I have the exact same set of data, but it is because my instruments are not accurate enough?

I find it odd that whether with consider data to be discrete or continuous, and follow through with using the models of the problem that warranted given either a continuous or discrete variable is based on what we intend to measure, rather than the actual data itself? In reality, every possibly continuous type of data is going to be rounded, like the sprint example, and therefore become regarded as discrete

Polite random variables

92. Ghost Chixo says:

Is this science or math because I’m trying to do math and he’s doing science I don’t understand this at all

Thank you, sir.
Discrete random variables cannot be broken down into decimals or fractions.
There is no half an ant or half a person. but there can be half a second and one-fourth of a meter.
Discrete things are counted.
continuous things are measured.

94. Manoj Singh says:

😞

95. Sidharth S says:

Mass:

50,000 – 150,000 kg

4:12

96. Princess Meimban says:

I thought i lost hope in understanding the discrete and continuos r.v ….then i watched this video!! IT WAS SO EASY to understand thanks

97. Chuu Yang says:

Thank you for this! It helped a lot.

98. MITHURAJ DAS says:

a good example of continuous random variable:Reading the temperature of a room throughout the day ,its continuous since the temperature does not jump from 20 degrees to 22 degrees.so its continuous process.

99. Rachel Kimemia says:

merci beaucoup Monsieur 🙂

100. Sai Anirudh says:

10:07 is time continuous?