Random variables Knowledge-Based Study
Math topic explanations on Random variables.
Study notes
What is a Random Variable?
In probability theory, the outcome of a random process is often described using numerical values. A random variable is a rule or mathematical function that assigns a real number to each possible outcome in the sample space of a random experiment.
By convention, random variables are denoted by capital letters, such as , , or . The specific numerical values that these variables can take are represented by lowercase letters, such as , , or .
Example
Consider an experiment where a fair coin is tossed twice. The sample space is:
Let the random variable denote the total number of heads obtained. The function assigns a real number to each outcome:
Thus, the possible values that the random variable can take are , , and .
Discrete vs. Continuous Random Variables
Random variables are classified into two broad categories based on the nature of their possible values:
1. Discrete Random Variables
A random variable is discrete if its set of possible values is finite or countably infinite. These values typically result from counting processes.
- The number of defective items in a batch of 100 products.
- The number of rolls required before getting a 6 on a fair die.
- The number of customer arrivals at a service desk during a one-hour period.
2. Continuous Random Variables
A random variable is continuous if it can take any real value within a given interval or collection of intervals. Continuous random variables typically result from measurements.
- The exact time a battery lasts before failing.
- The height or weight of an individual selected at random.
- The ambient temperature recorded at noon at a weather station.
The Probability Mass Function (PMF)
The probability distribution of a discrete random variable describes how the total probability of 1 is distributed among its possible values. For a discrete random variable , this is defined by its probability mass function (PMF), denoted as or .
Fundamental Properties
For any valid discrete probability mass function:
- Non-negativity: for every possible value .
- Total probability: The sum of the probabilities over all possible outcomes must equal 1:
Example
Returning to the two-coin toss where represents the number of heads, assuming all 4 outcomes are equally likely with probability :
We verify the total probability:
Summary Measures of a Discrete Random Variable
Two key numerical measures characterize the behavior of a discrete random variable: its expected value and its variance.
Expected Value (Mean)
The expected value, denoted as or , represents the long-run theoretical average value of . It is calculated as the probability-weighted sum of all possible values:
Variance and Standard Deviation
The variance, denoted as or , measures the dispersion or spread of the values of around the mean :
The standard deviation is the positive square root of the variance: .
Example Calculation
For the number of heads in two fair coin tosses:
On average, one head is expected per two tosses, with a variance of 0.5.

