# The Definition

Definition: A 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 . $X$ : random variable$x_{i},\ (i=1,\dots ,n)$ : results of $n$ experiments—the values of the random variable $X$ A random variable is created by assigning a real number to each $E_{j}$ (an outcome of an experiment). The event $E_{j}$ is an element of the set $S$ of all possible outcomes of an experiment. The random variable is then defined by a function that maps the elements of the set $S$ with numbers on the real line${}$ . $X:E_{j}\rightarrow X(E_{J})=x_{j}$  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: $E_{1}=\{\,{\text{households with one person}}\,\}$ .$E_{1}=\{\,{\text{households with two people}}\,\}$ .$E_{1}=\{\,{\text{households with three people}}\,\}$ .$E_{1}=\{\,{\text{households with four and more people}}\,\}$ . The set of the possible outcomes from the experiment consists of the following events: $S=\{E_{1},E_{2},E_{3},E_{4}\}$ .We assign a real number to each event $E_{i}\in S$ :
 $S$ $R$ $E_{1}$ $\Rightarrow$ $1$ $E_{2}$ $\Rightarrow$ $2$ $E_{3}$ $\Rightarrow$ $3$ $E_{4}$ $\Rightarrow$ $4$ The resulting random variable $X$ is defined as the size of the household. The set of possible values of this random variable is $(1,2,3,4)$ , this means that the possible results of this random variable are $x_{1}=1,x_{2}=2,x_{3}=3,x_{4}=4$ . Two outcomes are possible if you toss a coin: heads (h) or tails (t). Let us consider three tosses ($k=3$ ). Our experiment will examine the number (n) of tails obtained in three tosses of a coin. There are 8 possible ($V^{W}(n;k)=n^{k}\rightarrow V^{W}(2;3)=2^{3}=8$ ) outcomes of this experiment $S=\{hhh,hht,hth,thh,htt,tht,tth,ttt\}$ The random variable for this experiment assigns a real number $(0,1,2,3)$ to each element of $S$ based on the number of tails appearing in the tosses. For example:Tails appear once ($n=1$ ): $\{(hho)\cup (hoh)\cup (ohh)\}$ This random variable “works” in the following way: The corresponding random variable, denoted by the capital letter $X$ , is defined as $X=\{\,{\text{Number (n) of tails in three tosses of the coin}}\,\}{\text{.}}$ This definition implies that the value of the random variable $X$ has to be one of the following 4 numbers: $x_{1}=0;x_{2}=1;x_{3}=2;x_{4}=3$ . 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.