Definition

A random variable is a function that assigns a real number to each element of the sample space of a random experiment. The sample space of a random experiment is the set of all possible outcomes of the random experiment.

A discrete random variable is a function whose sample space contains a countable number of elements. A continuous random variable is a function whose sample space is uncountable; for example, an interval of real numbers or the entire real number line.

Discrete random variable examples

Consider the random experiment of flipping a coin. The sample space can be written as {H,T}. Let X = 0 if the outcome is heads and X = 1 if the outcome is tails. Then X is a random variable. We could write this as X(H) = 0 and X(T) = 1. Let's suppose that the coin is not fair, so that Pr(H) = .75 and Pr(T) = .25. Then we can assign probabilities to the random variable: P(X=0) = .75 and P(X=1) = .25.

We can define many different random variables for this experiment. For example, another random variable, Y, can be defined by letting Y = 6 if the outcome is heads and Y = -2 if the outcome is tails. Then Pr(Y=6) = .75 and Pr(Y=-2) = .25.

Another random experiment is the roll of a die. The sample space is {1,2,3,4,5,6}. One possible definition for a random variable is the face value of the die, X = 1 if we roll a "1", X = 2 if we roll a "2", etc. Another random variable is Y = 1 if we see a 1, 3, or 5 and Y = 0 if we see a 2, 4, or 6. The random variable tells us whether the outcome is odd or even.

Continuous random variable examples

Consider the random experiment of throwing a dart at a dartboard and measuring the distance of the dart from the center of the board. A dartboard is 18 inches in diameter, so the maximum distance from the center is 9 inches. The sample space is the interval of real numbers [0,9]. One random variable is X = distance, so, for example, X = 3 when the dart hits exactly 3 inches from the center. Another random variable is Y = 9 - distance. Then Y = 6 when the dart hits exactly 3 inches from the center. Y obviously measures the distance from the edge of the board.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.