In this Concept, you will learn how to distinguish between discrete and continuous variables.
Watch This
For an introduction to random variables and probability distribution functions (3.0) , see khanacademy, Introduction to Random Variables (12:04).
For examples of discrete and continuous random variables (3.0) , see EducatorVids, Statistics: Random Variables (Discrete or Continuous) (1:54).
Guidance
The word discrete means countable. For example, the number of students in a class is countable, or discrete. The value could be 2, 24, 34, or 135 students, but it cannot be or 12.23 students. The cost of a loaf of bread is also discrete; it could be $3.17, for example, where we are counting dollars and cents, but it cannot include fractions of a cent.
On the other hand, if we are measuring the tire pressure in an automobile, we are dealing with a continuous random variable. The air pressure can take values from 0 psi to some large amount that would cause the tire to burst. Another example is the height of your fellow students in your classroom. The values could be anywhere from, say, 4.5 feet to 7.2 feet. In general, quantities such as pressure, height, mass, weight, density, volume, temperature, and distance are examples of continuous random variables. Discrete random variables would usually come from counting, say, the number of chickens in a coop, the number of passing scores on an exam, or the number of voters who showed up to the polls.
Between any two values of a continuous random variable, there are an infinite number of other valid values. This is not the case for discrete random variables, because between any two discrete values, there is an integer number (0, 1, 2, ...) of valid values. Discrete random variables are considered countable values, since you could count a whole number of them. In this chapter, we will only describe and discuss discrete random variables and the aspects that make them important for the study of statistics.
Discrete Random Variables and Continuous Random Variables
In real life, most of our observations are in the form of numerical data that are the observed values of what are called random variables . In this chapter, we will study random variables and learn how to find probabilities of specific numerical outcomes.
The number of cars in a parking lot, the average daily rainfall in inches, the number of defective tires in a production line, and the weight in kilograms of an African elephant cub are all examples of quantitative variables .
If we let represent a quantitative variable that can be measured or observed, then we will be interested in finding the numerical value of this quantitative variable. A random variable is a function that maps the elements of the sample space to a set of numbers.
Example A
Three voters are asked whether they are in favor of building a charter school in a certain district. Each voter’s response is recorded as 'Yes (Y)' or 'No (N)'. What are the random variables that could be of interest in this experiment?
As you may notice, the simple events in this experiment are not numerical in nature, since each outcome is either a 'Yes' or a 'No'. However, one random variable of interest is the number of voters who are in favor of building the school.
The table below shows all the possible outcomes from a sample of three voters. Notice that we assigned 3 to the first simple event (3 'Yes' votes), 2 to the second (2 'Yes' votes), 1 to the third (1 'Yes' vote), and 0 to the fourth (0 'Yes' votes).
Voter #1 | Voter #2 | Voter #3 | Value of Random Variable (number of Yes votes) | |
---|---|---|---|---|
1 | Y | Y | Y | 3 |
2 | Y | Y | N | 2 |
3 | Y | N | Y | 2 |
4 | N | Y | Y | 2 |
5 | Y | N | N | 1 |
6 | N | Y | N | 1 |
7 | N | N | Y | 1 |
8 | N | N | N | 0 |
Figure: Possible outcomes of the random variable in this example from three voters.
In the light of this example, what do we mean by random variable? The adjective 'random' means that the experiment may result in one of several possible values of the variable. For example, if the experiment is to count the number of customers who use the drive-up window in a fast-food restaurant between the hours of 8 AM and 11 AM, the random variable here is the number of customers who drive up within this time interval. This number varies from day to day, depending on random phenomena, such as today’s weather, among other things. Thus, we say that the possible values of this random variable range from 0 to the maximum number that the restaurant can handle.
There are two types of random variables discrete and continuous. Random variables that can assume only a countable number of values are called discrete . Random variables that can take on any of the countless number of values in an interval are called continuous .
Example B
The following are examples of discrete random variables :
- The number of cars sold by a car dealer in one month
- The number of students who were protesting the tuition increase last semester
- The number of applicants who have applied for a vacant position at a company
- The number of typographical errors in a rough draft of a book
For each of these, if the variable is , then . Note that can become very large. (In statistics, when we are talking about the random variable itself, we write the variable in uppercase, and when we are talking about the values of the random variable, we write the variable in lowercase.)
Example C
The following are examples of continuous random variables .
- The length of time it takes a truck driver to go from New York City to Miami
- The depth of drilling to find oil
- The weight of a truck in a truck-weighing station
- The amount of water in a 12-ounce bottle
For each of these, if the variable is , then and less than some maximum value possible, but it can take on any value within this range.
Vocabulary
A random variable represents the numerical value of a simple event of an experiment.
Random variables that can assume only a countable number of values are called discrete .
Random variables that can take on any of the countless number of values in an interval are called continuous .
Guided Practice
For the following situations, determine whether a discrete or continuous random variable is involved.
a. The number of hairs on a sea otter.
b. The length of a sea otter.
c. The age of a sea otter.
Solution:
a. Since hairs are something we can count, this is a discrete random variable. Sea otters actually have between 850,000 to 1 million hairs per square inch according to the following website:
http://www.seaotter-sealion.org/seaotter/factsseaotter.html
Even though the number of hairs may be very large, that we wouldn't actually want to count them, there are no "half hairs" or fractional amounts of hair, only whole number amounts of hairs.
b. The length is typically considered a continuous variable, since, a sea otter will typically not measure exactly 5 feet, but the length will differ by some fraction of a foot.
c. Age can sometimes be treated as discrete or continuous. For example, we generally report age as only a number of years, but sometimes we talk about a sea otter being 3 and half years old. Technically, since age can be treated as a continuous random variable, then that is what it is considered, unless we have a reason to treat it as a discrete variable.
Practice
For 1-10, determine whether each situation is a discrete or continuous random variable, or if it is neither.
- The number of cats in a shelter at any given time.
- The weight of newborn babies.
- The weight of a book in the library.
- The types of book in the library.
- The number of books in the library.
- The average number of stars a business is rated online.
- The grade given to a student, as a letter.
- The grade given to a student, as a percentage.
- The number of days someone lives.
- The length of time someone lives.
Keywords
Continuous
Discrete
Quantitative variables
Random variables