Recall that a random variable is simply a function from the sample space  to the real numbers , mapping each elementary outcome  to a number. Formally, there is no reason not to define several such functions,  such that for each  we get a set of numbers .
 
We present some basic theory for discrete random variables. Let  and  be discrete random variables defined on the same sample space . Their joint probability mass function is
As in earlier chapters, we concentrate on discrete random variables taking non-negative integer values.