What is a Random Variable?

When the numerical value of a variable is determined by a chance event, that variable is called a random variable.

Discrete vs. Continuous Random Variables

Random variables can be discrete or continuous.

  • Discrete. Within a range of numbers, discrete random variables can take on only certain values. Suppose, for example, that we flip a coin and count the number of heads. The number of heads results from a random process - flipping a coin. And the number of heads is represented by an integer value - a number between 0 and plus infinity. Therefore, the number of heads is a discrete random variable.
  • Continuous. Continuous random variables, in contrast, can take on any value within a range of values. For example, suppose we flip a coin many times and compute the average number of heads per flip. The average number of heads per flip results from a random process - flipping a coin. And the average number of heads per flip can take on any value between 0 and 1, even a non-integer value. Therefore, the average number of heads per flip is a continuous random variable.

Discrete Variables: Finite vs. Infinite

Some references state that continuous variables can take on an infinite number of values, but discrete variables cannot. This is incorrect.

  • In some cases, discrete variables can take on only a finite number of values. For example, the number of aces dealt in a poker hand can take on only five values: 0, 1, 2, 3, or 4.
  • In other cases, however, discrete variables can take on an infinite number of values. For example, the number of coin flips that result in heads could be infinitely large.

When comparing discrete and continuous variables, it is more correct to say that continuous variables can always take on an infinite number of values; whereas some discrete variables can take on an infinite number of values, but others cannot.

Test Your Understanding of This Lesson

Problem 1

Which of the following is a discrete random variable?

I. The average height of a randomly selected group of boys.
II. The annual number of sweepstakes winners from New York City.
III. The number of presidential elections in the 20th century.

(A) I only
(B) II only
(C) III only
(D) I and II
(E) II and III

Solution

The correct answer is B.

The annual number of sweepstakes winners is an integer value and it results from a random process; so it is a discrete random variable. The average height of a group of boys could be a non-integer, so it is not a discrete variable. And the number of presidential elections in the 20th century is an integer, but it does not vary and it does not result from a random process; so it is not a random variable.