TheInfoList

In
probability theory Probability theory is the branch of mathematics concerned with probability. Although there are several different probability interpretations, probability theory treats the concept in a rigorous mathematical manner by expressing it through a set of ...
, the expected value of a random variable $X$, denoted $\operatorname\left(X\right)$ or
arithmetic mean In mathematics and statistics, the arithmetic mean (, stress on first and third syllables of "arithmetic"), or simply the mean or the average (when the context is clear), is the sum of a collection of numbers divided by the count of numbers in the ...
of a large number of independent realizations of $X$. The expected value is also known as the expectation, mathematical expectation, mean, average, or first moment. Expected value is a key concept in
economics Economics () is the social science that studies how people interact with value; in particular, the Production (economics), production, distribution (economics), distribution, and Consumption (economics), consumption of goods and services. ...
,
finance Finance is the study of financial institutions, financial markets and how they operate within the financial system. It is concerned with the creation and management of money and investments. Savers and investors have money available which could ...
, and many other subjects. By definition, the expected value of a constant random variable $X = c$ is $c$. The expected value of a random variable $X$ with equiprobable outcomes $\$ is defined as the arithmetic mean of the terms $c_i.$ If some of the probabilities $\Pr\,\left(X=c_i\right)$ of an individual outcome $c_i$ are unequal, then the expected value is defined to be the probability-weighted average of the $c_i$s, that is, the sum of the $n$ products $c_i\cdot \Pr\,\left(X=c_i\right)$. The expected value of a general random variable involves integration in the sense of Lebesgue.

# History

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 is 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 to
Blaise Pascal Blaise Pascal ( , , ; ; 19 June 1623 – 19 August 1662) was a French mathematician A mathematician is someone who uses an extensive knowledge of mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics ...

by French writer and amateur mathematician Chevalier de Méré in 1654. 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 Pierre de Fermat (; between 31 October and 6 December 1607 – 12 January 1665) was a French lawyer at the '' Parlement'' of Toulouse, France France (), officially the French Republic (french: link=no, République française), is a cou ...

. 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 that 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 Christiaan Huygens ( , also , ; la, Hugenius; 14 April 1629 – 8 July 1695), also spelled Huyghens, was a Dutch mathematician, physicist, astronomer and inventor, who is widely regarded as one of the greatest scientists of all time and a maj ...

, who had just visited Paris, published a treatise (see ) "''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: 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. In the mid-nineteenth century, Pafnuty Chebyshev became the first person to think systematically in terms of the expectations of random variables.

## Etymology

Neither Pascal nor Huygens used the term "expectation" in its modern sense. In particular, Huygens writes: 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:

# Notations

The use of the letter $\mathop$ to denote expected value goes back to William Allen Whitworth, W. A. Whitworth in 1901. The symbol has become popular since then for English writers. In German, $\mathop$ stands for "Erwartungswert", in Spanish for "Esperanza matemática", and in French for "Espérance mathématique". Another popular notation is $\mu_X$, whereas $\langle X\rangle$ is commonly used in physics, and $\mathop\left(X\right)$ in Russian-language literature.

# Definition

## Finite case

Let $X$ be a random variable with a finite number of finite outcomes $x_1, x_2, \ldots, x_k$ occurring with probabilities $p_1, p_2, \ldots, p_k,$ respectively. The expectation of $X$ is defined as :$\operatorname\left[X\right] =\sum_^k x_i\,p_i=x_1p_1 + x_2p_2 + \cdots + x_kp_k.$ Since $p_1 + p_2 + \cdots + p_k = 1,$ the expected value is the weighted sum of the $x_i$ values, with the probabilities $p_i$ as the weights. If all outcomes $x_i$ are equiprobable (that is, $p_1 = p_2 = \cdots = p_k$), then the weighted average turns into the simple arithmetic mean, average. On the other hand, if the outcomes $x_i$ 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 others.

### Examples

*Let $X$ represent the outcome of a roll of a fair six-sided . More specifically, $X$ will be the number of Pip (counting), pips showing on the top face of the after the toss. The possible values for $X$ are 1, 2, 3, 4, 5, and 6, all of which are equally likely with a probability of . The expectation of $X$ is :: $\operatorname\left[X\right] = 1\cdot\frac16 + 2\cdot\frac16 + 3\cdot\frac16 + 4\cdot\frac16 + 5\cdot\frac16 + 6\cdot\frac16 = 3.5.$ :If one rolls the $n$ times and computes the average (
arithmetic mean In mathematics and statistics, the arithmetic mean (, stress on first and third syllables of "arithmetic"), or simply the mean or the average (when the context is clear), is the sum of a collection of numbers divided by the count of numbers in the ...
) of the results, then as $n$ grows, the average will almost surely Convergent sequence, 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 $X$ represents the (monetary) outcome of a $1 bet on a single number ("straight up" bet). If the bet wins (which happens with probability in American roulette), the payoff is$35; otherwise the player loses the bet. The expected profit from such a bet will be :: $\operatorname\left[\,\text\1\text\,\right] = -\1 \cdot \frac + \35 \cdot \frac = -\\frac.$ :That is, the bet of \$1 stands to lose $-\\frac$, so its expected value is $-\\frac.$

## 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 $X$ be a non-negative random variable with a countable set of outcomes $x_1, x_2, \ldots,$ occurring with probabilities $p_1, p_2, \ldots,$ respectively. Analogous to the discrete case, the expected value of $X$ is then defined as the series : $\operatorname\left[X\right] = \sum_^\infty x_i\, p_i.$ Note that since $x_i p_i \geq 0$, the infinite sum is well-defined and does not depend on the absolute convergence, order in which it is computed. Unlike the finite case, the expectation here can be equal to infinity, if the infinite sum above increases without bound. For a general (not necessarily non-negative) random variable $X$ with a countable number of outcomes, set $X^+\left(\omega\right)=\max\left(X\left(\omega\right),0\right)$ and $X^-\left(\omega\right)=-\min\left(X\left(\omega\right),0\right)$. By definition, :$\operatorname\left[X\right] = \operatorname\left[X^+\right] - \operatorname\left[X^-\right].$ Like with non-negative random variables,

### Examples

*Suppose $x_i = i$ and $p_i = \frac,$ for $i = 1, 2, 3, \ldots$, where $k = \frac$ (with $\ln$ 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 ::$\operatorname\left[X\right]= \sum_i x_i p_i = 1\left\left(\frac\right\right) + 2\left\left(\frac\right\right) + 3\left\left(\frac\right\right) + \dots = \frac+\frac+\frac+\dots = k.$ *An example where the expectation is infinite arises in the context of the St. Petersburg paradox. Let $x_i=2^i$ and $p_i=\frac$ for $i = 1, 2, 3, \ldots$. Once again, since the random variable is non-negative, the expected value calculation gives ::$\operatorname\left[X\right]= \sum_^\infty x_i\,p_i =2\cdot \frac+4\cdot\frac + 8\cdot\frac+ 16\cdot\frac+ \cdots = 1 + 1 + 1 + 1 + \cdots \, = \infty.$ *For an example where the expectation is not well-defined, suppose the random variable $X$ takes values $k = 1, -2,3, -4,\cdots$ with respective probabilities $\frac,\frac,\frac,\frac$, ..., where $c=\frac$ is a normalizing constant that ensures the probabilities sum up to one. :Then it follows that $X^+$ takes value $\left(2k-1\right)$ with probability $c/\left(2k-1\right)^2$ for $k = 1,2,3,\cdots$ and takes value $0$ with remaining probability. Similarly, $X^-$ takes value $2k$ with probability $c/\left(2k\right)^2$ for $k = 1,2,3,\cdots$ and takes value $0$ with remaining probability. Using the definition for non-negative random variables, one can show that both $\operatorname\left[X^+\right] = \infty$ and $\operatorname\left[X^-\right] = \infty$ (see harmonic series (mathematics), Harmonic series). Hence, the expectation of $X$ is not well-defined.

## Absolutely continuous case

If $X$ is a random variable with a probability density function of $f\left(x\right)$, then the expected value is defined as the Lebesgue integral : $\operatorname\left[X\right] = \int_ x f\left(x\right)\, dx,$ where the values on both sides are well defined or not well defined simultaneously. Example. A random variable that has the Cauchy distribution has a density function, but the expected value is undefined since the distribution has Heavy-tailed distribution, large "tails".

## General case

In general, if $X$ is a random variable defined on a probability space $\left(\Omega,\Sigma,\operatorname\right)$, then the expected value of $X$, denoted by

# Basic properties

The basic properties below (and their names in bold) replicate or follow immediately from those of Lebesgue integral. Note that the letters "a.s." stand for "almost surely"—a central property of the Lebesgue integral. Basically, one says that an inequality like $X \geq 0$ is true almost surely, when the probability measure attributes zero-mass to the complementary event $\left\$. *For a general random variable $X$, define as before $X^+\left(\omega\right)=\max\left(X\left(\omega\right),0\right)$ and $X^-\left(\omega\right)=-\min\left(X\left(\omega\right),0\right)$, and note that $X=X^+-X^-$, with both $X^+$ and $X^-$ nonnegative, then: :$\operatorname\left[X\right] = \begin \operatorname\left[X^+\right] - \operatorname\left[X^-\right] & \text \operatorname\left[X^+\right] < \infty \text \operatorname\left[X^-\right] < \infty;\\ \infty & \text \operatorname\left[X^+\right] = \infty \text \operatorname\left[X^-\right] < \infty;\\ -\infty & \text \operatorname\left[X^+\right] < \infty \text \operatorname\left[X^-\right] = \infty;\\ \text & \text \operatorname\left[X^+\right] = \infty \text \operatorname\left[X^-\right] = \infty. \end$ *Let $_A$ denote the indicator function of an Event (probability theory), event $A$, then $\operatorname\left[_A\right] =1\cdot\operatorname\left(A\right)+0\cdot\operatorname\left(\Omega\setminus A\right) = \operatorname\left(A\right).$ *Formulas in terms of CDF: If $F\left(x\right)$ is the cumulative distribution function of the probability measure $\operatorname,$ and $X$ is a random variable, then :$\operatorname\left[X\right] = \int_x\,dF\left(x\right),$ :where the values on both sides are well defined or not well defined simultaneously, and the integral is taken in the sense of Lebesgue-Stieltjes integral, Lebesgue-Stieltjes. Here, $\overline\mathbb = \left[-\infty,+\infty\right]$ is the extended real line. :Additionally, :$\displaystyle \operatorname\left[X\right] = \int\limits_0^\infty \left(1-F\left(x\right)\right)\,dx - \int\limits^0_ F\left(x\right)\,dx,$ :with the integrals taken in the sense of Lebesgue. :The proof of the second formula follows. : *Non-negativity: If $X \geq 0$ (a.s.), then $\operatorname\left[ X\right] \geq 0$. *Linearity of expectation: The expected value operator (or expectation operator) $\operatorname\left[\cdot\right]$ is linear operator, linear in the sense that, for any random variables $X$ and $Y$, and a constant $a$, ::$\begin \operatorname\left[X + Y\right] &= \operatorname\left[X\right] + \operatorname\left[Y\right], \\ \operatorname\left[aX\right] &= a \operatorname\left[X\right], \end$ :whenever the right-hand side is well-defined. This means that the expected value of the sum of any finite number of random variables is the sum of the expected values of the individual random variables, and the expected value scales linearly with a multiplicative constant. Symbolically, for $N$ random variables $X_$ and constants $a_ \left(1\leq i \leq N\right)$, we have $\operatorname\left[\sum_^a_X_\right] = \sum_^a_\operatorname\left[X_\right]$. *Monotonicity: If $X\leq Y$ almost surely, (a.s.), and both

# Uses and applications

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 von Neumann–Morgenstern utility function, 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 criterion for a "good" estimator is that it is unbiased estimator, unbiased; that is, the expected value of the estimate is equal to the true value of the underlying parameter. 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 Statistical frequency, frequencies. The expected values of the powers of ''X'' are called the moment (mathematics), moments of ''X''; the moment about the mean, 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 Estimation theory, estimate the expected value of a random variable, one repeatedly measures observations of the variable and computes the
arithmetic mean In mathematics and statistics, the arithmetic mean (, stress on first and third syllables of "arithmetic"), or simply the mean or the average (when the context is clear), is the sum of a collection of numbers divided by the count of numbers in the ...
of the results. If the expected value exists, this procedure estimates the true expected value in an estimator bias, unbiased manner and has the property of minimizing the sum of the squares of the errors and residuals in statistics, residuals (the sum of the squared differences between the observations and the estimator, estimate). The law of large numbers demonstrates (under fairly mild conditions) that, as the Sample size, size of the statistical sample, sample gets larger, the variance of this estimator, 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. $\operatorname\left(\right) = \operatorname\left[_\right]$, where $_$ is the indicator function of the set $\mathcal$. 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 :$\operatorname\left(X\right)= \operatorname\left[X^2\right] - \left(\operatorname\left[X\right]\right)^2.$ A very important application of the expectation value is in the field of quantum mechanics. The expectation value of a quantum mechanical operator $\hat$ operating on a quantum state vector $, \psi\rangle$ is written as $\langle\hat\rangle = \langle\psi, A, \psi\rangle$. The uncertainty principle, uncertainty in $\hat$ can be calculated using the formula $\left(\Delta A\right)^2 = \langle\hat^2\rangle - \langle \hat \rangle^2$.

## Interchanging limits and expectation

In general, it is not the case that

## Inequalities

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 $X$ and $a>0$, Markov's inequality states that :$\operatorname\left(X\geq a\right)\leq\frac.$ *Bienaymé-Chebyshev inequality: Let $X$ be an arbitrary random variable with finite expected value

# Relationship with characteristic function

The probability density function $f_X$ of a scalar random variable $X$ is related to its characteristic function (probability), characteristic function $\varphi_X$ by the inversion formula: : $f_X\left(x\right) = \frac\int_ e^\varphi_X\left(t\right) \, \mathrmt.$ For the expected value of $g\left(X\right)$ (where $g:\to$ is a Measurable function, Borel function), we can use this inversion formula to obtain :$\operatorname\left[g\left(X\right)\right] = \frac \int_ g\left(x\right)\left\left[ \int_ e^\varphi_X\left(t\right) \, \mathrmt \right\right]\,\mathrmx.$ If $\operatorname\left[g\left(X\right)\right]$ is finite, changing the order of integration, we get, in accordance with Fubini theorem, Fubini–Tonelli theorem, :$\operatorname\left[g\left(X\right)\right] = \frac \int_ G\left(t\right) \varphi_X\left(t\right) \, \mathrmt,$ where :$G\left(t\right) = \int_ g\left(x\right) e^ \, \mathrmx$ is the Fourier transform of $g\left(x\right).$ The expression for $\operatorname\left[g\left(X\right)\right]$ also follows directly from Plancherel theorem.