Discrete and Continuous Random Variables
There are two important classes of random variables: discrete random variables and continuous random variables.
Discrete Random Variable
A random variable is called discrete if its range (the set of values that it can take) is finite or at most countably infinite. A random variable that can take an uncountably infinite number of values is not discrete. For an example, consider the experiment of choosing a point a from the interval [−1, 1]. The random variable that associates the numerical value to the outcome a is not discrete since the range is [0, 1]. On the other hand, the random variable that associates with a the numerical value
is discrete.
For a discrete random variable X, we define the probability mass function (pmf) of X by
Note that is a valid pmf if and only if the following condition is satisfied.
where is the range of the random variable X.
The CDF of a random variable is defined as:
For a discrete random variable with range (with ):
Types of Discrete Random Variables
Bernoulli Random Vadriable
Consider the toss of a biased coin, which comes up a head with probability p, and a tail with probability 1 − p. The Bernoulli random variable takes the two values 1 and 0, depending on whether the outcome is a head or a tail:
The probability mass function (pmf) of the Bernoulli random variable is given by
The cumulative distribution function (cdf) of the Bernoulli random variable is given by
Binomial Random Variable
A biased coin is tossed n times. At each toss, the coin comes up a head with probability p, and a tail with probability , independently of prior tosses. The sample space is given by the set of all possible tuples
of H, T combinations. For the case of n = 4, the sample space is as given below:
For any , is defined as the number of heads in . The range of values which the random variable X takes is . The probability mass function (pmf) of the random variable X is given by
This random variable is known as binomial random variable. Note that the above pmf is a valid pmf as it sums to 1.
Geometric Random Variable
Suppose that we repeatedly and independently toss a biased coin with probability of a head p, where till a head comes up for the first time. The sample space corresponding to the experiment is given by
For any , is defined as the number of tosses in . The range of values which the random variable X takes is . The probability mass function (pmf) of the random variable X is given by
This random variable is known as geometric random variable. Note that the above pmf is a valid pmf as it sums to 1.
Poisson Random Variable
A poisson random variable takes nonnegative integer values. Its pmf is given by
Note that the above pmf is a valid pmf as it sums to 1.
An important property of the Poisson random variable is that it may be used to approximate a binomial random variable when the binomial parameter n is large and p is small.
Continuous Random Variables
Random variables with a continuous range of possible values are common. For example, the exact velocity of a vehicle on a highway is a continuous random variable. The CDF of a continuous random variable is a continuous function, meaning it does not have jumps. This aligns with the fact that for all .
For a continuous random variable , the probability of it taking any single value is zero, so we use a Probability Density Function (PDF), denoted , to describe its distribution.
The PDF is defined as the derivative of the Cumulative Distribution Function (CDF), , where the derivative exists:
The probability that falls within an interval is the integral of the PDF over that interval:
A valid PDF must satisfy two conditions: for all , and its total integral must be one, .
Conversely, the CDF can be obtained from the PDF by integrating from negative infinity up to a point :
Types of Continuous Random Variable
Uniform Random Variable
A continuous random variable is uniformly distributed over , denoted , if:
The CDF is:
Exponential Random Variable
The exponential distribution models the time between events. A continuous random variable is exponentially distributed with parameter , denoted , if:
The CDF is:
Normal Distribution
The Central Limit Theorem (CLT) states that the sum of a large number of random variables is approximately normal. A standard normal random variable is denoted and has PDF:
The CDF is: