Random Variable
2026-02-28 08:21 Diff

Based on the types of values they can have, random variables are divided into two categories: 
 

  • Discrete random variables 
  • Continuous random variables
     

Discrete Random Variable

There is a finite number of possible values for a discrete random variable. In simple terms, we can say that a specific set of countable values characterizes a discrete random variable.

Let us understand the concept of a discrete random variable through a simple experiment.

Experiment: Toss a fair coin 4 times.
Random variable: Let X be the number of heads obtained. 

Step 1: When tossing the coin 4 times, we might get zero heads, one head, two heads, three heads, or four heads. 
Step 2: The possible values that X can take are: X = {0, 1, 2, 3, 4}. No other values are possible. You cannot get five heads or -1 head, so X is a discrete random variable because it has a countable set of outcomes. 


For a discrete random variable X, the probability of each value is given by the Probability Mass Function (PMF), written as: \(P(X=x_i ) = p_i .\) 
For a discrete random variable, the PMF properties must be satisfied: 

  • Each probability value must lie between 0 and 1. 
    \(0 ≤ p_i  ≤ 1\)
     
  • The sum of all probabilities must be 1:
    \(∑p_i  = 1\)

Continuous Random Variable
 

Continuous random variables have an endless number of possible values and can take any value within a given range or interval. It can have an infinite number of possible values.

Let us understand the concept of a continuous random variable through an experiment. 

Experiment: Measure the total rainfall in a city over one year.
Random variable: Let X be the annual rainfall amount (in inches).

Step 1: Rainfall is measured on a continuous scale. It can be: 30 inches, 30.5 inches, 30.75 inches, 30.752 inches, or any value in between. 
Step 2: The number of possible values is countless, because we can measure to: tenth (0.1), hundredth (0.01), thousandth (0.001), and so on. So the set of values X can take is an interval, not a fixed list. Thus, rainfall X is a continuous random variable. 

The probability model for a continuous random variable is called the Probability Density Function (PDF). For a continuous variable X, the probability that its value lies in a small interval is: 
P(x < X < x + dx) ≈ f(x) dx
Here, 
f(x) = value of the PDF at point x 
dx = tiny width of the interval.


The PDF characteristics are: 

  • The PDF is never negative and never exceeds 1: 
    \(​​​​​​​0 ≤ f(x) ≤ 1\).
     
  • The total under the PDF curve over all possible values of X is: 
    \(​​​​​​​∫ f(x)dx = 1\).