# Discrete and Continuous Random Variables

## Variables that take on a finite number of distinct values and those that take on an infinite number of values

Estimated8 minsto complete
%
Progress
Practice Discrete and Continuous Random Variables

MEMORY METER
This indicates how strong in your memory this concept is
Progress
Estimated8 minsto complete
%
Discrete and Continuous Random Variables

### Discrete and Continuous Random Variables

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 \begin{align*}\frac{233}{2}\end{align*} 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.

#### 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 \begin{align*}X\end{align*} 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.

#### Looking at Different Types of Random Variables

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\begin{align*}-\end{align*}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.

#### Examples of Discrete Random Variables

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 \begin{align*}X\end{align*}, then \begin{align*}x = 0, 1, 2, 3, \ldots\end{align*}. Note that \begin{align*}X\end{align*} 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.)

#### Examples of Continuous Random Variables

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 \begin{align*}X\end{align*}, then \begin{align*}x > 0\end{align*} and less than some maximum value possible, but it can take on any value within this range.

### Examples

For the following situations, determine whether a discrete or continuous random variable is involved.

#### Example 1

The number of hairs on a sea otter.

Since hairs are something we can count, this is a discrete random variable.

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.

#### Example 2

The length of a sea otter.

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.

#### Example 3

The age of a sea otter.

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.

### Review

For 1-10, determine whether each situation is a discrete or continuous random variable, or if it is neither.

1. The number of cats in a shelter at any given time.
2. The weight of newborn babies.
3. The weight of a book in the library.
4. The types of book in the library.
5. The number of books in the library.
6. The average number of stars a business is rated online.
7. The grade given to a student, as a letter.
8. The grade given to a student, as a percentage.
9. The number of days someone lives.
10. The length of time someone lives.

To view the Review answers, open this PDF file and look for section 4.1.

### Notes/Highlights Having trouble? Report an issue.

Color Highlighted Text Notes

### Vocabulary Language: English

TermDefinition
continuous variables A continuous variable is a variable that takes on any value within the limits of the variable.
discrete random variables Discrete random variables represent the number of distinct values that can be counted of an event.
random variables Random variables are quantities that take on different values depending on chance, or probability.