In probability theory, the expected value of a random variable, intuitively, is the long-run average value of repetitions of the same experiment it represents. For example, the expected value in rolling a six-sided die is 3.5, because the average of all the numbers that come up is 3.5 as the number of rolls approaches infinity (see § Examples for details). In other words, the law of large numbers states that the arithmetic mean of the values almost surely converges to the expected value as the number of repetitions approaches infinity. The expected value is also known as the expectation, mathematical expectation, EV, average, mean value, mean, or first moment.

More practically, the expected value of a discrete random variable is the probability-weighted average of all 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.[1][2]

The expected value does not exist for random variables having some distributions with large "tails", such as the Cauchy distribution.[3] For random variables such as these, the long-tails of the distribution prevent the sum or integral from converging.

The expected value is a key aspect of how one characterizes a probability distribution; it is one type of location parameter. By contrast, the variance is a measure of dispersion of the possible values of the random variable around the expected value. The variance itself is defined in terms of two expectations: it is the expected value of the squared deviation of the variable's value from the variable's expected value (var(X) = E[(X - E[X])2] = E(X2) - [E(X)]2).

The expected value plays important roles in a variety of contexts. In regression analysis, one desires a formula in terms of observed data that will give a "good" estimate of the parameter giving the effect of some explanatory variable upon a dependent variable. The formula will give different estimates using different samples of data, so the estimate it gives is itself a random variable. A formula is typically considered good in this context if it is an unbiased estimator— that is if the expected value of the estimate (the average value it would give over an arbitrarily large number of separate samples) can be shown to equal the true value of the desired parameter.

In decision theory, and in particular in choice under uncertainty, an agent is described as making an optimal choice in the context of incomplete information. For risk neutral agents, the choice involves using the expected values of uncertain quantities, while for risk averse agents it involves maximizing the expected value of some objective function such as a von Neumann–Morgenstern utility function. One example of using expected value in reaching optimal decisions is the Gordon–Loeb model of information security investment. According to the model, one can conclude that the amount a firm spends to protect information should generally be only a small fraction of the expected loss (i.e., the expected value of the loss resulting from a cyber or information security breach).[4]



Finite caseEdit

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. This is intuitive: the expected value of a random variable is the average of all values it can take; thus the expected value is what one expects to happen on 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. The intuition however remains the same: the expected value of   is what one expects to happen on average.

An illustration of the convergence of sequence averages of rolls of a die to the expected value of 3.5 as the number of rolls (trials) grows.


  • 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/6. 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. One example sequence of ten rolls of the die is 2, 3, 1, 2, 5, 6, 2, 2, 2, 6, which has the average of 3.1, with the distance of 0.4 from the expected value of 3.5. The convergence is relatively slow: the probability that the average falls within the range 3.5 ± 0.1 is 21.6% for ten rolls, 46.1% for a hundred rolls and 93.7% for a thousand rolls. See the figure for an illustration of the averages of longer sequences of rolls of the die and how they converge to the expected value of 3.5. More generally, the rate of convergence can be roughly quantified by e.g. Chebyshev's inequality and the Berry–Esseen theorem.
  • 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/38 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 $0.0526, so its expected value is -$0.0526.

Countably infinite caseEdit

Let   be a random variable with a countable set of finite outcomes  ,  , ..., occurring with probabilities  ,  , ..., respectively, such that the infinite sum   converges. The expected value of   is defined as the series


Remark 1. Observe that  

Remark 2. Due to absolute convergence, the expected value does not depend on the order in which the outcomes are presented. By contrast, a conditionally convergent series can be made to converge or diverge arbitrarily, via the Riemann rearrangement theorem.


  • Suppose   and   for  , where   (with   being the natural logarithm) is the scale factor such that the probabilities sum to 1. Then
Since this series converges absolutely, the expected value of   is  .
  • For an example that is not absolutely convergent, suppose 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 the infinite sum
converges and its sum is equal to  . However it would be incorrect to claim that the expected value of   is equal to this number—in fact   does not exist (finite or infinite), as this series does not converge absolutely (see Alternating harmonic series).
  • An example that diverges arises in the context of the St. Petersburg paradox. Let   and   for  . The expected value calculation gives
Since this does not converge but instead keeps growing, the expected value is infinite.

Absolutely continuous caseEdit

If   is a random variable whose cumulative distribution function admits a density  , then the expected value is defined as the following Lebesgue integral:


Remark. From computational perspective, the integral in the definition of   may often be treated as an improper Riemann integral   Specifically, if the function   is Riemann-integrable on every finite interval  , and


then the values (whether finite or infinite) of both integrals agree.

General caseEdit

In general, if   is a random variable defined on a probability space  , then the expected value of  , denoted by  ,  , or  , is defined as the Lebesgue integral


Remark 1. If   and  , then   The functions   and   can be shown to be measurable (hence, random variables), and, by definition of Lebesgue integral,


where   and   are non-negative and possibly infinite.

The following scenarios are possible:

  •   is finite, i.e.  
  •   is infinite, i.e.   and  
  •   is neither finite nor infinite, i.e.  

Remark 2. If   is the cumulative distribution function of  , then


where the integral is interpreted in the sense of Lebesgue–Stieltjes.

Remark 3. An example of a distribution for which there is no expected value is Cauchy distribution.

Remark 4. For multidimensional random variables, their expected value is defined per component, i.e.


and, for a random matrix   with elements  ,


Basic propertiesEdit

The properties below replicate or follow immediately from those of Lebesgue integral.


If   is an event, then   where   is the indicator function of the set  .

Proof. By definition of Lebesgue integral of the simple function  ,


If X = Y (a.s.) then E[X] = E[Y]Edit

The statement follows from the definition of Lebesgue integral if we notice that   (a.s.),   (a.s.), and that changing a simple random variable on a set of probability zero does not alter the expected value.

Expected value of a constantEdit

If   is a random variable, and   (a.s.), where  , then  . In particular, for an arbitrary random variable  ,  .


The expected value operator (or expectation operator)   is linear in the sense that


where   and   are arbitrary random variables, and   is a constant.

More rigorously, let   and   be random variables whose expected values are defined (different from  ).

  • If   is also defined (i.e. differs from  ), then
  • Let   be finite, and   be a finite scalar. Then  

E[X] exists and is finite if and only if E[|X|] is finiteEdit

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,  . The above equivalency relies on the definition of Lebesgue integral and measurability of  .

Remark. For the reasons above, the expressions "  is integrable" and "the expected value of   is finite" are used interchangeably when speaking of a random variable throughout this article.

If X ≥ 0 (a.s.) then E[X] ≥ 0Edit


If   (a.s.), and both   and   exist, then  .

Remark.   and   exist in the sense that   and  

Proof follows from the linearity and the previous property if we set   and notice that   (a.s.).

If   (a.s.) and   is finite then so is  Edit

Let   and   be random variables such that   (a.s.) and  . Then  .

Proof. Due to non-negativity of  ,   exists, finite or infinite. By monotonicity,  , so   is finite which, as we saw earlier, is equivalent to   being finite.

If   and   then  Edit

The proposition below will be used to prove the extremal property of   later on.

Proposition. If   is a random variable, then so is  , for every  . If, in addition,   and  , then  .

Counterexample for infinite measureEdit

The requirement that   is essential. By way of counterexample, consider the measurable space


where   is the Borel  -algebra on the interval   and   is the linear Lebesgue measure. The reader can prove that   even though   (Sketch of proof:   and   define a measure   on   Use "continuity from below" w.r. to   and reduce to Riemann integral on each finite subinterval  ).

Extremal propertyEdit

Recall, as we proved early on, that if   is a random variable, then so is  .

Proposition (extremal property of  ). Let   be a random variable, and  . Then   and   are finite, and   is the best least squares approximation for   among constants. Specifically,

  • for every  ,  
  • equality holds if and only if  

(  denotes the variance of  ).

Remark (intuitive interpretation of extremal property). In intuitive terms, the extremal property says that if one is asked to predict the outcome of a trial of a random variable  , then  , in some practically useful sense, is one's best bet if no advance information about the outcome is available. If, on the other hand, one does have some advance knowledge   regarding the outcome, then — again, in some practically useful sense — one's bet may be improved upon by using conditional expectations   (of which   is a special case) rather than  .

Proof of proposition. By the above properties, both   and   are finite, and


whence the extremal property follows.


If  , then   (a.s.).

If   then   (a.s.)Edit

Corollary: if   then   (a.s.)Edit

Corollary: if   then   (a.s.)Edit


For an arbitrary random variable  ,  .

Proof. By definition of Lebesgue integral,


Note that this result can also be proved based on Jensen's inequality.


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




The amount by which the multiplicativity fails is called the covariance:


However, if   and   are independent, then  , and  .

Counterexample:   despite   pointwiseEdit

Let   be the probability space, where   is the Borel  -algebra on   and   the linear Lebesgue measure. For   define a sequence of random variables


and a random variable


on  , with   being the indicator function of the set  .

For every   as     and


so   On the other hand,   and hence  

Countable non-additivityEdit

In general, the expected value operator is not  -additive, i.e.


By way of counterexample, let   be the probability space, where   is the Borel  -algebra on   and   the linear Lebesgue measure. Define a sequence of random variables   on  , with   being the indicator function of the set  . For the pointwise sums, we have


By finite additivity,


On the other hand,   and hence


Countable additivity for non-negative random variablesEdit

Let   be non-negative random variables. It follows from monotone convergence theorem that



Cauchy–Bunyakovsky–Schwarz inequalityEdit

The Cauchy–Bunyakovsky–Schwarz inequality states that


Markov's inequalityEdit

For a nonnegative random variable   and  , Markov's inequality states that


Bienaymé-Chebyshev inequalityEdit

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 inequalityEdit

Let   be a Borel convex function and   a random variable such that  . Jensen's inequality states that


Remark 1. The expected value   is well-defined even if   is allowed to assume infinite values. Indeed,   implies that   (a.s.), so the random variable   is defined almost sure, and therefore there is enough information to compute  

Remark 2. Jensen's inequality implies that   since the absolute value function is convex.

Lyapunov's inequalityEdit

Let  . Lyapunov's inequality states that


Proof. Applying Jensen's inequality to   and  , obtain  . Taking the  th root of each side completes the proof.



Hölder's inequalityEdit

Let   and   satisfy  ,  , and  . The Hölder's inequality states that


Minkowski inequalityEdit

Let   be an integer satisfying  . Let, in addition,   and  . Then, according to the Minkowski inequality,   and


Taking limits under the signEdit

Monotone convergence theoremEdit

Let the sequence of random variables   and the random variables   and   be defined on the same probability space   Suppose that

  • all the expected values     and   are defined (differ from  );
  • for every  
  •   is the pointwise limit of   (a.s.), i.e.   (a.s.).

The monotone convergence theorem states that


Fatou's lemmaEdit

Let the sequence of random variables   and the random variable   be defined on the same probability space   Suppose that

  • all the expected values     and   are defined (differ from  );
  •   (a.s.), for every  

Fatou's lemma states that


(Note that   is a random variable, for every   by the properties of limit inferior).

Corollary. Let

  •   pointwise (a.s.);
  •   for some constant   (independent from  );
  •   (a.s.), for every  


Proof is by observing that   (a.s.) and applying Fatou's lemma.

Dominated convergence theoremEdit

Let   be a sequence of random variables. If   pointwise (a.s.),   (a.s.), and  . Then, according to the dominated convergence theorem,

  • the function   is measurable (hence a random variable);
  •  ;
  • all the expected values   and   are defined (do not have the form  );
  •   (both sides may be infinite);

Uniform integrabilityEdit

In some cases, the equality   holds when the sequence   is uniformly integrable.

Relationship with characteristic functionEdit

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.

Uses and applicationsEdit

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  .

The mass of probability distribution is balanced at the expected value, here a Beta(α,β) distribution with expected value α/(α+β).

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].

Expected values can also be used to compute the variance, by means of the computational formula for the variance


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  .

The law of the unconscious statisticianEdit

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.[5][6]

Alternative formula for expected valueEdit

Formula for non-negative random variablesEdit

Finite and countably infinite caseEdit

For a non-negative integer-valued random variable