In the previous segment, you learnt how to calculate the probability of an event. Suppose the event is that it rains on a given day. Now, this event has a probability associated with it. In this case, the event – whether it rains or not – is random. In other words, there are certain probabilities associated with the events, and hence, the event cannot be accurately predicted beforehand.
A random variable maps the outcomes of such probabilistic processes to numerical values. Let's understand this in greater detail from Thomas.
Note: In the above video at 1:12, Thomas means to say 'example of the coin' rather than 'example of the die'.
In this video, you learnt that a random variable maps the outcome of a random process to a numerical value.
Let’s say that you are tossing a coin, which is a random process. You can define a random variable X that takes the value 10.5 if the outcome is ‘heads’ and 15.7 if the outcome is ‘tails’. In this case, the probability of getting heads will be denoted by P(X = 10.5), and that of getting tails will be denoted by P(X = 15.7). If we use a fair coin, both these values will be equal to ½.
It is important to note that even if a process inherently produces numerical outcomes, such as the roll of a die, a random variable can be defined such that it alters the numerical outcomes. For example, define a random variable Y as twice the number that appears on the face of a die when you roll it. In this case, your random variable Y takes the values 2, 4, 6, 8, 10 and 12 when the face of the die shows 1, 2, 3, 4, 5 and 6, respectively.
You also learnt about the types of random variables.
Discrete random variables can be sequentially listed down while continuous random variables cannot be sequentially listed down as there is an infinite number of values that a continuous random variable can take in any interval.
Let’s say a random variable X is defined as the height of an individual in inches rounded off to two decimal places. In this case, we can clearly list all the values that X can take. For instance, between 100 and 101 inches, X can take the values 100.00, 100.01, 100.02, 100.03, . . . , 100.98, 100.99, or 101.00. Even though the number of values that X can take is huge, it is still a discrete random variable as you can list all the values distinctly.
Now, suppose a random variable Y is defined as the exact height of an individual in inches. In this case, Y can take an infinite number of values in any interval. Hence, you cannot list all the values that Y can take. Therefore, Y is a continuous random variable.
Additionally, with the help of an example, you learnt that how to construct a probability distribution for a discrete random variable. The probability distribution of a discrete random variable is also referred to as a probability mass function.
A probability distribution is a form of representation that tells us the probability for all the possible values of X. It could be any of the following:
An equation
P(x) = x/21
(for x = 1, 2, 3, 4, 5 and 6)
A table
A graph
An important point to note is that the sum of the probabilities of all the outcomes must be equal to 1. So, if the probability of getting heads on tossing a coin is 0.7, the probability of not getting heads (i.e., getting tails) must be 0.3 so that the sum of the probabilities of all possible outcomes equals 1.
Now, the upcoming segment will show you how the measures of central tendency for a discrete random variable distribution can be calculated with the help of an example.