Hello! In our last lesson, we built the foundation for continuous random variables by defining the Probability Density Function (PDF) and Cumulative Distribution Function (CDF). You practiced the crucial calculus-based relationship between them: integrating the PDF to get the CDF, and differentiating the CDF to find the PDF.
Today, we'll use that foundation to move from describing a distribution to summarizing it. This lesson focuses on calculating the key numerical characteristics of a random variable: its expectation (mean), variance, and higher-order moments. You will learn how to compute these values directly from the PMF or PDF, and also through a powerful tool called the Moment Generating Function (MGF). Mastering these calculations is essential for solving a wide range of problems on your exam.
1. Expectation and Variance: The Core Measures
The two most important summary statistics for any random variable are its mean (or expected value) and its variance. The mean tells us the variable's "center of mass," while the variance measures its spread or dispersion around that mean.
Let's start with a quick review of how these are calculated for discrete variables, which will provide a natural bridge to the continuous case.
Expected Value and Variance of Discrete Random Variables
This video from jbstatistics provides a clear definition of expected value and variance for discrete random variables. It also introduces the essential computational formula for variance.
Please watch the first few minutes of the video: The first segment defines the expected value, E[X], and variance, \text{Var}(X). Pay attention to the definition of variance as E[(X-\mu)^2]. The next part introduces the much more practical "handy relationship" for calculating variance: \text{Var}(X) = E[X^2] - (E[X])^2. This is the formula you will use most often.
As the video explained, the core ideas are:
- Expected Value (Mean): For a discrete variable , it's a weighted average of its possible values:
- Variance: The most convenient way to calculate it is:
where is the second moment, calculated as .
Now, let's extend this to continuous variables. As we saw in the last lesson, we simply replace the summation with an integral and the PMF with the PDF, .
This next video demonstrates exactly how to apply these integration-based formulas.
Continuous Random Variables: Mean & Variance
This video from MrNichollTV shows how the formulas for mean and variance are adapted for continuous random variables and works through a full calculation.
Watch these two segments: The introduction presents the integral formulas for E[X] and \text{Var}(X) for continuous variables. Note the direct parallels to the discrete case. The first example provides a step-by-step walkthrough of calculating the mean and variance from a given PDF. This will put the integration skills you practiced in the last lesson to direct use.
To summarize the formulas for a continuous random variable with PDF :
- Expected Value (Mean):
- Second Moment:
- Variance:
2. Problem-Solving Practice with PDFs
Your exam will require you to be proficient in these calculations. Let's work through some typical problems. This resource provides a collection of solved problems that are excellent practice.
[PDF] Problem Solutions – Chapter 3
This document contains detailed solutions to a variety of problems involving expectation and variance. We'll focus on two common scenarios you might face.
Please review the following two problems: Problem 3.3.4: Start by reading through this solution. Here, the PDF is given directly. The task is to compute E[Y] and \text{Var}(Y) by setting up and solving the integrals for E[Y] and E[Y^2]. Problem 3.3.3: Now, review this solution. This problem is a two-step process that combines the last lesson with this one. You are given the CDF, so you must first find the PDF by differentiation, and then use that PDF to calculate E[X] and \text{Var}(X) through integration.
These two examples cover a common pattern: either you are given the PDF directly, or you must first derive it from the CDF before you can calculate the moments.
3. The Moment Generating Function (MGF)
Calculating moments like by direct integration can become very tedious, especially for higher values of . The Moment Generating Function (MGF) provides a powerful alternative method. It is a function that "generates" all the moments of a random variable through differentiation.
The MGF, denoted , is defined as:
For a discrete variable:
For a continuous variable:
The crucial property of the MGF is that the n-th moment, , can be found by taking the n-th derivative of the MGF with respect to and then evaluating it at .
This means:
This next resource will formalize this concept and show you how to apply it.
[PDF] Dr. Z.'s Probability Lecture 21 Handout: Moment Generating Functions
This handout from Rutgers University gives a concise, problem-oriented introduction to MGFs.
Please read the following sections: Start with the definition of the MGF. Next, read the section "Important Property". This explains the core idea of using derivatives of the MGF to find moments. It also mentions an alternative method using the Maclaurin series expansion, which is another useful technique. Finally, work through Problem 21.2, Problem 21.3, and Problem 21.4. These examples show how to use the MGF to find the mean, variance, and standard deviation without performing any integration. Notice how the problem becomes one of calculus (differentiation or series expansion) rather than integration.
4. A Look Ahead: Standard Distributions
So far, we've calculated moments from scratch using a given PMF or PDF. However, for many well-known probability distributions, these values have already been worked out and are available as standard formulas.
The image below is a table summarizing the key properties of several common discrete and continuous distributions, some of which we will study in the upcoming lessons.

For now, just observe the columns for Mean E(X) and Variance Var(X). For example, for a Poisson distribution with parameter , the mean is and the variance is also . For a Normal distribution with parameters and , the mean is and the variance is . As we cover these distributions, you will learn how to use these formulas directly, saving you from having to re-derive them via integration every time.
Conclusion
In this lesson, we focused on the essential numerical calculations for describing random variables. You learned how to quantify the center and spread of a distribution, a critical skill for both theoretical understanding and practical problem-solving.
Here are the key takeaways:
- Expected Value (Mean): For continuous variables, it's calculated by integrating . It represents the long-run average value of the random variable.
- Variance: It measures the spread of the distribution. The most effective way to compute it is with the formula . This requires calculating the first moment and the second moment .
- Moment Generating Function (MGF): This is a powerful "shortcut" tool. The n-th derivative of the MGF evaluated at gives the n-th moment of the random variable. This often simplifies the process of finding the mean and variance.
In our next lesson, we will begin our tour of specific, named probability distributions. We will start with the Binomial and Poisson distributions, which are fundamental models for counting events in a fixed number of trials or a fixed interval of time.