This briefly introduces random variables and discusses discrete random variables. This is prerequisite material for Continuous Random Variables.
What is a Random Variable?
A random variable (r.v.) is simply a function from the sample space to some real number. So an r.v. .
Let’s understand through an example!
Dice Roll Experiment
Imagine rolling a 6-sided dice.
Example 1: You could consider an r.v. as double roll from the dice. So takes in the sample space, all the possible rolls you can get, and returns a real number - in this case, double the roll.
.
.
.
In general,
.
Example 2: We could also consider another r.v. as the square of the roll.
.
.
Example 3: We could consider another r.v. as a function for whether the roll is even or not.
These examples are to show there are many different random variables you can define for a single experiment; in fact, there are an uncountable number of functions that map to , so there are an uncountable number of random variables!
Discrete Random Variables
A Discrete Random Variable (d.r.v.) is a r.v. with a countable (or finite) sample space.
Discrete vs Continuous RVs
If you want random variables for the dice roll experiment above, they will all be discrete random variables because the sample space () is finite.
Alternatively, if you have an experiment for where a truly random value (between 0-1) lies then the random variables for this will all be continuous because the sample space () is countably infinite.