# Expected value

Last updated

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.

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 axioms. Typically these axioms formalise probability in terms of a probability space, which assigns a measure taking values between 0 and 1, termed the probability measure, to a set of outcomes called the sample space. Any specified subset of these outcomes is called an event.

In probability and statistics, a random variable, random quantity, aleatory variable, or stochastic variable is a variable whose possible values are outcomes of a random phenomenon. More specifically, a random variable is defined as a function that maps the outcomes of an unpredictable process to numerical quantities, typically real numbers. It is a variable, in the sense that it depends on the outcome of an underlying process providing the input to this function, and it is random in the sense that the underlying process is assumed to be random.

Dice are small throwable objects that can rest in multiple positions, used for generating random numbers. Dice are suitable as gambling devices for games like craps and are also used in non-gambling tabletop games.

## Contents

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]

In probability theory, a probability density function (PDF), or density of a continuous random variable, is a function whose value at any given sample in the sample space can be interpreted as providing a relative likelihood that the value of the random variable would equal that sample. In other words, while the absolute likelihood for a continuous random variable to take on any particular value is 0, the value of the PDF at two different samples can be used to infer, in any particular draw of the random variable, how much more likely it is that the random variable would equal one sample compared to the other sample.

In mathematics, a probability measure is a real-valued function defined on a set of events in a probability space that satisfies measure properties such as countable additivity. The difference between a probability measure and the more general notion of measure is that a probability measure must assign value 1 to the entire probability space.

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.

In probability theory and statistics, a probability distribution is a mathematical function that provides the probabilities of occurrence of different possible outcomes in an experiment. In more technical terms, the probability distribution is a description of a random phenomenon in terms of the probabilities of events. For instance, if the random variable X is used to denote the outcome of a coin toss, then the probability distribution of X would take the value 0.5 for X = heads, and 0.5 for X = tails. Examples of random phenomena can include the results of an experiment or survey.

In probability theory, heavy-tailed distributions are probability distributions whose tails are not exponentially bounded: that is, they have heavier tails than the exponential distribution. In many applications it is the right tail of the distribution that is of interest, but a distribution may have a heavy left tail, or both tails may be heavy.

The Cauchy distribution, named after Augustin Cauchy, is a continuous probability distribution. It is also known, especially among physicists, as the Lorentz distribution, Cauchy–Lorentz distribution, Lorentz(ian) function, or Breit–Wigner distribution. The Cauchy distribution is the distribution of the x-intercept of a ray issuing from with a uniformly distributed angle. It is also the distribution of the ratio of two independent normally distributed random variables if the denominator distribution has mean zero.

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(X2) - [E(X)]2).

In statistics, a location family is a class of probability distributions that is parametrized by a scalar- or vector-valued parameter , which determines the "location" or shift of the distribution. Formally, this means that the probability density functions or probability mass functions in this class have the form

In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its mean. Informally, it measures how far a set of (random) numbers are spread out from their average value. Variance has a central role in statistics, where some ideas that use it include descriptive statistics, statistical inference, hypothesis testing, goodness of fit, and Monte Carlo sampling. Variance is an important tool in the sciences, where statistical analysis of data is common. The variance is the square of the standard deviation, the second central moment of a distribution, and the covariance of the random variable with itself, and it is often represented by , , or .

In statistics, dispersion is the extent to which a distribution is stretched or squeezed. Common examples of measures of statistical dispersion are the variance, standard deviation, and interquartile range.

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 statistical modeling, regression analysis is a set of statistical processes for estimating the relationships among variables. It includes many techniques for modeling and analyzing several variables, when the focus is on the relationship between a dependent variable and one or more independent variables. More specifically, regression analysis helps one understand how the typical value of the dependent variable changes when any one of the independent variables is varied, while the other independent variables are held fixed.

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]

Decision theory is the study of the reasoning underlying an agent's choices. Decision theory can be broken into two branches: normative decision theory, which gives advice on how to make the best decisions given a set of uncertain beliefs and a set of values, and descriptive decision theory which analyzes how existing, possibly irrational agents actually make decisions.

In economics and finance, risk aversion is the behavior of humans, who, when exposed to uncertainty, attempt to lower that uncertainty. It is the hesitation of a person to agree to a situation with an unknown payoff rather than another situation with a more predictable payoff but possibly lower expected payoff. For example, a risk-averse investor might choose to put their money into a bank account with a low but guaranteed interest rate, rather than into a stock that may have high expected returns, but also involves a chance of losing value.

## Definition

### Finite case

Let ${\displaystyle X}$ be a random variable with a finite number of finite outcomes ${\displaystyle x_{1}}$, ${\displaystyle x_{2}}$, ..., ${\displaystyle x_{k}}$ occurring with probabilities ${\displaystyle p_{1}}$, ${\displaystyle p_{2}}$, ..., ${\displaystyle p_{k}}$, respectively. The expectation of ${\displaystyle X}$ is defined as

${\displaystyle \operatorname {E} [X]=\sum _{i=1}^{k}x_{i}\,p_{i}=x_{1}p_{1}+x_{2}p_{2}+\cdots +x_{k}p_{k}.}$

Since all probabilities ${\displaystyle p_{i}}$ add up to 1 (${\displaystyle p_{1}+p_{2}+\cdots +p_{k}=1}$), the expected value is the weighted average, with ${\displaystyle p_{i}}$’s being the weights.

If all outcomes ${\displaystyle x_{i}}$ are equiprobable (that is, ${\displaystyle p_{1}=p_{2}=\cdots =p_{k}}$), 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 ${\displaystyle 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 the others. The intuition however remains the same: the expected value of ${\displaystyle X}$ is what one expects to happen on average.

#### Examples

• Let ${\displaystyle X}$ represent the outcome of a roll of a fair six-sided die. More specifically, ${\displaystyle X}$ will be the number of pips showing on the top face of the die after the toss. The possible values for ${\displaystyle X}$ are 1, 2, 3, 4, 5, and 6, all of which are equally likely with a probability of 1/6. The expectation of ${\displaystyle X}$ is
${\displaystyle \operatorname {E} [X]=1\cdot {\frac {1}{6}}+2\cdot {\frac {1}{6}}+3\cdot {\frac {1}{6}}+4\cdot {\frac {1}{6}}+5\cdot {\frac {1}{6}}+6\cdot {\frac {1}{6}}=3.5.}$
If one rolls the die ${\displaystyle n}$ times and computes the average (arithmetic mean) of the results, then as ${\displaystyle n}$ 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 ${\displaystyle X}$ 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
${\displaystyle \operatorname {E} [\,{\text{gain from }}\1{\text{ bet}}\,]=-\1\cdot {\frac {37}{38}}+\35\cdot {\frac {1}{38}}=-\0.0526.}$
That is, the bet of $1 stands to lose$0.0526, so its expected value is -\$0.0526.

### Countably infinite case

Let ${\displaystyle X}$ be a random variable with a countable set of finite outcomes ${\displaystyle x_{1}}$, ${\displaystyle x_{2}}$, ..., occurring with probabilities ${\displaystyle p_{1}}$, ${\displaystyle p_{2}}$, ..., respectively, such that the infinite sum ${\displaystyle \textstyle \sum _{i=1}^{\infty }|x_{i}|\,p_{i}}$ converges. The expected value of ${\displaystyle X}$ is defined as the series

${\displaystyle \operatorname {E} [X]=\sum _{i=1}^{\infty }x_{i}\,p_{i}.}$

Remark 1. Observe that ${\displaystyle \textstyle {\Bigl |}\operatorname {E} [X]{\Bigr |}\leq \sum _{i=1}^{\infty }|x_{i}|\,p_{i}<\infty .}$

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.

#### Example

• Suppose ${\displaystyle x_{i}=i}$ and ${\displaystyle p_{i}={\frac {k}{i2^{i}}},}$ for ${\displaystyle i=1,2,3,\ldots }$, where ${\displaystyle k={\frac {1}{\ln 2}}}$ (with ${\displaystyle \ln }$ being the natural logarithm) is the scale factor such that the probabilities sum to 1. Then
${\displaystyle \operatorname {E} [X]=1\left({\frac {k}{2}}\right)+2\left({\frac {k}{8}}\right)+3\left({\frac {k}{24}}\right)+\dots ={\frac {k}{2}}+{\frac {k}{4}}+{\frac {k}{8}}+\dots =k.}$
Since this series converges absolutely, the expected value of ${\displaystyle X}$ is ${\displaystyle k}$.
• For an example that is not absolutely convergent, suppose random variable ${\displaystyle X}$ takes values 1, −2, 3, −4, ..., with respective probabilities ${\displaystyle {\frac {c}{1^{2}}},{\frac {c}{2^{2}}},{\frac {c}{3^{2}}},{\frac {c}{4^{2}}}}$, ..., where ${\displaystyle c={\frac {6}{\pi ^{2}}}}$ is a normalizing constant that ensures the probabilities sum up to one. Then the infinite sum
${\displaystyle \sum _{i=1}^{\infty }x_{i}\,p_{i}=c\,{\bigg (}1-{\frac {1}{2}}+{\frac {1}{3}}-{\frac {1}{4}}+\dotsb {\bigg )}}$
converges and its sum is equal to ${\displaystyle {\frac {6\ln 2}{\pi ^{2}}}\approx 0.421383}$. However it would be incorrect to claim that the expected value of ${\displaystyle X}$ is equal to this number—in fact ${\displaystyle \operatorname {E} [X]}$ 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 ${\displaystyle x_{i}=2^{i}}$ and ${\displaystyle p_{i}={\frac {1}{2^{i}}}}$ for ${\displaystyle i=1,2,3,\ldots }$. The expected value calculation gives
${\displaystyle \sum _{i=1}^{\infty }x_{i}\,p_{i}=2\cdot {\frac {1}{2}}+4\cdot {\frac {1}{4}}+8\cdot {\frac {1}{8}}+16\cdot {\frac {1}{16}}+\cdots =1+1+1+1+\cdots \,.}$
Since this does not converge but instead keeps growing, the expected value is infinite.

### Absolutely continuous case

If ${\displaystyle X}$ is a random variable whose cumulative distribution function admits a density ${\displaystyle f(x)}$, then the expected value is defined as the following Lebesgue integral:

${\displaystyle \operatorname {E} [X]=\int _{\mathbb {R} }xf(x)\,dx.}$

Remark. From computational perspective, the integral in the definition of ${\displaystyle \operatorname {E} [X]}$ may often be treated as an improper Riemann integral ${\displaystyle \textstyle \int _{-\infty }^{+\infty }xf(x)\,dx.}$ Specifically, if the function ${\displaystyle xf(x)}$ is Riemann-integrable on every finite interval ${\displaystyle [a,b]}$, and

${\displaystyle \min \left((-1)\cdot {\hbox{(R)}}\int _{-\infty }^{0}xf(x)\,dx,\ {\hbox{(R)}}\int _{0}^{+\infty }xf(x)\,dx\right)<\infty ,}$

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

### General case

In general, if ${\displaystyle X}$ is a random variable defined on a probability space ${\displaystyle (\Omega ,\Sigma ,\operatorname {P} )}$, then the expected value of ${\displaystyle X}$, denoted by ${\displaystyle \operatorname {E} [X]}$, ${\displaystyle \langle X\rangle }$, or ${\displaystyle {\bar {X}}}$, is defined as the Lebesgue integral

${\displaystyle \operatorname {E} [X]=\int _{\Omega }X(\omega )\,d\operatorname {P} (\omega ).}$

Remark 1. If ${\displaystyle X_{+}(\omega )=\max(X(\omega ),0)}$ and ${\displaystyle X_{-}(\omega )=-\min(X(\omega ),0)}$, then ${\displaystyle X=X_{+}-X_{-}.}$ The functions ${\displaystyle X_{+}}$ and ${\displaystyle X_{-}}$ can be shown to be measurable (hence, random variables), and, by definition of Lebesgue integral,

{\displaystyle {\begin{aligned}\operatorname {E} [X]&=\int _{\Omega }X(\omega )\,d\operatorname {P} (\omega )\\&=\int _{\Omega }X_{+}(\omega )\,d\operatorname {P} (\omega )-\int _{\Omega }X_{-}(\omega )\,d\operatorname {P} (\omega )\\&=\operatorname {E} [X_{+}]-\operatorname {E} [X_{-}],\end{aligned}}}

where ${\displaystyle \operatorname {E} [X_{+}]}$ and ${\displaystyle \operatorname {E} [X_{-}]}$ are non-negative and possibly infinite.

The following scenarios are possible:

• ${\displaystyle \operatorname {E} [X]}$ is finite, i.e. ${\displaystyle \max(\operatorname {E} [X_{+}],\operatorname {E} [X_{-}])<\infty ;}$
• ${\displaystyle \operatorname {E} [X]}$ is infinite, i.e. ${\displaystyle \max(\operatorname {E} [X_{+}],\operatorname {E} [X_{-}])=\infty }$ and ${\displaystyle \min(\operatorname {E} [X_{+}],\operatorname {E} [X_{-}])<\infty ;}$
• ${\displaystyle \operatorname {E} [X]}$ is neither finite nor infinite, i.e. ${\displaystyle \operatorname {E} [X_{+}]=\operatorname {E} [X_{-}]=\infty .}$

Remark 2. If ${\displaystyle F_{X}(x)=\operatorname {P} (X\leq x)}$ is the cumulative distribution function of ${\displaystyle X}$, then

${\displaystyle \operatorname {E} [X]=\int _{-\infty }^{+\infty }x\,dF_{X}(x),}$

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.

${\displaystyle \operatorname {E} [(X_{1},\ldots ,X_{n})]=(\operatorname {E} [X_{1}],\ldots ,\operatorname {E} [X_{n}])}$

and, for a random matrix ${\displaystyle X}$ with elements ${\displaystyle X_{ij}}$,

${\displaystyle (\operatorname {E} [X])_{ij}=\operatorname {E} [X_{ij}].}$

## Basic properties

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

### ${\displaystyle \operatorname {E} [{\mathbf {1} }_{A}]=\operatorname {P} (A)}$

If ${\displaystyle A}$ is an event, then ${\displaystyle \operatorname {E} [{\mathbf {1} }_{A}]=\operatorname {P} (A),}$ where ${\displaystyle {\mathbf {1} }_{A}}$ is the indicator function of the set ${\displaystyle A}$.

Proof. By definition of Lebesgue integral of the simple function ${\displaystyle {\mathbf {1} }_{A}={\mathbf {1} }_{A}(\omega )}$,

${\displaystyle \operatorname {E} [{\mathbf {1} }_{A}]=1\cdot \operatorname {P} (A)+0\cdot \operatorname {P} (\Omega \setminus A)=\operatorname {P} (A).}$

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

The statement follows from the definition of Lebesgue integral if we notice that ${\displaystyle X_{+}=Y_{+}}$ (a.s.), ${\displaystyle X_{-}=Y_{-}}$ (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 constant

If ${\displaystyle X}$ is a random variable, and ${\displaystyle X=c}$ (a.s.), where ${\displaystyle c\in [-\infty ,+\infty ]}$, then ${\displaystyle \operatorname {E} [X]=c}$. In particular, for an arbitrary random variable ${\displaystyle X}$, ${\displaystyle \operatorname {E} [\operatorname {E} [X]]=\operatorname {E} [X]}$.

### Linearity

The expected value operator (or expectation operator) ${\displaystyle \operatorname {E} [\cdot ]}$ is linear in the sense that

{\displaystyle {\begin{aligned}\operatorname {E} [X+Y]&=\operatorname {E} [X]+\operatorname {E} [Y],\\[6pt]\operatorname {E} [aX]&=a\operatorname {E} [X],\end{aligned}}}

where ${\displaystyle X}$ and ${\displaystyle Y}$ are arbitrary random variables, and ${\displaystyle a}$ is a constant.

More rigorously, let ${\displaystyle X}$ and ${\displaystyle Y}$ be random variables whose expected values are defined (different from ${\displaystyle \infty -\infty }$).

• If ${\displaystyle \operatorname {E} [X]+\operatorname {E} [Y]}$ is also defined (i.e. differs from ${\displaystyle \infty -\infty }$), then
${\displaystyle \operatorname {E} [X+Y]=\operatorname {E} [X]+\operatorname {E} [Y].}$
• Let ${\displaystyle \operatorname {E} [X]}$ be finite, and ${\displaystyle a\in \mathbb {R} }$ be a finite scalar. Then ${\displaystyle \operatorname {E} [aX]=a\operatorname {E} [X].}$

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

The following statements regarding a random variable ${\displaystyle X}$ are equivalent:

• ${\displaystyle \operatorname {E} [X]}$ exists and is finite.
• Both ${\displaystyle \operatorname {E} [X_{+}]}$ and ${\displaystyle \operatorname {E} [X_{-}]}$ are finite.
• ${\displaystyle \operatorname {E} [|X|]}$ is finite.

Sketch of proof. Indeed, ${\displaystyle |X|=X_{+}+X_{-}}$. By linearity, ${\displaystyle \operatorname {E} [|X|]=\operatorname {E} [X_{+}]+\operatorname {E} [X_{-}]}$. The above equivalency relies on the definition of Lebesgue integral and measurability of ${\displaystyle X}$.

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

### Monotonicity

If ${\displaystyle X\leq Y}$ (a.s.), and both ${\displaystyle \operatorname {E} [X]}$ and ${\displaystyle \operatorname {E} [Y]}$ exist, then ${\displaystyle \operatorname {E} [X]\leq \operatorname {E} [Y]}$.

Remark.${\displaystyle \operatorname {E} [X]}$ and ${\displaystyle \operatorname {E} [Y]}$exist in the sense that ${\displaystyle \min(\operatorname {E} [X_{+}],\operatorname {E} [X_{-}])<\infty }$ and ${\displaystyle \min(\operatorname {E} [Y_{+}],\operatorname {E} [Y_{-}])<\infty .}$

Proof follows from the linearity and the previous property if we set ${\displaystyle Z=Y-X}$ and notice that ${\displaystyle Z\geq 0}$ (a.s.).

### If ${\displaystyle |X|\leq Y}$ (a.s.) and ${\displaystyle \operatorname {E} [Y]}$ is finite then so is ${\displaystyle \operatorname {E} [X]}$

Let ${\displaystyle X}$ and ${\displaystyle Y}$ be random variables such that ${\displaystyle |X|\leq Y}$ (a.s.) and ${\displaystyle \operatorname {E} [Y]<\infty }$. Then ${\displaystyle \operatorname {E} [X]\neq \pm \infty }$.

Proof. Due to non-negativity of ${\displaystyle |X|}$, ${\displaystyle \operatorname {E} |X|}$ exists, finite or infinite. By monotonicity, ${\displaystyle \operatorname {E} |X|\leq \operatorname {E} [Y]<\infty }$, so ${\displaystyle \operatorname {E} |X|}$ is finite which, as we saw earlier, is equivalent to ${\displaystyle \operatorname {E} [X]}$ being finite.

### If ${\displaystyle \operatorname {E} |X^{\beta }|<\infty }$ and ${\displaystyle 0<\alpha <\beta }$ then ${\displaystyle \operatorname {E} |X^{\alpha }|<\infty }$

The proposition below will be used to prove the extremal property of ${\displaystyle \operatorname {E} [X]}$ later on.

Proposition. If ${\displaystyle X}$ is a random variable, then so is ${\displaystyle X^{\alpha }}$, for every ${\displaystyle \alpha >0}$. If, in addition, ${\displaystyle \operatorname {E} |X^{\beta }|<\infty }$ and ${\displaystyle 0<\alpha <\beta }$, then ${\displaystyle \operatorname {E} |X^{\alpha }|<\infty }$.

#### Counterexample for infinite measure

The requirement that ${\displaystyle \operatorname {P} (\Omega )<\infty }$ is essential. By way of counterexample, consider the measurable space

${\displaystyle ([1,+\infty ),{\mathcal {B}}_{\mathbb {R} _{[1,+\infty )}},\lambda ),}$

where ${\displaystyle {\mathcal {B}}_{\mathbb {R} _{[1,+\infty )}}}$ is the Borel ${\displaystyle \sigma }$-algebra on the interval ${\displaystyle [1,+\infty ),}$ and ${\displaystyle \lambda }$ is the linear Lebesgue measure. The reader can prove that ${\displaystyle \textstyle \int _{[1,+\infty )}{\frac {1}{x}}\,dx=\infty ,}$ even though ${\displaystyle \textstyle \int _{[1,+\infty )}{\frac {1}{x^{2}}}\,dx=1.}$(Sketch of proof: ${\displaystyle \textstyle \int _{S}{\frac {1}{x}}\,dx}$ and ${\displaystyle \textstyle \int _{S}{\frac {1}{x^{2}}}\,dx}$ define a measure ${\displaystyle \mu }$ on ${\displaystyle \textstyle [1,+\infty )=\cup _{n=1}^{\infty }[1,n].}$ Use "continuity from below" w.r. to ${\displaystyle \mu }$ and reduce to Riemann integral on each finite subinterval ${\displaystyle [1,n]}$).

### Extremal property

Recall, as we proved early on, that if ${\displaystyle X}$ is a random variable, then so is ${\displaystyle X^{2}}$.

Proposition (extremal property of ${\displaystyle \operatorname {E} [X])}$). Let ${\displaystyle X}$ be a random variable, and ${\displaystyle \operatorname {E} [X^{2}]<\infty }$. Then ${\displaystyle \operatorname {E} [X]}$ and ${\displaystyle \operatorname {Var} [X]}$ are finite, and ${\displaystyle \operatorname {E} [X]}$ is the best least squares approximation for ${\displaystyle X}$ among constants. Specifically,

• for every ${\displaystyle c\in \mathbb {R} }$, ${\displaystyle \textstyle \operatorname {E} [X-c]^{2}\geq \operatorname {Var} [X];}$
• equality holds if and only if ${\displaystyle c=\operatorname {E} [X].}$

(${\displaystyle \operatorname {Var} [X]}$ denotes the variance of ${\displaystyle X}$).

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 ${\displaystyle X}$, then ${\displaystyle \operatorname {E} [X]}$, 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 ${\displaystyle {\mathcal {F}}}$ regarding the outcome, then — again, in some practically useful sense — one's bet may be improved upon by using conditional expectations ${\displaystyle \operatorname {E} [X\mid {\mathcal {F}}]}$ (of which ${\displaystyle \operatorname {E} [X]}$ is a special case) rather than ${\displaystyle \operatorname {E} [X]}$.

Proof of proposition. By the above properties, both ${\displaystyle \operatorname {E} [X]}$ and ${\displaystyle \operatorname {Var} [X]=\operatorname {E} [X^{2}]-\operatorname {E} ^{2}[X]}$ are finite, and

{\displaystyle {\begin{aligned}\operatorname {E} [X-c]^{2}&=\operatorname {E} [X^{2}-2cX+c^{2}]\\[6pt]&=\operatorname {E} [X^{2}]-2c\operatorname {E} [X]+c^{2}\\[6pt]&=(c-\operatorname {E} [X])^{2}+\operatorname {E} [X^{2}]-\operatorname {E} ^{2}[X]\\[6pt]&=(c-\operatorname {E} [X])^{2}+\operatorname {Var} [X],\end{aligned}}}

whence the extremal property follows.

### Non-degeneracy

If ${\displaystyle \operatorname {E} |X|=0}$, then ${\displaystyle X=0}$ (a.s.).

### ${\displaystyle |\operatorname {E} [X]|\leq \operatorname {E} |X|}$

For an arbitrary random variable ${\displaystyle X}$, ${\displaystyle |\operatorname {E} [X]|\leq \operatorname {E} |X|}$.

Proof. By definition of Lebesgue integral,

{\displaystyle {\begin{aligned}|\operatorname {E} [X]|&={\Bigl |}\operatorname {E} [X_{+}]-\operatorname {E} [X_{-}]{\Bigr |}\leq {\Bigl |}\operatorname {E} [X_{+}]{\Bigr |}+{\Bigl |}\operatorname {E} [X_{-}]{\Bigr |}\\[5pt]&=\operatorname {E} [X_{+}]+\operatorname {E} [X_{-}]=\operatorname {E} [X_{+}+X_{-}]\\[5pt]&=\operatorname {E} |X|.\end{aligned}}}

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

### Non-multiplicativity

In general, the expected value operator is not multiplicative, i.e. ${\displaystyle \operatorname {E} [XY]}$ is not necessarily equal to ${\displaystyle \operatorname {E} [X]\cdot \operatorname {E} [Y]}$. Indeed, let ${\displaystyle X}$ assume the values of 1 and -1 with probability 0.5 each. Then

${\displaystyle \operatorname {E^{2}} [X]=\left({\frac {1}{2}}\cdot (-1)+{\frac {1}{2}}\cdot 1\right)^{2}=0,}$

and

${\displaystyle \operatorname {E} [X^{2}]={\frac {1}{2}}\cdot (-1)^{2}+{\frac {1}{2}}\cdot 1^{2}=1,{\text{ so }}\operatorname {E} [X^{2}]\neq \operatorname {E^{2}} [X].}$

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

${\displaystyle \operatorname {Cov} (X,Y)=\operatorname {E} [XY]-\operatorname {E} [X]\operatorname {E} [Y].}$

However, if ${\displaystyle X}$ and ${\displaystyle Y}$ are independent, then ${\displaystyle \operatorname {E} [XY]=\operatorname {E} [X]\operatorname {E} [Y]}$, and ${\displaystyle \operatorname {Cov} (X,Y)=0}$.

### Counterexample: ${\displaystyle \operatorname {E} [X_{i}]\not \to \operatorname {E} [X]}$ despite ${\displaystyle X_{i}\to X}$ pointwise

Let ${\displaystyle \left([0,1],{\mathcal {B}}_{[0,1]},{\mathrm {P} }\right)}$ be the probability space, where ${\displaystyle {\mathcal {B}}_{[0,1]}}$ is the Borel ${\displaystyle \sigma }$-algebra on ${\displaystyle [0,1]}$ and ${\displaystyle {\mathrm {P} }}$ the linear Lebesgue measure. For ${\displaystyle i\geq 1,}$ define a sequence of random variables

${\displaystyle X_{i}=i\cdot {\mathbf {1} }_{\left[0,{\frac {1}{i}}\right]}}$

and a random variable

${\displaystyle X={\begin{cases}+\infty &{\text{if}}\ x=0\\0&{\text{otherwise.}}\end{cases}}}$

on ${\displaystyle [0,1]}$, with ${\displaystyle {\mathbf {1} }_{S}}$ being the indicator function of the set ${\displaystyle S\subseteq [0,1]}$.

For every ${\displaystyle x\in [0,1],}$ as ${\displaystyle i\to +\infty ,}$${\displaystyle X_{i}(x)\to X(x),}$ and

${\displaystyle \operatorname {E} [X_{i}]=i\cdot {\mathrm {P} }\left(\left[0,{\frac {1}{i}}\right]\right)=i\cdot {\dfrac {1}{i}}=1,}$

so ${\displaystyle \lim _{i\to \infty }\operatorname {E} [X_{i}]=1.}$ On the other hand, ${\displaystyle \mathop {\mathrm {P} } (\{0\})=0,}$ and hence ${\displaystyle \operatorname {E} \left[X\right]=0.}$

In general, the expected value operator is not ${\displaystyle \sigma }$-additive, i.e.

${\displaystyle \operatorname {E} \left[\sum _{i=0}^{\infty }X_{i}\right]\neq \sum _{i=0}^{\infty }\operatorname {E} [X_{i}].}$

By way of counterexample, let ${\displaystyle \left([0,1],{\mathcal {B}}_{[0,1]},{\mathrm {P} }\right)}$ be the probability space, where ${\displaystyle {\mathcal {B}}_{[0,1]}}$ is the Borel ${\displaystyle \sigma }$-algebra on ${\displaystyle [0,1]}$ and ${\displaystyle {\mathrm {P} }}$ the linear Lebesgue measure. Define a sequence of random variables ${\displaystyle \textstyle X_{i}=(i+1)\cdot {\mathbf {1} }_{\left[0,{\frac {1}{i+1}}\right]}-i\cdot {\mathbf {1} }_{\left[0,{\frac {1}{i}}\right]}}$ on ${\displaystyle [0,1]}$, with ${\displaystyle {\mathbf {1} }_{S}}$ being the indicator function of the set ${\displaystyle S\subseteq [0,1]}$. For the pointwise sums, we have

${\displaystyle \sum _{i=0}^{n}X_{i}=(n+1)\cdot {\mathbf {1} }_{\left[0,{\frac {1}{n+1}}\right]},}$
${\displaystyle \sum _{i=0}^{\infty }X_{i}(x)={\begin{cases}+\infty &{\text{if}}\ x=0\\0&{\text{otherwise.}}\end{cases}}}$

${\displaystyle \sum _{i=0}^{\infty }\operatorname {E} [X_{i}]=\lim _{n\to \infty }\sum _{i=0}^{n}\operatorname {E} [X_{i}]=\lim _{n\to \infty }\operatorname {E} \left[\sum _{i=0}^{n}X_{i}\right]=1.}$

On the other hand, ${\displaystyle \mathop {\mathrm {P} } (\{0\})=0,}$ and hence

${\displaystyle \operatorname {E} \left[\sum _{i=0}^{\infty }X_{i}\right]=0\neq 1=\sum _{i=0}^{\infty }\operatorname {E} [X_{i}].}$

### Countable additivity for non-negative random variables

Let ${\displaystyle \{X_{i}\}_{i=0}^{\infty }}$ be non-negative random variables. It follows from monotone convergence theorem that

${\displaystyle \operatorname {E} \left[\sum _{i=0}^{\infty }X_{i}\right]=\sum _{i=0}^{\infty }\operatorname {E} [X_{i}].}$

## Inequalities

### Cauchy–Bunyakovsky–Schwarz inequality

The Cauchy–Bunyakovsky–Schwarz inequality states that

${\displaystyle (\operatorname {E} [XY])^{2}\leq \operatorname {E} [X^{2}]\cdot \operatorname {E} [Y^{2}].}$

### Markov's inequality

For a nonnegative random variable ${\displaystyle X}$ and ${\displaystyle a>0}$, the Markov's inequality states that

${\displaystyle \operatorname {P} (X\geq a)\leq {\frac {\operatorname {E} [X]}{a}}.}$

### Bienaymé-Chebyshev inequality

Let ${\displaystyle X}$ be an arbitrary random variable with finite expected value ${\displaystyle \operatorname {E} [X]}$ and finite variance ${\displaystyle \operatorname {Var} [X]\neq 0}$. The Bienaymé-Chebyshev inequality states that, for any real number ${\displaystyle k>0}$,

${\displaystyle \operatorname {P} {\Bigl (}{\Bigl |}X-\operatorname {E} [X]{\Bigr |}\geq k{\sqrt {\operatorname {Var} [X]}}{\Bigr )}\leq {\frac {1}{k^{2}}}.}$

### Jensen's inequality

Let ${\displaystyle f:{\mathbb {R} }\to {\mathbb {R} }}$ be a Borel convex function and ${\displaystyle X}$ a random variable such that ${\displaystyle \operatorname {E} |X|<\infty }$. Jensen's inequality states that

${\displaystyle f(\operatorname {E} (X))\leq \operatorname {E} (f(X)).}$

Remark 1. The expected value ${\displaystyle \operatorname {E} (f(X))}$ is well-defined even if ${\displaystyle X}$ is allowed to assume infinite values. Indeed, ${\displaystyle \operatorname {E} |X|<\infty }$ implies that ${\displaystyle X\neq \pm \infty }$ (a.s.), so the random variable ${\displaystyle f(X(\omega ))}$ is defined almost sure, and therefore there is enough information to compute ${\displaystyle \operatorname {E} (f(X)).}$

Remark 2. Jensen's inequality implies that ${\displaystyle |\operatorname {E} [X]|\leq \operatorname {E} |X|}$ since the absolute value function is convex.

### Lyapunov's inequality

Let ${\displaystyle 0. Lyapunov's inequality states that

${\displaystyle {\Bigl (}\operatorname {E} |X|^{s}{\Bigr )}^{1/s}\leq \left(\operatorname {E} |X|^{t}\right)^{1/t}.}$

Proof. Applying Jensen's inequality to ${\displaystyle |X|^{s}}$ and ${\displaystyle g(x)=|x|^{t/s}}$, obtain ${\displaystyle {\Bigl |}\operatorname {E} |X^{s}|{\Bigr |}^{t/s}\leq \operatorname {E} |X^{s}|^{t/s}=\operatorname {E} |X|^{t}}$. Taking the ${\displaystyle t}$th root of each side completes the proof.

Corollary.

${\displaystyle \operatorname {E} |X|\leq {\Bigl (}\operatorname {E} |X|^{2}{\Bigr )}^{1/2}\leq \cdots \leq {\Bigl (}\operatorname {E} |X|^{n}{\Bigr )}^{1/n}\leq \cdots }$

### Hölder's inequality

Let ${\displaystyle p}$ and ${\displaystyle q}$ satisfy ${\displaystyle 1\leq p\leq \infty }$, ${\displaystyle 1\leq q\leq \infty }$, and ${\displaystyle 1/p+1/q=1}$. The Hölder's inequality states that

${\displaystyle \operatorname {E} |XY|\leq (\operatorname {E} |X|^{p})^{1/p}(\operatorname {E} |Y|^{q})^{1/q}.}$

### Minkowski inequality

Let ${\displaystyle p}$ be an integer satisfying ${\displaystyle 1\leq p\leq \infty }$. Let, in addition, ${\displaystyle \operatorname {E} |X|^{p}<\infty }$ and ${\displaystyle \operatorname {E} |Y|^{p}<\infty }$. Then, according to the Minkowski inequality, ${\displaystyle \operatorname {E} |X+Y|^{p}<\infty }$ and

${\displaystyle {\Bigl (}\operatorname {E} |X+Y|^{p}{\Bigr )}^{1/p}\leq {\Bigl (}\operatorname {E} |X|^{p}{\Bigr )}^{1/p}+{\Bigl (}\operatorname {E} |Y|^{p}{\Bigr )}^{1/p}.}$

## Taking limits under the ${\displaystyle \operatorname {E} }$ sign

### Monotone convergence theorem

Let the sequence of random variables ${\displaystyle \{X_{n}\}}$ and the random variables ${\displaystyle X}$ and ${\displaystyle Y}$ be defined on the same probability space ${\displaystyle (\Omega ,\Sigma ,\operatorname {P} ).}$ Suppose that

• all the expected values ${\displaystyle \operatorname {E} [X_{n}],}$${\displaystyle \operatorname {E} [X],}$ and ${\displaystyle \operatorname {E} [Y]}$ are defined (differ from ${\displaystyle \infty -\infty }$);
• ${\displaystyle \operatorname {E} [Y]>-\infty ;}$
• for every ${\displaystyle n,}$
${\displaystyle -\infty \leq Y\leq X_{n}\leq X_{n+1}\leq +\infty \quad {\hbox{(a.s.)}};}$
• ${\displaystyle X}$ is the pointwise limit of ${\displaystyle \{X_{n}\}}$ (a.s.), i.e. ${\displaystyle X(\omega )=\lim \nolimits _{n}X_{n}(\omega )}$ (a.s.).

The monotone convergence theorem states that

${\displaystyle \lim _{n}\operatorname {E} [X_{n}]=\operatorname {E} [X].}$

### Fatou's lemma

Let the sequence of random variables ${\displaystyle \{X_{n}\}}$ and the random variable ${\displaystyle Y}$ be defined on the same probability space ${\displaystyle (\Omega ,\Sigma ,\operatorname {P} ).}$ Suppose that

• all the expected values ${\displaystyle \operatorname {E} [X_{n}],}$${\displaystyle \textstyle \operatorname {E} [\liminf _{n}X_{n}],}$ and ${\displaystyle \operatorname {E} [Y]}$ are defined (differ from ${\displaystyle \infty -\infty }$);
• ${\displaystyle \operatorname {E} [Y]>-\infty ;}$
• ${\displaystyle -\infty \leq Y\leq X_{n}\leq +\infty }$ (a.s.), for every ${\displaystyle n.}$

Fatou's lemma states that

${\displaystyle \operatorname {E} [\liminf _{n}X_{n}]\leq \liminf _{n}\operatorname {E} [X_{n}].}$

(Note that ${\displaystyle \textstyle \liminf _{n}X_{n}}$ is a random variable, for every ${\displaystyle n,}$ by the properties of limit inferior).

Corollary. Let

• ${\displaystyle X_{n}\to X}$ pointwise (a.s.);
• ${\displaystyle \operatorname {E} [X_{n}]\leq C,}$ for some constant ${\displaystyle C}$ (independent from ${\displaystyle n}$);
• ${\displaystyle \operatorname {E} [Y]>-\infty ;}$
• ${\displaystyle -\infty \leq Y\leq X_{n}\leq +\infty }$ (a.s.), for every ${\displaystyle n.}$

Then ${\displaystyle \operatorname {E} [X]\leq C.}$

Proof is by observing that ${\displaystyle \textstyle X=\liminf _{n}X_{n}}$ (a.s.) and applying Fatou's lemma.

### Dominated convergence theorem

Let ${\displaystyle \{X_{n}\}_{n}}$ be a sequence of random variables. If ${\displaystyle X_{n}\to X}$ pointwise (a.s.), ${\displaystyle |X_{n}|\leq Y\leq +\infty }$ (a.s.), and ${\displaystyle \operatorname {E} [Y]<\infty }$. Then, according to the dominated convergence theorem,

• the function ${\displaystyle X}$ is measurable (hence a random variable);
• ${\displaystyle \operatorname {E} |X|<\infty }$;
• all the expected values ${\displaystyle \operatorname {E} [X_{n}]}$ and ${\displaystyle \operatorname {E} [X]}$ are defined (do not have the form ${\displaystyle \infty -\infty }$);
• ${\displaystyle \lim _{n}\operatorname {E} [X_{n}]=\operatorname {E} [X]}$ (both sides may be infinite);
• ${\displaystyle \lim _{n}\operatorname {E} |X_{n}-X|=0.}$

## Relationship with characteristic function

The probability density function ${\displaystyle f_{X}}$ of a scalar random variable ${\displaystyle X}$ is related to its characteristic function ${\displaystyle \varphi _{X}}$ by the inversion formula:

${\displaystyle f_{X}(x)={\frac {1}{2\pi }}\int _{\mathbb {R} }e^{-itx}\varphi _{X}(t)\,dt.}$

For the expected value of ${\displaystyle g(X)}$ (where ${\displaystyle g:{\mathbb {R} }\to {\mathbb {R} }}$ is a Borel function), we can use this inversion formula to obtain

${\displaystyle \operatorname {E} [g(X)]={\frac {1}{2\pi }}\int _{\mathbb {R} }g(x)\left[\int _{\mathbb {R} }e^{-itx}\varphi _{X}(t)\,dt\right]\,dx.}$

If ${\displaystyle \operatorname {E} [g(X)]}$ is finite, changing the order of integration, we get, in accordance with Fubini–Tonelli theorem,

${\displaystyle \operatorname {E} [g(X)]={\frac {1}{2\pi }}\int _{\mathbb {R} }G(t)\varphi _{X}(t)\,dt,}$

where

${\displaystyle G(t)=\int _{\mathbb {R} }g(x)e^{-itx}\,dx}$

is the Fourier transform of ${\displaystyle g(x).}$ The expression for ${\displaystyle \operatorname {E} [g(X)]}$ also follows directly from Plancherel theorem.

## 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. ${\displaystyle \operatorname {P} ({X\in {\mathcal {A}}})=\operatorname {E} [{\mathbf {1} }_{\mathcal {A}}]}$, where ${\displaystyle {\mathbf {1} }_{\mathcal {A}}}$ is the indicator function of the set ${\displaystyle {\mathcal {A}}}$.

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

${\displaystyle \operatorname {Var} (X)=\operatorname {E} [X^{2}]-(\operatorname {E} [X])^{2}.}$

A very important application of the expectation value is in the field of quantum mechanics. The expectation value of a quantum mechanical operator ${\displaystyle {\hat {A}}}$ operating on a quantum state vector ${\displaystyle |\psi \rangle }$ is written as ${\displaystyle \langle {\hat {A}}\rangle =\langle \psi |A|\psi \rangle }$. The uncertainty in ${\displaystyle {\hat {A}}}$ can be calculated using the formula ${\displaystyle (\Delta A)^{2}=\langle {\hat {A}}^{2}\rangle -\langle {\hat {A}}\rangle ^{2}}$.

## The law of the unconscious statistician

The expected value of a measurable function of ${\displaystyle X}$, ${\displaystyle g(X)}$, given that ${\displaystyle X}$ has a probability density function ${\displaystyle f(x)}$, is given by the inner product of ${\displaystyle f}$ and ${\displaystyle g}$:

${\displaystyle \operatorname {E} [g(X)]=\int _{\mathbb {R} }g(x)f(x)\,dx.}$

This formula also holds in multidimensional case, when ${\displaystyle g}$ is a function of several random variables, and ${\displaystyle f}$ is their joint density. [5] [6]

## Alternative formula for expected value

### Formula for non-negative random variables

#### Finite and countably infinite case

For a non-negative integer-valued random variable ${\displaystyle X:\Omega \to \{0,1,2,3,\ldots \}\cup \{+\infty \},}$

${\displaystyle \operatorname {E} [X]=\sum _{i=1}^{\infty }\operatorname {P} (X\geq i).}$

#### General case

If ${\displaystyle X:\Omega \to [0,+\infty ]}$ is a non-negative random variable, then

${\displaystyle \operatorname {E} [X]=\int \limits _{[0,+\infty )}\operatorname {P} (X\geq x)\,dx=\int \limits _{[0,+\infty )}\operatorname {P} (X>x)\,dx,}$

and

${\displaystyle \operatorname {E} [X]={\hbox{(R)}}\int \limits _{0}^{\infty }\operatorname {P} (X\geq x)\,dx={\hbox{(R)}}\int \limits _{0}^{\infty }\operatorname {P} (X>x)\,dx,}$

where ${\displaystyle {\hbox{(R)}}\textstyle \int _{0}^{\infty }}$ denotes improper Riemann integral.

### Formula for non-positive random variables

If ${\displaystyle X:\Omega \to [-\infty ,0]}$ is a non-positive random variable, then

${\displaystyle \operatorname {E} [X]=-\int \limits _{(-\infty ,0]}\operatorname {P} (X\leq x)\,dx=-\int \limits _{(-\infty ,0]}\operatorname {P} (X

and

${\displaystyle \operatorname {E} [X]=-{\hbox{(R)}}\int \limits _{-\infty }^{0}\operatorname {P} (X\leq x)\,dx=-{\hbox{(R)}}\int \limits _{-\infty }^{0}\operatorname {P} (X

where ${\displaystyle {\hbox{(R)}}\textstyle \int _{-\infty }^{0}}$ denotes improper Riemann integral.

This formula follows from that for the non-negative case applied to ${\displaystyle -X.}$

If, in addition, ${\displaystyle X}$ is integer-valued, i.e. ${\displaystyle X:\Omega \to \{\ldots ,-3,-2,-1,0\}\cup \{-\infty \}}$, then

${\displaystyle \operatorname {E} [X]=-\sum _{i=-1}^{-\infty }\operatorname {P} (X\leq i).}$

### General case

If ${\displaystyle X}$ can be both positive and negative, then ${\displaystyle \operatorname {E} [X]=\operatorname {E} [X_{+}]-\operatorname {E} [X_{-}]}$, and the above results may be applied to ${\displaystyle X_{+}}$ and ${\displaystyle X_{-}}$ separately.

## 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'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. [7]

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/2." 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, [8] 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". [9]

## Notes

1. 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.
2. 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.
3. 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!
4. Gordon, Lawrence; Loeb, Martin (November 2002). "The Economics of Information Security Investment". ACM Transactions on Information and System Security. 5 (4): 438–457. doi:10.1145/581271.581274.
5. Expectation Value , retrieved August 8, 2017
6. Papoulis, A. (1984), Probability, Random Variables, and Stochastic Processes, New York: McGraw–Hill, pp. 139–152
7. "Ore, Pascal and the Invention of Probability Theory". The American Mathematical Monthly. 67 (5): 409–419. 1960. doi:10.2307/2309286.
8. Whitworth, W.A. (1901) Choice and Chance with One Thousand Exercises. Fifth edition. Deighton Bell, Cambridge. [Reprinted by Hafner Publishing Co., New York, 1959.]

## Literature

• Edwards, A.W.F (2002). Pascal's arithmetical triangle: the story of a mathematical idea (2nd ed.). JHU Press. ISBN   0-8018-6946-3.
• Huygens, Christiaan (1657). De ratiociniis in ludo aleæ (English translation, published in 1714:).

## Related Research Articles

In probability theory, two events are independent, statistically independent, or stochastically independent if the occurrence of one does not affect the probability of occurrence of the other. Similarly, two random variables are independent if the realization of one does not affect the probability distribution of the other.

In probability theory, the central limit theorem (CLT) establishes that, in some situations, when independent random variables are added, their properly normalized sum tends toward a normal distribution even if the original variables themselves are not normally distributed. The theorem is a key concept in probability theory because it implies that probabilistic and statistical methods that work for normal distributions can be applicable to many problems involving other types of distributions.

In probability theory, there exist several different notions of convergence of random variables. The convergence of sequences of random variables to some limit random variable is an important concept in probability theory, and its applications to statistics and stochastic processes. The same concepts are known in more general mathematics as stochastic convergence and they formalize the idea that a sequence of essentially random or unpredictable events can sometimes be expected to settle down into a behavior that is essentially unchanging when items far enough into the sequence are studied. The different possible notions of convergence relate to how such a behavior can be characterized: two readily understood behaviors are that the sequence eventually takes a constant value, and that values in the sequence continue to change but can be described by an unchanging probability distribution.

In probability theory and statistics, the moment-generating function of a real-valued random variable is an alternative specification of its probability distribution. Thus, it provides the basis of an alternative route to analytical results compared with working directly with probability density functions or cumulative distribution functions. There are particularly simple results for the moment-generating functions of distributions defined by the weighted sums of random variables. However, not all random variables have moment-generating functions.

In probability theory, Markov's inequality gives an upper bound for the probability that a non-negative function of a random variable is greater than or equal to some positive constant. It is named after the Russian mathematician Andrey Markov, although it appeared earlier in the work of Pafnuty Chebyshev, and many sources, especially in analysis, refer to it as Chebyshev's inequality or Bienaymé's inequality.

In mathematics, Fatou's lemma establishes an inequality relating the Lebesgue integral of the limit inferior of a sequence of functions to the limit inferior of integrals of these functions. The lemma is named after Pierre Fatou.

In mathematics, Jensen's inequality, named after the Danish mathematician Johan Jensen, relates the value of a convex function of an integral to the integral of the convex function. It was proven by Jensen in 1906. Given its generality, the inequality appears in many forms depending on the context, some of which are presented below. In its simplest form the inequality states that the convex transformation of a mean is less than or equal to the mean applied after convex transformation; it is a simple corollary that the opposite is true of concave transformations.

The proposition in probability theory known as the law of total expectation, the law of iterated expectations, the tower rule, Adam's law, and the smoothing theorem, among other names, states that if is a random variable whose expected value is defined, and is any random variable on the same probability space, then

In mathematics, a moment is a specific quantitative measure of the shape of a function. It is used in both mechanics and statistics. If the function represents physical density, then the zeroth moment is the total mass, the first moment divided by the total mass is the center of mass, and the second moment is the rotational inertia. If the function is a probability distribution, then the zeroth moment is the total probability, the first moment is the mean, the second central moment is the variance, the third standardized moment is the skewness, and the fourth standardized moment is the kurtosis. The mathematical concept is closely related to the concept of moment in physics.

In probability theory, the conditional expectation, conditional expected value, or conditional mean of a random variable is its expected value – the value it would take “on average” over an arbitrarily large number of occurrences – given that a certain set of "conditions" is known to occur. If the random variable can take on only a finite number of values, the “conditions” are that the variable can only take on a subset of those values. More formally, in the case when the random variable is defined over a discrete probability space, the "conditions" are a partition of this probability space.

In probability theory and statistics, given two jointly distributed random variables and , the conditional probability distribution of Y given X is the probability distribution of when is known to be a particular value; in some cases the conditional probabilities may be expressed as functions containing the unspecified value of as a parameter. When both and are categorical variables, a conditional probability table is typically used to represent the conditional probability. The conditional distribution contrasts with the marginal distribution of a random variable, which is its distribution without reference to the value of the other variable.

In probability theory and statistics, the characteristic function of any real-valued random variable completely defines its probability distribution. If a random variable admits a probability density function, then the characteristic function is the Fourier transform of the probability density function. Thus it provides the basis of an alternative route to analytical results compared with working directly with probability density functions or cumulative distribution functions. There are particularly simple results for the characteristic functions of distributions defined by the weighted sums of random variables.

A probabilistic metric space is a generalization of metric spaces where the distance has no longer values in non-negative real numbers, but in distribution functions.

In mathematics, a π-system on a set Ω is a collection P of certain subsets of Ω, such that

In mathematics, uniform integrability is an important concept in real analysis, functional analysis and measure theory, and plays a vital role in the theory of martingales. The definition used in measure theory is closely related to, but not identical to, the definition typically used in probability.

In probability theory and statistics, the law of the unconscious statistician (LOTUS) is a theorem used to calculate the expected value of a function g(X) of a random variable X when one knows the probability distribution of X but one does not know the distribution of g(X). The form of the law can depend on the form in which one states the probability distribution of the random variable X. If it is a discrete distribution and one knows its probability mass function ƒX, then the expected value of g(X) is

A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables X and Y, the distribution of the random variable Z that is formed as the product

In probability theory and statistics, complex random variables are a generalization of real-valued random variables to complex numbers, i.e. the possible values a complex random variable may take are complex numbers. Complex random variables can always be considered as pairs of real random variables: their real and imaginary parts. Therefore, the distribution of one complex random variable may be interpreted as the joint distribution of two real random variables.