# The Definition

### From MM*Stat International

English |

Português |

Français |

Español |

Italiano |

Nederlands |

Definition:
A random variable is a function that assigns (real) numbers to the results of an experiment. Each possible outcome of the experiment (i.e. value of the corresponding random variable) occurs with a certain probability.
: random variable: results of experiments—the values of the random variable
A random variable is created by assigning a real number to each event (an outcome of an experiment). The event is an element of the set of all possible outcomes of an experiment. The random variable is then defined by a function that maps the elements of the set with numbers on the real line.

### Enhanced Example

The government carried out a socioeconomic study that examined the relationship between the size of a household and its lifestyle choices. Let us assume that the government has obtained the following results: .... The set of the possible outcomes from the experiment consists of the following events: .We assign a real number to each event :

The resulting random variable is defined as the size of the household. The set of possible values of this random variable is , this means that the possible results of this random variable are .

### The Experiment

Two outcomes are possible if you toss a coin: heads (h) or tails (t). Let us consider three tosses (). Our experiment will examine the number (n) of tails obtained in three tosses of a coin. There are 8 possible () outcomes of this experiment The random variable for this experiment assigns a real number to each element of based on the number of tails appearing in the tosses. For example:Tails appear once (): This random variable “works” in the following way: The corresponding random variable, denoted by the capital letter , is defined as This definition implies that the value of the random variable has to be one of the following 4 numbers: .

### More Information

A random variable is a function that assigns real numbers to the outcomes of an experiment. Random variables (i.e., the functions) are usually denoted by capital letters. The value of a random variable (i.e., a realization) is not known we conduct the experiment. A realization of a random variable is obtained only observing the outcome of the experiment. The realization of random variables are usually denoted by small letters. This notation allows us to distinguish the random variable from its realization. In practice, we usually only have the realizations of the random variables. The goal of statistics is to use these values to obtain the properties of the (unknown) random variable that generates these observations.