Expected value is one of the most important concepts in probability. The expected value of a real-valued random variable gives the center of the distribution of the variable, in a special sense. Additionally, by computing expected values of various real transformations of a general random variable, we con extract a number of interesting characteristics of the distribution of the variable, including measures of spread, symmetry, and correlation. In a sense, expected value is a more general concept than probability itself.
Basic Concepts
Definitions
As usual, we start with a random experiment, modeled by a probability space. So to review, is the set of outcomes, the collection of events, and the probability measure on the sample space . In the following definitions, we assume that is a random variable for the experiment, with values in .
Suppose that has a discrete distribution with probability density function . The expected value of is defined as follows (assuming that the sum is well defined):
Details
Recall that is countable and for .
The sum defining the expected value makes sense if either the sum over the positive is finite or the sum over the negative is finite (or both). This ensures the that the entire sum exists (as an extended real number) and does not depend on the order of the terms. So as we will see, it's possible for to be a real number or or or to simply not exist. Of course, if is finite the expected value always exists as a real number.
Suppose that has a continuous distribution with probability density function . The expected value of is defined as follows (assuming that the integral is well defined):
Details:
In this case, is typically an interval or a union of disjoint intervals.
The probability density functions in basic applied probability that describe continuous distributions are piecewise continuous. So the integral above makes sense if the integral over positive is finite or the integral over negative is finite (or both). This ensures that the entire integral exists (as an extended real number). So as in the discrete case, it's possible for to exist as a real number or as or as or to not exist at all. As you might guess, the definition for a mixed distribution is a combination of the definitions for the discrete and continuous cases.
Suppose that has a mixed distribution with partial discrete density on and partial continuous density on , where and are disjoint and . The expected value of is defined as follows (assuming that the expression on the right is well defined):
Details:
Recall that is countable and is typically an interval or a union of disjoint intervals.
For the expected value above to make sense, the sum must be well defined, as in the discrete case, the integral must be well defined, as in the continuous case, and we must avoid the dreaded indeterminate form . As we will see in later, the various definitions given here can be unified into a single definition that works regardless of the type of distribution of . An even more general definition can be given in terms of integrals.
Interpretation
The expected value of is also called the mean of the distribution of and is frequently denoted . The mean is the center of the probability distribution of in a special sense. Indeed, if we think of the distribution as a mass distribution (with total mass 1), then the mean is the center of mass as defined in physics. The two pictures below show discrete and continuous probability density functions; in each case the mean is the center of mass, the balance point.
The mean as the center of mass of a discrete distribution.The mean as the center of mass of a continuous distribution.
Recall the other measures of the center of a distribution that we have studied:
To understand expected value in a probabilistic way, suppose that we create a new, compound experiment by repeating the basic experiment over and over again. This gives a sequence of independent random variables, each with the same distribution as . In statistical terms, we are sampling from the distribution of . The average value, or sample mean, after runs is
Note that is a random variable in the compound experiment. The important fact is that the average value converges to the expected value as . The precise statement of this is the law of large numbers, one of the fundamental theorems of probability. You will see the law of large numbers at work in many of the simulation exercises given below.
Extensions
If and , the moment of about of order is defined to be
(assuming of course that this expected value exists).
The moments about 0 are simply referred to as moments (or sometimes raw moments). The moments about are the central moments. The second central moment is particularly important, and is known as the variance. In some cases, if we know all of the moments of , we can determine the entire distribution of . This idea is explored in the discussion of generating functions.
The expected value of a random variable is based, of course, on the probability measure for the experiment. This probability measure could be a conditional probability measure, conditioned on a given event with . The usual notation is , and this expected value is computed by the definitions given above, except that the conditional probability density function replaces the ordinary probability density function . It is very important to realize that, except for notation, no new concepts are involved. All results that we obtain for expected value in general have analogues for these conditional expected values. On the other hand, in a later section we will study a more general notion of conditional expected value.
Basic Properties
The purpose of this subsection is to study some of the essential properties of expected value. Unless otherwise noted, we will assume that the indicated expected values exist, and that the various sets and functions that we use are measurable. We start with two simple but still essential results.
Simple Variables
First, recall that a constant can be thought of as a random variable (on any probability space) that takes only the value with probability 1. The corresponding distribution is sometimes called point mass at .
If is a constant random variable, then .
Details:
As a random variable, has a discrete distribution, so .
Next recall that an indicator variable is a random variable that takes only the values 0 and 1.
If is an indicator variable then .
Details:
is discrete so by definition, .
In particular, if is the indicator variable of an event , then , so in a sense, expected value subsumes probability. For a book that takes expected value, rather than probability, as the fundamental starting concept, see Probability via Expectation, by Peter Whittle.
Change of Variables Theorem
The expected value of a real-valued random variable gives the center of the distribution of the variable. This idea is much more powerful than might first appear. By finding expected values of various functions of a general random variable, we can measure many interesting features of its distribution.
So, suppose that is a random variable with values in a general set , and suppose that is a function from into . Then is a real-valued random variable, and so it makes sense to compute (assuming as usual that this expected value exists). However, to compute this expected value from the definition would require that we know the probability density function of the transformed variable, a difficult problem in general. Fortunately, there is a much better way, given by the change of variables theorem for expected value. This theorem is sometimes referred to as the law of the unconscious statistician, presumably because it is so basic and natural that it is often used without the realization that it is a theorem, and not a definition.
If has a discrete distribution on a countable set with probability density function . then
Details:
Let and let denote the range of . Then is countable so has a discrete distribution. Thus
The change of variables theorem when has a discrete distribution.
The next result is the change of variables theorem when has a continuous distribution. We will prove the continuous version in stages, first when has discrete range below and then in the next section in full generality. Even though the complete proof is delayed, however, we will use the change of variables theorem in the proofs of many of the other properties of expected value.
Suppose that has a continuous distribution on with probability density function , and that . Then
Details:
Suppose that has discrete range and let denote the set of values of . By assumption, is countable so has a discrete distribution. Thus
The change of variables theorem when has a continuous distribution and has countable range.
The results below gives basic properties of expected value. These properties are true in general, but we will restrict the proofs primarily to the continuous case. The proofs for the discrete case are analogous, with sums replacing integrals. The change of variables theorem is the main tool we will need. In these theorems and are real-valued random variables for an experiment (that is, defined on an underlying probability space) and is a constant. As usual, we assume that the indicated expected values exist. Be sure to try the proofs yourself before reading the ones in the text.
Linearity
Our first property is the additive property.
Details:
We apply the change of variables [8] with the function . Suppose that has a continuous distribution with PDF , and that takes values in and takes values in . Recall that has PDF given by for and has PDF given by for . Thus
Writing the double integrals as iterated integrals is a special case of Fubini's theorem. The proof in the discrete case is the same, with sums replacing integrals.
Our next property is the scaling property.
Details:
We apply the change of variables [8] with the function . Suppose that has a continuous distribution on with PDF . Then
Again, the proof in the discrete case is the same, with sums replacing integrals.
Here is the linearity of expected value in full generality. It's a simple corollary of [9] and [10].
Suppose that is a sequence of real-valued random variables defined on the underlying probability space and that is a sequence of constants. Then
Thus, expected value is a linear operation on the collection of real-valued random variables for the experiment. The linearity of expected value is so basic that it is important to understand this property on an intuitive level. Indeed, it is implied by the interpretation of expected value given in the law of large numbers.
Suppose that is a sequence of real-valued random variables with common mean .
Note that . Hence from the scaling property [10] and part (a), .
If the random variables in [12] are also independent and identically distributed, then in statistical terms, the sequence is a random sample of size from the common distribution, and is the sample mean.
In several important cases, a random variable from a special distribution can be decomposed into a sum of simpler random variables, and then part (a) of [12] can be used to compute the expected value.
Inequalities
The following results give some basic inequalities for expected value. The first, known as the positive property is the most obvious, but is also the main tool for proving the others.
Suppose that . Then
If then .
Details:
This result follows from the definition, since we can take the set of values of to be a subset of .
Suppose that (in addition to ). By the continuity theorem for increasing events, there exists such that . Therefore (with probability 1). By part (a), linearity, and Theorem 2, so .
Next is the increasing property, perhaps the most important property of expected value, after linearity.
Suppose that . Then
If then .
Details:
The assumption is equivalent to . Thus by part (a) of the positive property [13]. But then by the linearity of expected value.
Similarly, this result follows from part (b) of the positive property [13].
Absolute value inequalities:
If and then .
Details:
Note that (with probability 1) so by part (a) of the increasing property [14], . By linearity, which implies .
If then , and if then . Hence by part (b) of the increasing property [14], and therefore .
Only in Lake Woebegone are all of the children above average:
If then
Details:
We prove the contrapositive. Thus suppose that so that . If then by the increasing property [14] we have , a contradiction. Thus .
Similarly, if then .
Thus, if is not a constant (with probability 1), then must take values greater than its mean with positive probability and values less than its mean with positive probability.
Symmetry
Again, suppose that is a random variable taking values in . The distribution of is symmetric about if the distribution of is the same as the distribution of .
Suppose that the distribution of is symmetric about . If exists, then .
Details:
By assumption, the distribution of is the same as the distribution of . Since exists we have so by linearity . Equivalently .
The previous result applies if has a continuous distribution on with a probability density that is symmetric about ; that is, for .
Independence
If and are independent real-valued random variables then .
Details:
Suppose that has a continuous distribution on with PDF and that has a continuous distribution on with PDF . Then has PDF on . We apply the change of variables [8] with the function .
The proof in the discrete case is similar with sums replacing integrals.
It follows from [18] that independent random variables are uncorrelated. Moreover, this result is more powerful than might first appear. Suppose that and are independent random variables taking values in general sets and respectively, and that and . Then and are independent, real-valued random variables and hence
Examples and Applications
As always, be sure to try the proofs and computations yourself before reading the proof and answers in the text.
Uniform Distributions
Discrete uniform distributions are widely used in combinatorial probability, and model a point chosen at random from a finite set.
Suppose that has the discrete uniform distribution on a finite set .
is the arithmetic average of the numbers in .
If the points in are evenly spaced with endpoints , then , the average of the endpoints.
Details:
Let , the number of points in . Then has PDF for so
Suppose that and let , the right endpoint. As in (a), has points so using (a) and the formula for the sum of the first positive integers, we have
The results in [19] are easy to see if we think of as the center of mass, since the discrete uniform distribution corresponds to a finite set of points with equal mass.
Open the special distribution simulator, and select the discrete uniform distribution. This is the uniform distribution on points, starting at , evenly spaced at distance . Vary the parameters and note the location of the mean in relation to the probability density function. For selected values of the parameters, run the simulation 1000 times and compare the empirical mean to the distribution mean.
Recall that the continuous uniform distribution on a bounded interval corresponds to selecting a point at random from the interval. Continuous uniform distributions arise in geometric probability models and in a variety of other applied problems.
Suppose that has the continuous uniform distribution on an interval , where and .
Part (a) is easy to see if we think of the mean as the center of mass, since the uniform distribution corresponds to a uniform distribution of mass on the interval.
Open the special distribution simulator, and select the continuous uniform distribution. This is the uniform distribution the interval . Vary the parameters and note the location of the mean in relation to the probability density function. For selected values of the parameters, run the simulation 1000 times and compare the empirical mean to the distribution mean.
Next, the average value of a function on an interval, as defined in calculus, has a nice interpretation in terms of the uniform distribution.
Suppose that is uniformly distributed on the interval , and that is an integrable function from into . Then is the average value of on :
Details:
This result follows immediately from the change of variables [8], since has PDF for .
Find the average value of the following functions on the given intervals:
on
on
on .
Details:
Exercise [25] given next illustrates the importance of the change of variables [8] in computing expected values.
Suppose that is uniformly distributed on .
Give the probability density function of .
Find the probability density function of .
Find using the probability density function in (b).
Recall that a standard die is a six-sided die. A fair die is one in which the faces are equally likely. An ace-six flat die is a standard die in which faces 1 and 6 have probability each, and faces 2, 3, 4, and 5 have probability each.
Two standard, fair dice are thrown, and the scores recorded. Find the expected value of each of the following variables.
, the sum of the scores.
, the average of the scores.
, the product of the scores.
, the minimum score
, the maximum score.
Details:
In the dice experiment, select two fair die. Note the shape of the probability density function and the location of the mean for the sum, minimum, and maximum variables. Run the experiment 1000 times and compare the sample mean and the distribution mean for each of these variables.
Two standard, ace-six flat dice are thrown, and the scores recorded. Find the expected value of each of the following variables.
, the sum of the scores.
, the average of the scores.
, the product of the scores.
, the minimum score
, the maximum score.
Details:
In the dice experiment, select two ace-six flat die. Note the shape of the probability density function and the location of the mean for the sum, minimum, and maximum variables. Run the experiment 1000 times and compare the sample mean and the distribution mean for each of these variables.
Bernoulli Trials
Recall that a Bernoulli trials process is a sequence of independent, identically distributed indicator random variables. In the usual language of reliability, denotes the outcome of trial , where 1 denotes success and 0 denotes failure. The probability of success is the basic parameter of the process. The process is named for Jacob Bernoulli.
For , the number of successes in the first trials is . Recall that this random variable has the binomial distribution with parameters and , and has probability density function given by
If has the binomial distribution with parameters and then
Details:
We give two proofs. The first is from the definition. The critical tools that we need involve binomial coefficients: the identity for , and the binomial theorem
The second proof uses the additive property. Since , the result follows immediately from and the additive property [9], since for each .
Note the superiority of the second proof to the first. The result also makes intuitive sense: in trials with success probability , we expect successes.
In the binomial coin experiment, vary and and note the shape of the probability density function and the location of the mean. For selected values of and , run the experiment 1000 times and compare the sample mean to the distribution mean.
Suppose that , and let denote the trial number of the first success. This random variable has the geometric distribution on with parameter , and has probability density function given by
If has the geometric distribution on with parameter then .
Details:
The key is the formula for the deriviative of a geometric series:
Again, the result makes intuitive sense. Since is the probability of success, we expect a success to occur after trials.
In the negative binomial experiment, select to get the geometric distribution. Vary and note the shape of the probability density function and the location of the mean. For selected values of , run the experiment 1000 times and compare the sample mean to the distribution mean.
The Hypergeometric Distribution
Suppose that a population consists of objects; of the objects are type 1 and are type 0. A sample of objects is chosen at random, without replacement. The parameters with and . Let denote the type of the th object selected. Recall that is a sequence of identically distributed (but not independent) indicator random variable with for each .
Let denote the number of type 1 objects in the sample, so that . Recall that has the hypergeometric distribution, which has probability density function given by
If has the hypergeometric distribution with parameters , , and then .
Details:
Our first proof is from the definition: Using the hypergeometric PDF,
Note that the term is 0. For the other terms, we can use the identity to get
But substituting and using another fundamental identity,
So substituting and doing a bit of algebra gives .
A much better proof uses [9] and the representation of as a sum of indicator variables. The result follows immediately since for each .
In the ball and urn experiment, vary , , and and note the shape of the probability density function and the location of the mean. For selected values of the parameters, run the experiment 1000 times and compare the sample mean to the distribution mean.
Note that if we select the objects with replacement, then would be a sequence of Bernoulli trials, and hence would have the binomial distribution with parameters and . Thus, the mean would still be .
The Poisson Distribution
Recall that the Poisson distribution has probability density function given by
where is a parameter. The Poisson distribution is named after Simeon Poisson and is widely used to model the number of random points in a region of time or space; the parameter is proportional to the size of the region.
If has the Poisson distribution with parameter then . Thus, the parameter of the Poisson distribution is the mean of the distribution.
Details:
The proof depends on the standard series for the exponential function
In the Poisson experiment, the parameter is . Vary the parameter and note the shape of the probability density function and the location of the mean. For various values of the parameter, run the experiment 1000 times and compare the sample mean to the distribution mean.
The Exponential Distribution
Recall that the exponential distribution is a continuous distribution with probability density function given by
where is the rate parameter. This distribution is widely used to model failure times and other arrival times; in particular, the distribution governs the time between arrivals in the Poisson model.
Suppose that has the exponential distribution with rate parameter . Then .
Details:
This result follows from the definition and an integration by parts:
Recall that the mode of is 0 and the median of is . Note how these measures of center are ordered:
In the gamma experiment, set to get the exponential distribution. This app simulates the first arrival in a Poisson process. Vary with the scrollbar and note the position of the mean relative to the graph of the probability density function. For selected values of , run the experiment 1000 times and compare the sample mean to the distribution mean.
Suppose again that has the exponential distribution with rate parameter and suppose that . Find .
Details:
The Erlang Distribution
Recall that the Erlang distribution is a continuous distribution with probability density function given by
where is the shape parameter and is the rate parameter. This distribution is widely used to model failure times and other arrival times, and in particular, models the th arrival in the Poisson process. So it follows that if is a sequence of independent random variables, each having the exponential distribution with rate parameter , then has the Erlang distribution with shape parameter and rate parameter . The Erlang distribution is a special case of the gamma distribution which allows non-integer shape parameters.
Suppose that has the Erlang distribution with shape parameter and rate parameter . Then .
Details:
We give two proofs. The first is by induction on , so let denote the mean when the shape parameter is . When , we have the exponential distribution with rate parameter , so we know by [38]. Suppose that for a given . Then
Integrate by parts with , so that and . Then
But the last integral is , so by the induction hypothesis, .
The second proof is much better. The result follows immediately from the additive property [9] and the fact that can be represented in the form where has the exponential distribution with parameter for each .
Note again how much easier and more intuitive the second proof is than the first.
Open the gamma experiment, which simulates the arrival times in the Poisson process. Vary the parameters and note the position of the mean relative to the graph of the probability density function. For selected parameter values, run the experiment 1000 times and compare the sample mean to the distribution mean.
Beta Distributions
The distributions in this subsection belong to the family of beta distributions, which are widely used to model random proportions and probabilities.
Suppose that has probability density function given by for .
Find the mean of .
Find the mode of .
Find the median of .
Sketch the graph of and show the location of the mean, median, and mode on the -axis.
Details:
In the special distribution simulator, select the beta distribution and set and to get the distribution in [43]. Run the experiment 1000 times and compare the sample mean to the distribution mean.
Suppose that a sphere has a random radius with probability density function given by for . Find the expected value of each of the following:
The circumference
The surface area
The volume
Details:
Suppose that has probability density function given by for .
Find the mean of .
Find median of .
Note that is unbounded, so does not have a mode.
Sketch the graph of and show the location of the mean and median on the -axis.
Open the Brownian motion experiment and select the last zero. Run the simulation 1000 times and compare the sample mean to the distribution mean.
Suppose that the grades on a test are described by the random variable where has the beta distribution with probability density function given by for . The grades are generally low, so the teacher decides to curve the grades using the transformation . Find the expected value of each of the following variables
Details:
The Pareto Distribution
Recall that the Pareto distribution is a continuous distribution with probability density function given by
where is a parameter. The Pareto distribution is named for Vilfredo Pareto. It is a heavy-tailed distribution that is widely used to model certain financial variables.
Suppose that has the Pareto distribution with shape parameter . Then
if
if
Details:
If ,
since the exponent . If , .
If then
Exercise [49] gives us our first example of a distribution whose mean is infinite.
In the special distribution simulator, select the Pareto distribution. Note the shape of the probability density function and the location of the mean. For the following values of the shape parameter , run the experiment 1000 times and note the behavior of the empirical mean.
.
The Cauchy Distribution
Recall that the (standard) Cauchy distribution has probability density function given by
This distribution is named for Augustin Cauchy.
If has the Cauchy distribution then does not exist.
Details:
By definition,
which evaluates to the meaningless expression .
Note that the graph of is symmetric about 0 and is unimodal, and so the mode and median of are both 0. By the symmetry result [17], if had a mean, the mean would be 0 also, but alas the mean does not exist. Moreover, the non-existence of the mean is not just a pedantic technicality. If we think of the probability distribution as a mass distribution, then the moment to the right of is and the moment to the left of is for every . The center of mass simply does not exist. Probabilisitically, the law of large numbers fails, as you can see in the following simulation exercise:
In the Cauchy experiment (with the default parameter values), a light sources is 1 unit from position 0 on an infinite straight wall. The angle that the light makes with the perpendicular is uniformly distributed on the interval , so that the position of the light beam on the wall has the Cauchy distribution. Run the simulation 1000 times and note the behavior of the empirical mean.
The Normal Distribution
Recall that the standard normal distribution is a continuous distribution with density function given by
Normal distributions are widely used to model physical measurements subject to small, random errors.
If has the standard normal distribution then .
Details:
Using a simple change of variables, we have
The standard normal distribution is unimodal and symmetric about , so the median, mean, and mode all agree. More generally, for and , recall that has the normal distribution with location parameter and scale parameter . has probability density function given by
The location parameter is the mean of the distribution:
If has the normal distribution with location parameter and scale parameter , then
Details:
Of course we could use the definition, but a proof using linearity in and the representation in terms of the standard normal distribution is trivial: .
In the special distribution simulator, select the normal distribution. Vary the parameters and note the location of the mean. For selected parameter values, run the simulation 1000 times and compare the sample mean to the distribution mean.
Additional Exercises
Suppose that has probability density function given by for . Find the following expected values:
Details:
Suppose that has a discrete distribution with probability density function given by for . Find each of the following:
The median of .
The mode of
.
.
.
Details:
3
3
Suppose that and are real-valued random variables with and . Find .
Details:
0
Suppose that and are real-valued, independent random variables, and that and . Find .
Details:
33
Suppose that there are 5 duck hunters, each a perfect shot. A flock of 10 ducks fly over, and each hunter selects one duck at random and shoots. Find the expected number of ducks killed.
Details:
Number the ducks from 1 to 10. For , let be the indicator variable that takes the value 1 if duck is killed and 0 otherwise. Duck is killed if at least one of the hunters selects her, so . The number of ducks killed is so
For a more complete analysis of the duck hunter problem is given in a separate section.
Consider the following game: An urn initially contains one red and one green ball. A ball is selected at random, and if the ball is green, the game is over. If the ball is red, the ball is returned to the urn, another red ball is added, and the game continues. At each stage, a ball is selected at random, and if the ball is green, the game is over. If the ball is red, the ball is returned to the urn, another red ball is added, and the game continues. Let denote the length of the game (that is, the number of selections required to obtain a green ball). Find .
Details:
The probability density function of was found in in the section on discrete distributions: for . The expected length of the game is infinite: