MathProbabilityRandom variables and their properties

The concept of a random variable

7 minutes read

This topic will deal with the concept of a random variable:

  • the idea of a random variable;
  • mathematical definition of a random variable;
  • types of random variables.

This concept is essential for describing any trial in the modern world of data, and applies to spheres from biology and physics to economics and business. Understanding this concept makes the results of probabilistic experiments explainable and interpretable. In other words, it allows us to numerically describe any procedure with a well-defined set of possible outcomes.

Idea of a random variable

Let's introduce the idea of a random variable through a simple example.

Example 1: Exam.

Suppose that an exam in probability theory has 10 exam tickets. You probably know the exam rules. At first, students randomly take a ticket. Then she/he receives a grade according to the answer. In this model, a probabilistic experiment (picking a ticket at random) has 10 possible outcomes (ticket numbers). It also contains the random variable (the final grade), which is the function of student readiness for the ticket.

Below are the properties of a random variable:

  • random variables assign values to each of an experiment's outcomes;
  • you can have several random variables defined on one sample space;
  • typically, random variables are denoted in capital letters.

Let's return to the considered example and show the fulfillment of these properties.

Example 1: Exam (continuation).

Let Xavi (row X in the table below) be a rather well-prepared student: he knows the answers for the first five tickets for an "A", for the next 4 tickets for a "B", and the last answer he knows for a "C". Let Yosef (row Y in the table below) be an excellent student: he knows the answers for the first nine tickets for an "A", and for the last one for a "B". Thus, in our probabilistic experiment, we could have several random variables denoted by capital X, Y that assign the value of the final grade to each outcome ticket number.

sample space and random variables

ticket number->x/y->grade

Mathematical definition: a random variable is any real function defined on the sample space, i.e. the set of all possible experiment outcomes. Random variables can take discrete or continuous values.

Discrete random variables

Definition: Discrete random variables are random variables that can take distinct or separate values.

Example 2: Coin toss.

Consider an experiment in which you flip a coin 3 times. The set of possible outcomes is \{ HHH, HHT, HTH, THH, TTH, THT, HTT, TTT \}, where H stands for heads, T stands for tails.

You could have different goals of this experiment. Thus, you would construct its random variables differently. However, distinct outcomes will always have a discrete numerical description. The table below illustrates that. Let X be a random variable equal to the number of heads. Let Y be a random variable equal to 1 if heads and tails are both in the outcome, and otherwise equal to 0. Both of them are discrete.

table of outcomes and discrete probabilities

This was an example of an experiment with the construction of a random variable on a finite set of outcomes. However, a discrete random variable can take even an infinite number of values for any countable sample space. The following experiment will illustrate that.

Example 3: Slot machine.

A player pays 5 dollars for one game at a slot machine with three windows, where numbers from 0 to 9 appear with equal likelihood and independently of each other. If all three numbers match, the player receives 100 dollars, if only two — 10 dollars, otherwise the player leaves with nothing. The player has 15 dollars. How many games could he/she play?

slot machine

In this experiment, the number of games is a random variable. Obviously, the process might end after three pulls of the lever. However, if the player is lucky enough, an unlimited number of games are possible. Hence, the random variable will take an infinite number of values.

Continuous random variables

In many trials, sample spaces can't be countable sets. That's why you can't describe them with discrete random variables. Let's have a look at some examples from real life.

Example 4: Sprint time.

What is the time it takes a given student from the group to sprint 100 meters? Can you count the possible values of the final results? Obviously, you can't, because the runner's time could be any value in a time interval with the lower bound equal to 9.58 seconds, which is Usain Bolt's world record for now.

Example 5: Length of iris sepal.

Botanists know that "Iris setosa"'s sepal length can take any value from 4.3 to 5.8 centimeters. What will be the size of a given plant's sepal? Of course, you can measure it up to a division of the measuring instrument and associate discrete values with each one, but such a definition won't be accurate. In fact, the length can take any value between two division cutoffs. It's also a case when it's correct to talk about continuous random variables.

iris sepal + its length

Definition: Continuous random variables are random variables that can take any value in an interval that can be finite or infinite.

Thus, there are many examples of continuous random variables in the real world. Often, however, you are not interested in the specific values but rather in their distribution laws. The following topic will deal with the ways to find them.

Conclusion

To sum up, this topic has introduced you to the idea of a random variable, its mathematical definition and its types. The following tasks will help you consolidate the material.

7 learners liked this piece of theory. 1 didn't like it. What about you?
Report a typo