Having explored the fundamentals of probability spaces and events, we now introduce the concept of random variables, a crucial abstraction that allows us to work with numerical outcomes of random experiments. Random variables bridge the gap between probability theory and mathematical analysis, enabling us to use powerful tools from calculus and linear algebra to study random phenomena.

Definition of Random Variables (2.4)

A random variable is formally defined as a function that maps outcomes from a sample space to real numbers . It assigns a numerical value to each possible outcome of a random experiment.

Definition 2.25: A random variable is a function , where is the sample space of a probability space.

The range or value set of a random variable , denoted , is the set of all possible values that can take:

For discrete probability spaces (which we primarily consider in this course), the range of a random variable is always countable, meaning it is either finite or countably infinite.

Examples of Random Variables

  • Coin Tosses: Consider the experiment of tossing a fair coin three times. The sample space is . We can define a random variable that represents the number of heads in three tosses. For example, , , . The range of is .

  • Die Roll: In the experiment of rolling a six-sided die, . We can define a random variable that represents the outcome of the die roll. In this case, for each , and .

Probability Distribution of a Random Variable

When we study a random variable , we are often interested in the probabilities of taking on specific values or falling within certain ranges. This information is captured by the probability distribution of .

For a discrete random variable with range , we consider the events . The probability of taking the value is denoted as and is calculated as the sum of probabilities of all elementary events in the event :

We can also consider cumulative probabilities, such as , which represents the probability that the random variable takes a value less than or equal to .

Density Function and Distribution Function

To characterize the probability distribution of a random variable, we use two key functions:

  • Density Function (): The density function (or probability mass function for discrete random variables) gives the probability that the random variable takes on a specific value :

    The density function is non-zero only for values in the range .

  • Distribution Function (): The distribution function (or cumulative distribution function, CDF) gives the cumulative probability that the random variable takes a value less than or equal to :

The density function and the distribution function provide complete descriptions of the probability distribution of a random variable. Knowing either of these functions allows us to determine all probabilities associated with the random variable.

Notation Conventions

To simplify notation, we often use shorthand notations for probabilities involving random variables. Instead of writing , we simply write . Similarly, is used for . We may also use expressions like , , and with analogous interpretations.

Expectation (2.4.1)

One of the most important characteristics of a random variable is its expectation or expected value. The expectation of a random variable represents its “average” or “mean” value over many repetitions of the random experiment. It is a measure of the central tendency of the distribution.

Definition 2.27: For a random variable , the expectation or expected value is defined as:

provided that the sum converges absolutely. If the sum does not converge absolutely, the expectation is said to be undefined.

For random variables with a finite range, the expectation is always well-defined. However, for random variables with infinite range, we need to ensure convergence of the sum.

Intuitive Interpretation of Expectation

The expectation can be interpreted as the long-run average value of in repeated trials of the random experiment. If we perform the experiment many times and record the values of , the average of these values will tend to approach as the number of trials increases. For example, in the coin toss example, the expected number of heads in three tosses is . This does not mean we will ever observe 1.5 heads in a single experiment, but over many repetitions, the average number of heads per experiment will be close to 1.5.

Alternative Formula for Expectation (Lemma 2.29)

An alternative, often useful, formula for the expectation expresses it as a sum over all elementary events in the sample space:

Lemma 2.29: For a random variable :

This formula directly relates the expectation to the probabilities of elementary events and can be useful in certain calculations.

Expectation for Non-negative Integer Random Variables (Satz 2.30)

For random variables that take only non-negative integer values (i.e., ), there is another convenient formula for the expectation, expressed as a sum of tail probabilities:

Satz 2.30: If is a random variable with , then:

This formula expresses the expectation as the sum of probabilities of exceeding each integer value, providing a different perspective on expectation calculation, particularly useful for variables counting events or trials.

Markov’s Inequality

A fundamental inequality in probability theory, Markov’s Inequality, provides an upper bound on the probability that a non-negative random variable exceeds a certain threshold, in terms of its expectation.

Markov’s Inequality: If is a non-negative random variable and , then:

Markov’s Inequality is remarkably simple yet powerful. It provides a general bound on tail probabilities using only the expectation of the random variable, without requiring detailed knowledge of its distribution. While the bound provided by Markov’s Inequality can be loose in some cases, it is widely applicable and often sufficient for obtaining useful probabilistic estimates, especially when dealing with non-negative random variables.

Conditional Expectation

Analogous to conditional probability, we can define conditional expectation, which is the expected value of a random variable given that a certain event has occurred. Conditional expectation allows us to refine our predictions and update our expected values based on new information.

For a random variable and an event with , the conditional expectation of given , denoted , is defined as:

where is the conditional probability of the event given event .

Law of Total Expectation (Satz 2.32)

Similar to the Law of Total Probability, the Law of Total Expectation (Satz 2.32) allows us to calculate the expectation of a random variable by partitioning the sample space into disjoint events and considering conditional expectations within each partition.

Theorem 2.32 (Law of Total Expectation): Let be pairwise disjoint events that partition the sample space (i.e., and for ). Let be a random variable. Then, the expectation of can be calculated as:

This law is invaluable when calculating expectations for complex random variables by breaking down the calculation into simpler, conditional expectations. It is widely used in probabilistic analysis of algorithms and systems.

Linearity of Expectation (Satz 2.33)

One of the most powerful and frequently used properties of expectation is linearity of expectation (Satz 2.33). It states that the expectation of a sum of random variables is equal to the sum of their expectations, regardless of whether the random variables are independent or dependent.

Theorem 2.33 (Linearity of Expectation): For random variables and constants , let . Then:

Linearity of expectation is a remarkably versatile tool. It allows us to calculate the expectation of complex random variables by decomposing them into sums of simpler variables, without worrying about dependencies between the variables. This property is extensively used in probabilistic analysis of algorithms, combinatorics, and various other areas.

Indicator Variables

A particularly useful class of random variables in conjunction with linearity of expectation is indicator variables. An indicator variable for an event is a random variable that takes the value 1 if event occurs and 0 otherwise.

Beobachtung 2.35: For an indicator variable of an event :

The expectation of an indicator variable is simply the probability of the corresponding event:

Indicator variables, combined with linearity of expectation, provide a powerful technique for calculating expectations, especially for counting problems. By expressing a random variable as a sum of indicator variables, we can often simplify the calculation of its expectation significantly.

Variance (2.4.2)

While expectation provides a measure of the central tendency of a random variable, it does not capture the spread or variability of its distribution. Variance is a measure of how spread out the values of a random variable are around its mean. It quantifies the “dispersion” or “scatter” of the distribution.

Definition 2.39: For a random variable with expectation , the variance is defined as the expected value of the squared deviation from the mean:

The standard deviation is the square root of the variance and provides a measure of spread in the original units of the random variable.

Computational Formula for Variance (Satz 2.40)

An alternative, often computationally convenient, formula for variance is given by:

Satz 2.40: For any random variable :

This formula expresses variance in terms of the expectation of and the square of the expectation of , often simplifying variance calculations.

Properties of Variance (Satz 2.41)

Variance has several important properties that are useful in calculations and analysis.

Satz 2.41: For a random variable and constants :

This property shows how variance scales and shifts under linear transformations of the random variable. Adding a constant does not change the variance, while scaling by a factor scales the variance by .

Moments of Random Variables

Expectation and variance are examples of moments of a random variable. Moments provide a way to characterize the distribution of a random variable through numerical values.

Definition 2.42: For a random variable , the k-th moment is defined as , and the k-th central moment is defined as .

Expectation is the first moment, and variance is the second central moment. Higher-order moments capture more detailed information about the shape and characteristics of the distribution.

Wald’s Identity (2.6.4)

Wald’s Identity is a powerful result that relates the expectation of a sum of a random number of random variables to the expectations of the number of summands and the individual summands.

Satz 2.65 (Wald’s Identity): Let and be two independent random variables, where (N takes values in natural numbers). Let be independent copies of . Define . Then:

Wald’s Identity is a fundamental result in probability theory with wide applications in areas such as queuing theory, risk theory, and analysis of algorithms. It provides a way to calculate the expectation of a sum when the number of terms in the sum is itself a random variable, provided that certain independence conditions are met.

In summary, this section has introduced the concept of random variables, their probability distributions, expectation, variance, and related properties. These concepts and tools are essential for probabilistic modeling, analysis, and the design of randomized algorithms, which will be explored in subsequent sections.

Prev: 02 Conditional Probabilities, Independence | Next: 04 Important Discrete Distributions