In An Introduction to Probability we illustrated how probability can be used to make an inference about a population from a set of data that is observed from an experiment. Most of these experiments were simple events that were described in words and denoted by capital letters. However, in real life, most of our observations are in the form of numerical data. These data are observed values of what we call random variables. In this chapter, we will study random variables and learn how to find probabilities of specific numerical outcomes.
Recall that we defined an experiment as a process in which a measurement is obtained. For example, counting the number of cars in a parking lot, measuring the average daily rainfall in inches, counting the number of defective tires in a production line, or measuring the weight in kilograms of an African elephant cub. All these are called quantitative variables.
If we let represent a quantitative variable that can be measured or observed in an experiment, then we will be interested in finding the numerical value of this quantitative variable. For example, the weight in kg of an African elephant cub. If, however, the quantitative variable takes a random outcome, we refer to it as a random variable.
A random variable represents the numerical value of a simple event of an experiment.
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 to the first simple event ( yes votes), ( yes votes) to the second, to the third ( yes vote), and to the fourth ( yes votes).
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 the 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 none to a maximum number that the restaurant can handle.
There are two types of random variables, discrete and continuous. In this chapter, we will only describe and discuss discrete random variables and the aspects that make them important for the study of statistics.