This article may require cleanup to meet Wikipedia's quality standards. The specific problem is: Bad math formatting, poor organization, too many proofs, inappropriate textbook style (August 2019) (Learn how and when to remove this template message)
In probability theory, the expected value of a random variable is a key aspect of its probability distribution. Intuitively, a random variable's expected value represents the average of a large number of independent realizations of the random variable. For example, the expected value of rolling a six-sided die is 3.5, because the average of all the numbers that come up converges to 3.5 as the number of rolls approaches infinity (see § Examples for details). The expected value is also known as the expectation, mathematical expectation, mean, or first moment.
A bit more formally, the expected value of a discrete random variable is the probability-weighted average of all its possible values. In other words, each possible value the random variable can assume is multiplied by its probability of occurring, and the resulting products are summed to produce the expected value. The same principle applies to an absolutely continuous random variable, except that an integral of the variable with respect to its probability density replaces the sum. The formal definition subsumes both of these and also works for distributions which are neither discrete nor absolutely continuous; the expected value of a random variable is the integral of the random variable with respect to its probability measure.
The expectation of a random variable plays an important role in a variety of contexts. For example, in decision theory, an agent making an optimal choice in the context of incomplete information is often assumed to maximize the expected value of their utility function. For a different example, in statistics, where one seeks estimates for unknown parameters based on available data, the estimate itself is a random variable. In such settings, a desirable criteria for a "good" estimator is that it is unbiased – that is, the expected value of the estimate is equal to the true value of the underlying parameter.
- 1 History
- 2 Definition
- 3 Uses and applications
- 4 Basic properties
- 5 Interchanging limits and expectation
- 6 Inequalities
- 7 Relationship with characteristic function
- 8 Alternative formula for expected value
- 9 See also
- 10 References
- 11 Literature
This section needs additional citations for verification. (October 2019) (Learn how and when to remove this template message)
The idea of the expected value originated in the middle of the 17th century from the study of the so-called problem of points, which seeks to divide the stakes in a fair way between two players who have to end their game before it's properly finished. This problem had been debated for centuries, and many conflicting proposals and solutions had been suggested over the years, when it was posed in 1654 to Blaise Pascal by French writer and amateur mathematician Chevalier de Méré. Méré claimed that this problem couldn't be solved and that it showed just how flawed mathematics was when it came to its application to the real world. Pascal, being a mathematician, was provoked and determined to solve the problem once and for all. He began to discuss the problem in a now famous series of letters to Pierre de Fermat. Soon enough they both independently came up with a solution. They solved the problem in different computational ways but their results were identical because their computations were based on the same fundamental principle. The principle is that the value of a future gain should be directly proportional to the chance of getting it. This principle seemed to have come naturally to both of them. They were very pleased by the fact that they had found essentially the same solution and this in turn made them absolutely convinced they had solved the problem conclusively. However, they did not publish their findings. They only informed a small circle of mutual scientific friends in Paris about it.
Three years later, in 1657, a Dutch mathematician Christiaan Huygens, who had just visited Paris, published a treatise (see Huygens (1657)) "De ratiociniis in ludo aleæ" on probability theory. In this book he considered the problem of points and presented a solution based on the same principle as the solutions of Pascal and Fermat. Huygens also extended the concept of expectation by adding rules for how to calculate expectations in more complicated situations than the original problem (e.g., for three or more players). In this sense this book can be seen as the first successful attempt at laying down the foundations of the theory of probability.
In the foreword to his book, Huygens wrote: "It should be said, also, that for some time some of the best mathematicians of France have occupied themselves with this kind of calculus so that no one should attribute to me the honour of the first invention. This does not belong to me. But these savants, although they put each other to the test by proposing to each other many questions difficult to solve, have hidden their methods. I have had therefore to examine and go deeply for myself into this matter by beginning with the elements, and it is impossible for me for this reason to affirm that I have even started from the same principle. But finally I have found that my answers in many cases do not differ from theirs." (cited by Edwards (2002)). Thus, Huygens learned about de Méré's Problem in 1655 during his visit to France; later on in 1656 from his correspondence with Carcavi he learned that his method was essentially the same as Pascal's; so that before his book went to press in 1657 he knew about Pascal's priority in this subject.
Neither Pascal nor Huygens used the term "expectation" in its modern sense. In particular, Huygens writes: "That my Chance or Expectation to win any thing is worth just such a Sum, as wou'd procure me in the same Chance and Expectation at a fair Lay. ... If I expect a or b, and have an equal Chance of gaining them, my Expectation is worth a+b/." More than a hundred years later, in 1814, Pierre-Simon Laplace published his tract "Théorie analytique des probabilités", where the concept of expected value was defined explicitly:
… this advantage in the theory of chance is the product of the sum hoped for by the probability of obtaining it; it is the partial sum which ought to result when we do not wish to run the risks of the event in supposing that the division is made proportional to the probabilities. This division is the only equitable one when all strange circumstances are eliminated; because an equal degree of probability gives an equal right for the sum hoped for. We will call this advantage mathematical hope.
The use of the letter E to denote expected value goes back to W. A. Whitworth in 1901, who used a script E. The symbol has become popular since for English writers it meant "Expectation", for Germans "Erwartungswert", for Spanish "Esperanza matemática" and for French "Espérance mathématique".
Let be a random variable with a finite number of finite outcomes occurring with probabilities respectively. The expectation of is defined as
Since all probabilities add up to 1 (), the expected value is the weighted average, with ’s being the weights.
If all outcomes are equiprobable (that is, ), then the weighted average turns into the simple average. If the outcomes are not equiprobable, then the simple average must be replaced with the weighted average, which takes into account the fact that some outcomes are more likely than the others.
- Let represent the outcome of a roll of a fair six-sided die. More specifically, will be the number of pips showing on the top face of the die after the toss. The possible values for are 1, 2, 3, 4, 5, and 6, all of which are equally likely with a probability of 1/. The expectation of is
- If one rolls the die times and computes the average (arithmetic mean) of the results, then as grows, the average will almost surely converge to the expected value, a fact known as the strong law of large numbers.
- The roulette game consists of a small ball and a wheel with 38 numbered pockets around the edge. As the wheel is spun, the ball bounces around randomly until it settles down in one of the pockets. Suppose random variable represents the (monetary) outcome of a $1 bet on a single number ("straight up" bet). If the bet wins (which happens with probability 1/ in American roulette), the payoff is $35; otherwise the player loses the bet. The expected profit from such a bet will be
- That is, the bet of $1 stands to lose , so its expected value is
Countably infinite case
Intuitively, the expectation of a random variable taking values in a countable set of outcomes is defined analogously as the weighted sum of the outcome values, where the weights correspond to the probabilities of realizing that value. However, convergence issues associated with the infinite sum necessitate a more careful definition. A rigorous definition first defines expectation of a non-negative random variable, and then adapts it to general random variables.
Let be a non-negative random variable with a countable set of outcomes occurring with probabilities respectively. Analogous to the discrete case, the expected value of is then defined as the series
Note that since , the infinite sum is well-defined and does not depend on the order in which it is computed. Unlike the discrete case, the expectation here can be equal to infinity, if the infinite sum above increases without bound.
For a general random variable that need not be non-negative, first define and . Observe that , and both and are non-negative random variables. Hence, and are well-defined (using either the definition for finite discrete random variables or non-negative countable random variables). Then, we define as follows:
- Suppose and for , where (with being the natural logarithm) is the scale factor such that the probabilities sum to 1. Then, using the direct definition for non-negative random variables, we have
- An example where the expectation is infinite arises in the context of the St. Petersburg paradox. Let and for . Once again, since the random variable is non-negative, the expected value calculation gives
- For an example where the expectation is not well-defined, suppose the random variable takes values 1, −2, 3, −4, ..., with respective probabilities , ..., where is a normalizing constant that ensures the probabilities sum up to one.
- Then, it follows that takes value with probability for and takes value with remaining probability. Similarly, takes value with probability for and takes value with remaining probability. Using the definition for non-negative random variables, one can show that both and (see Harmonic series). Hence, the expectation of is not well-defined.
Absolutely continuous case
For a general random variable , define as before and , and note that , with both and nonnegative. Then, the expected value of is defined as
For multidimensional random variables, their expected value is defined per component, i.e.
and, for a random matrix with elements ,
Uses and applications
It is possible to construct an expected value equal to the probability of an event by taking the expectation of an indicator function that is one if the event has occurred and zero otherwise. This relationship can be used to translate properties of expected values into properties of probabilities, e.g. using the law of large numbers to justify estimating probabilities by frequencies.
The expected values of the powers of X are called the moments of X; the moments about the mean of X are expected values of powers of X − E[X]. The moments of some random variables can be used to specify their distributions, via their moment generating functions.
To empirically estimate the expected value of a random variable, one repeatedly measures observations of the variable and computes the arithmetic mean of the results. If the expected value exists, this procedure estimates the true expected value in an unbiased manner and has the property of minimizing the sum of the squares of the residuals (the sum of the squared differences between the observations and the estimate). The law of large numbers demonstrates (under fairly mild conditions) that, as the size of the sample gets larger, the variance of this estimate gets smaller.
This property is often exploited in a wide variety of applications, including general problems of statistical estimation and machine learning, to estimate (probabilistic) quantities of interest via Monte Carlo methods, since most quantities of interest can be written in terms of expectation, e.g. , where is the indicator function of the set .
In classical mechanics, the center of mass is an analogous concept to expectation. For example, suppose X is a discrete random variable with values xi and corresponding probabilities pi. Now consider a weightless rod on which are placed weights, at locations xi along the rod and having masses pi (whose sum is one). The point at which the rod balances is E[X].
A very important application of the expectation value is in the field of quantum mechanics. The expectation value of a quantum mechanical operator operating on a quantum state vector is written as . The uncertainty in can be calculated using the formula .
This section may be too technical for most readers to understand. Please help improve it to make it understandable to non-experts, without removing the technical details. (February 2019) (Learn how and when to remove this template message)
The basic properties below replicate or follow immediately from those of Lebesgue integral.
- If (a.s.), then .
- If (a.s.) for some constant , then . In particular, for a random variable with well-defined expectation, .
- Non-negativity: If (a.s.), then .
- Linearity of expectation: The expected value operator (or expectation operator) is linear in the sense that, for any random variables and , and a constant ,
- whenever the right-hand side is well-defined.
- The following statements regarding a random variable are equivalent:
- exists and is finite.
- Both and are finite.
- is finite.
- Sketch of proof: Indeed, . By linearity, .
- For the reasons above, the expressions " is integrable" and "the expected value of is finite" are used interchangeably throughout this article.
- For a random variable with well-defined expectation, .
- The proof follows from the triangle inequality and the linearity of expectation, as follows:
- This result is a special case of the more general Jensen's inequality.
- Monotonicity: If (a.s.), and both and exist, then .
- Proof follows from the linearity and the non-negativity property for , since (a.s.).
- Non-degeneracy: If , then (a.s.).
- If then (a.s.). Similarly, if then (a.s.).
- Non-multiplicativity: In general, the expected value operator is not multiplicative, i.e. is not necessarily equal to . Indeed, let assume the values of 1 and −1 with probability 0.5 each. Then
- However, if and are independent, then indeed one can show that .
- Law of the unconscious statistician: The expected value of a measurable function of , , given that has a probability density function , is given by the inner product of and :
- This formula also holds in multidimensional case, when is a function of several random variables, and is their joint density.
Interchanging limits and expectation
In general, it is not the case that despite pointwise. Thus, one cannot interchange limits and expectation, without additional conditions on the random variables. To see this, let be a random variable distributed uniformly on . For define a sequence of random variables
with being the indicator function of the event . Then, it follows that (a.s). But, for each . Hence,
Analogously, for general sequence of random variables , the expected value operator is not -additive, i.e.
An example is easily obtained by setting and for , where is as in the previous example.
A number of convergence results specify exact conditions which allow one to interchange limits and expectations, as specified below.
- Monotone convergence theorem: Let be a sequence of random variables, with (a.s) for each . Furthermore, let pointwise. Then, the monotone convergence theorem states that
- Using the monotone convergence theorem, one can show that expectation indeed satisfies countable additivity for non-negative random variables. In particular, let be non-negative random variables. It follows from monotone convergence theorem that
- Fatou's lemma: Let be a sequence of non-negative random variables. Fatou's lemma states that
- Corollary. Let with for all . If (a.s), then
- Proof is by observing that (a.s.) and applying Fatou's lemma.
- Dominated convergence theorem: Let be a sequence of random variables. If pointwise (a.s.), (a.s.), and . Then, according to the dominated convergence theorem,
- Uniform integrability: In some cases, the equality holds when the sequence is uniformly integrable.
There are a number of inequalities involving the expected values of functions of random variables. The following list includes some of the more basic ones.
- Markov's inequality: For a nonnegative random variable and , Markov's inequality states that
- Bienaymé-Chebyshev inequality: Let be an arbitrary random variable with finite expected value and finite variance . The Bienaymé-Chebyshev inequality states that, for any real number ,
- Jensen's inequality: Let be a measurable convex function and a random variable such that . Jensen's inequality states that
- For example, Jensen's inequality implies that since the absolute value function is convex.
- Lyapunov's inequality: Let . Lyapunov's inequality states that
- Proof. Applying Jensen's inequality to and , obtain . Taking the root of each side completes the proof.
- Cauchy–Bunyakovsky–Schwarz inequality: The Cauchy–Bunyakovsky–Schwarz inequality states that
- Hölder's inequality: Let and satisfy , , and . The Hölder's inequality states that
- Minkowski inequality: Let be an integer satisfying . Let, in addition, and . Then, according to the Minkowski inequality, and
Relationship with characteristic function
The probability density function of a scalar random variable is related to its characteristic function by the inversion formula:
For the expected value of (where is a Borel function), we can use this inversion formula to obtain
If is finite, changing the order of integration, we get, in accordance with Fubini–Tonelli theorem,
is the Fourier transform of The expression for also follows directly from Plancherel theorem.
Alternative formula for expected value
For non-negative random variables, one can compute the expected value using an alternative formula involving only the cumulative distribution function of the random variable. Similar formulas for general random variables can be obtained by using the relation and noting that both and are non-negative, for which the following applies.
Finite and countably infinite case
For a non-negative integer-valued random variable
where , and is the cdf of .
If then On the other hand,
so the series on the right diverges to and the equality holds.
be an infinite upper triangular matrix. The double series is the sum of 's elements if summation is done row by row. Since every summand is non-negative, the series either converges absolutely or diverges to In both cases, changing summation order does not affect the sum. Changing summation order, from row-by-row to column-by-column, gives us
In a coin tossing experiment, let the probability of heads be . Including the final attempt, how many tosses can we expect until the first head?
Solution. If is the random variable indicating the numbers of coin tosses before and including the first head, then, for ,
where we took into account the geometric series summation formula. We now compute
If is a non-negative random variable, then
where , and is the cdf of .
1. For every ,
where is the indicator function of . Substituting this into the definition of , obtain
Since and this integral (finite or infinite) meets the requirements of Tonelli's theorem. Changing the order of integration gives us
- Center of mass
- Central tendency
- Chebyshev's inequality (an inequality on location and scale parameters)
- Conditional expectation
- Expected value is also a key concept in economics, finance, and many other subjects
- The general term expectation
- Expectation value (quantum mechanics)
- Law of total expectation –the expected value of the conditional expected value of X given Y is the same as the expected value of X.
- Moment (mathematics)
- Nonlinear expectation (a generalization of the expected value)
- Wald's equation for calculating the expected value of a random number of random variables
- Sheldon M Ross (2007). "§2.4 Expectation of a random variable". Introduction to probability models (9th ed.). Academic Press. p. 38 ff. ISBN 0-12-598062-0.
- Richard W Hamming (1991). "§2.5 Random variables, mean and the expected value". The art of probability for scientists and engineers. Addison–Wesley. p. 64 ff. ISBN 0-201-40686-1.
- "Ore, Pascal and the Invention of Probability Theory". The American Mathematical Monthly. 67 (5): 409–419. 1960. doi:10.2307/2309286.
- Whitworth, W.A. (1901) Choice and Chance with One Thousand Exercises. Fifth edition. Deighton Bell, Cambridge. [Reprinted by Hafner Publishing Co., New York, 1959.]
- "Earliest uses of symbols in probability and statistics".
- Richard W Hamming (1991). "Example 8.7–1 The Cauchy distribution". The art of probability for scientists and engineers. Addison-Wesley. p. 290 ff. ISBN 0-201-40686-1.
Sampling from the Cauchy distribution and averaging gets you nowhere — one sample has the same distribution as the average of 1000 samples!
- Expectation Value, retrieved August 8, 2017
- Papoulis, A. (1984), Probability, Random Variables, and Stochastic Processes, New York: McGraw–Hill, pp. 139–152