aiwiki.page
English

Expected value

The probability-weighted average of a random variable, a basic tool in probability, statistics, and decision-making.

65 keywords409 linked from5 not yet writtenWritten by AI
ProbabilityRandom VariableLaw of Large Num…Probability Mass…Probability Dist…Infinite SeriesProbability Dens…Uniform Distribu…Expected v…

In probability theory, the expected value of a random variable is its probability-weighted average: each possible value is multiplied by the probability of that value, and the products are summed (or integrated, for continuous variables). It is also called the expectation or the mean, and it is the basic measure of a random quantity's central tendency. Its usefulness comes from its interpretation as the long-run average of many independent repetitions of the same experiment, a link formalized by the law of large numbers. The concept arose in the seventeenth century from problems about fair division of stakes in games of chance and was given its modern form through the work of later probabilists and, in the twentieth century, through measure-theoretic probability.

The entry treats expected value first as a computational object: its definition for discrete and continuous variables, its existence conditions, and the rules that make it tractable, above all linearity, which holds even when variables are dependent. It then turns to the historical development and to the interpretation of expected value as a long-run average, including where that interpretation can mislead. The remaining sections trace its use as a decision criterion and the paradoxes that criterion produced, its role in combinatorial counting and randomized algorithms, its generalization to conditional expectation and martingales, and its place in statistical estimation, machine learning, and physics, where the term "expectation value" is used for closely related but distinct quantities.

Discrete random variables

For a discrete random variable XX that takes values in a finite or countable set, the expected value is

E[X]=∑xx P(X=x),E[X] = \sum_{x} x\,P(X = x),

where the sum runs over the values xx that XX can take, and P(X=x)P(X = x) is its probability mass function. The weights are non-negative and sum to one, so the expression is a weighted average of the possible values, with each value counted in proportion to its probability. Because the formula uses only the probability-distribution of XX, any two variables with the same distribution share the same expected value.

A fair six-sided die shows each face from 1 to 6 with probability 1/61/6, so

E[X]=∑k=16k⋅16=216=3.5.E[X] = \sum_{k=1}^{6} k \cdot \tfrac{1}{6} = \tfrac{21}{6} = 3.5.

The value 3.5 is not a face the die can show. This illustrates that the expectation describes a long-run average, not a value that any single roll is expected to produce.

A simple wager gives a second example. Suppose a bet gains 5 units with probability 0.3 and loses 2 units with probability 0.7. Then E[X]=5(0.3)+(−2)(0.7)=0.1E[X] = 5(0.3) + (-2)(0.7) = 0.1, so the bet has a small positive expected gain per play. If the loss were 3 units instead, the expectation would be 1.5−2.1=−0.61.5 - 2.1 = -0.6, and the wager would be unfavorable to the player. The sign of the expectation therefore separates favorable from unfavorable bets, a point developed further in the section on decisions.

When XX takes countably many values x1,x2,…x_1, x_2, \ldots, the finite sum becomes an infinite-series. For instance, if P(X=k)=2−kP(X = k) = 2^{-k} for k=1,2,3,…k = 1, 2, 3, \ldots, then E[X]=∑k=1∞k 2−k=2E[X] = \sum_{k=1}^{\infty} k\,2^{-k} = 2. In general, the expectation is well defined only when the series converges absolutely, that is, when

∑x∣x∣ P(X=x)<∞.\sum_{x} |x|\,P(X = x) < \infty.

The condition matters because a series with terms of mixed sign can converge while its sum changes under rearrangement. As an example, let XX take the value (−1)k2k/k(-1)^k 2^k / k with probability 2−k2^{-k} for k≥1k \ge 1. The probabilities sum to one, and ∑xx P(X=x)=∑k(−1)k/k\sum_x x\,P(X = x) = \sum_k (-1)^k / k converges to −ln⁡2-\ln 2. However, ∑x∣x∣ P(X=x)=∑k1/k\sum_x |x|\,P(X = x) = \sum_k 1/k diverges, so E[X]E[X] is undefined despite the convergent signed series. Without absolute convergence, the value would depend on the order in which the possible values are listed, which is why the definition requires it.

The expected value is written E[X]E[X] in most texts, while E(X)E(X) is also common, particularly where parentheses are preferred. In statistics the same quantity is often denoted μ\mu or μX\mu_X. The terms "expected value," "expectation," and "mean" (when referring to a distribution rather than a data set) are used interchangeably. The mean of a sample is a different object, an estimator of this quantity, and is discussed in the section on estimation. The continuous analogue, which replaces the sum with an integral against a density, is treated in the following section.

General and continuous definitions

When a random variable XX has a probability density function ff, the sum in the discrete definition becomes an integral:

E[X]=∫−∞∞x f(x) dx,E[X] = \int_{-\infty}^{\infty} x\, f(x)\, dx,

provided that ∫−∞∞∣x∣ f(x) dx\int_{-\infty}^{\infty} |x|\, f(x)\, dx is finite. The quantity f(x) dxf(x)\,dx plays the role that the probability mass plays in the discrete case: it is the weight given to a small interval around xx. The uniform distribution on [a,b][a,b] has density 1/(b−a)1/(b-a) on that interval, and the integral gives E[X]=(a+b)/2E[X] = (a+b)/2, the midpoint of the interval. For the exponential distribution with rate λ>0\lambda > 0, the integral ∫0∞x λe−λx dx\int_0^\infty x\,\lambda e^{-\lambda x}\,dx equals 1/λ1/\lambda. The tail formula below gives the same value with less computation.

Measure-theoretic definition

The general definition is stated on a probability-space (Ω,F,P)(\Omega, \mathcal F, P), where X ⁣:Ω→RX\colon \Omega \to \mathbb R is a measurable-function. The expectation is the lebesgue-integral of XX with respect to PP:

E[X]=∫ΩX dP.E[X] = \int_\Omega X\, dP.

This one formula covers discrete and continuous variables alike. Both kinds induce a distribution on R\mathbb R, and the density formula above is what the general integral reduces to when that distribution has a density with respect to lebesgue-measure.

For a variable taking both positive and negative values, one splits X=X+−X−X = X^+ - X^-, where X+=max⁡(X,0)X^+ = \max(X, 0) and X−=max⁡(−X,0)X^- = \max(-X, 0) are both nonnegative. Then E[X]=E[X+]−E[X−]E[X] = E[X^+] - E[X^-], and this is meaningful as long as at least one of the two terms is finite.

Existence

The expectation exists exactly when E∣X∣=∫Ω∣X∣ dPE|X| = \int_\Omega |X|\, dP is finite, which is equivalent to both E[X+]E[X^+] and E[X−]E[X^-] being finite. A symmetric limit is not enough. The Cauchy distribution has density 1π(1+x2)\frac{1}{\pi(1+x^2)}. The integral of ∣x∣|x| against this density diverges logarithmically at both ends, so the expectation is undefined. The symmetric truncated integrals ∫−RRxf(x) dx\int_{-R}^{R} x f(x)\,dx are zero for every RR, so a limit exists along symmetric truncations. That limit is a principal value, however, and it does not satisfy the definition of expectation.

Tail formula

For a nonnegative variable XX,

E[X]=∫0∞P(X>t) dt.E[X] = \int_0^\infty P(X > t)\, dt.

The identity follows from writing X=∫0∞1{X>t} dtX = \int_0^\infty \mathbf 1\{X > t\}\, dt pointwise and then exchanging the order of integration, which is justified for nonnegative integrands. No finiteness assumption is needed, so both sides may equal +∞+\infty. This makes the formula a practical tool for infinite expectations: the expectation is infinite exactly when the tail probability decays too slowly for the integral to converge. For instance, if P(X>t)=t−αP(X > t) = t^{-\alpha} for t≥1t \ge 1, then E[X]=1+1α−1=αα−1E[X] = 1 + \frac{1}{\alpha-1} = \frac{\alpha}{\alpha-1} when α>1\alpha > 1, while for α≤1\alpha \le 1 the integral diverges and E[X]=∞E[X] = \infty. Such heavy tails are closely related to power-law behaviour. For a variable of both signs whose two one-sided expectations are finite, the same idea gives E[X]=∫0∞P(X>t) dt−∫0∞P(X<−t) dtE[X] = \int_0^\infty P(X > t)\,dt - \int_0^\infty P(X < -t)\,dt.

Basic properties and computational rules

Linearity

For finitely many random variables X1,…,XnX_1,\dots,X_n, each with a finite expectation, and real constants a1,…,ana_1,\dots,a_n, the expectation of the weighted sum is the weighted sum of the expectations:

E[∑i=1naiXi]=∑i=1nai E[Xi].\mathbb{E}\Big[\sum_{i=1}^{n} a_i X_i\Big] = \sum_{i=1}^{n} a_i\,\mathbb{E}[X_i].

This identity does not depend on how the variables are related. For discrete variables it can be checked from the joint probability mass function: summing (x+y) P(X=x,Y=y)(x+y)\,P(X=x,Y=y) over all pairs splits into ∑xx P(X=x)\sum_x x\,P(X=x) plus ∑yy P(Y=y)\sum_y y\,P(Y=y), because each marginal is recovered by summing out the other variable. In the general measure-theoretic setting, the same fact follows from additivity of the Lebesgue integral. Extending linearity to infinite sums is not automatic. It requires a dominating condition, such as ∑nE∣Xn∣<∞\sum_n \mathbb{E}|X_n| < \infty, and this is where the dominated convergence theorem and the monotone convergence theorem are used.

Monotonicity, constants and bounds

If X≥YX \ge Y almost surely and both expectations exist, then E[X]≥E[Y]\mathbb{E}[X] \ge \mathbb{E}[Y]. A constant shifts the expectation by the same amount, so E[X+c]=E[X]+c\mathbb{E}[X+c]=\mathbb{E}[X]+c, and scaling multiplies it: E[cX]=c E[X]\mathbb{E}[cX]=c\,\mathbb{E}[X]. Applying monotonicity to −∣X∣≤X≤∣X∣-|X| \le X \le |X| gives

∣E[X]∣≤E∣X∣,|\mathbb{E}[X]| \le \mathbb{E}|X|,

and if a≤X≤ba \le X \le b almost surely, then a≤E[X]≤ba \le \mathbb{E}[X] \le b. The inequality E[X2]≥(E[X])2\mathbb{E}[X^2] \ge (\mathbb{E}[X])^2 is a special case of Jensen's inequality for the convex function t↦t2t \mapsto t^2. It is also equivalent to the non-negativity of variance.

Expectations of functions of a variable

If Y=g(X)Y = g(X) for a measurable function gg, the expectation of YY can be computed directly from the distribution of XX, without first finding the distribution of YY. For a discrete variable,

E[g(X)]=∑xg(x) P(X=x),\mathbb{E}[g(X)] = \sum_x g(x)\,P(X=x),

and for a continuous variable with density ff,

E[g(X)]=∫−∞∞g(x) f(x) dx,\mathbb{E}[g(X)] = \int_{-\infty}^{\infty} g(x)\,f(x)\,dx,

provided E∣g(X)∣<∞\mathbb{E}|g(X)| < \infty. This is often called the law of the unconscious statistician. For a fair die, E[X2]=(1+4+9+16+25+36)/6=91/6\mathbb{E}[X^2] = (1+4+9+16+25+36)/6 = 91/6, which is obtained without writing down the distribution of X2X^2. For XX uniform on [0,1][0,1], E[eX]=∫01ex dx=e−1\mathbb{E}[e^X] = \int_0^1 e^x\,dx = e-1, while the density of eXe^X would have to be derived first if the rule were not used.

Products, covariance and variance

If XX and YY are independent and both are integrable, then E[XY]=E[X] E[Y]\mathbb{E}[XY] = \mathbb{E}[X]\,\mathbb{E}[Y]. For discrete variables the proof is direct: P(X=x,Y=y)=P(X=x) P(Y=y)P(X=x, Y=y) = P(X=x)\,P(Y=y), so the double sum factorizes. The continuous case follows the same pattern with the joint density. The converse does not hold, and the product rule fails for dependent variables. For a fair die, take Y=XY = X. Then E[XY]=E[X2]=91/6≈15.17\mathbb{E}[XY] = \mathbb{E}[X^2] = 91/6 \approx 15.17, while E[X] E[Y]=49/4=12.25\mathbb{E}[X]\,\mathbb{E}[Y] = 49/4 = 12.25.

The general identity is E[XY]=E[X] E[Y]+Cov⁡(X,Y)\mathbb{E}[XY] = \mathbb{E}[X]\,\mathbb{E}[Y] + \operatorname{Cov}(X,Y), where Cov⁡(X,Y)=E[(X−EX)(Y−EY)]\operatorname{Cov}(X,Y) = \mathbb{E}[(X-\mathbb{E}X)(Y-\mathbb{E}Y)] is the covariance. Independence forces covariance to be zero, but zero covariance does not imply independence. Let XX be uniform on {−1,0,1}\{-1,0,1\} and Y=X2Y = X^2. Then E[X]=0\mathbb{E}[X] = 0 and E[XY]=E[X3]=0\mathbb{E}[XY] = \mathbb{E}[X^3] = 0, so the covariance is zero, yet YY is a function of XX and the two are plainly dependent.

Variance follows from the same tools. Expanding (X−μ)2(X-\mu)^2 and applying linearity with μ=E[X]\mu = \mathbb{E}[X] gives

Var⁡(X)=E[(X−μ)2]=E[X2]−μ2,\operatorname{Var}(X) = \mathbb{E}[(X-\mu)^2] = \mathbb{E}[X^2] - \mu^2,

so Var⁡(X)=E[X2]−(E[X])2\operatorname{Var}(X) = \mathbb{E}[X^2] - (\mathbb{E}[X])^2. For a fair die this gives 91/6−49/4=35/1291/6 - 49/4 = 35/12. Constants enter quadratically, so Var⁡(aX+b)=a2Var⁡(X)\operatorname{Var}(aX+b) = a^2 \operatorname{Var}(X). For any two variables, Var⁡(X+Y)=Var⁡(X)+Var⁡(Y)+2Cov⁡(X,Y)\operatorname{Var}(X+Y) = \operatorname{Var}(X) + \operatorname{Var}(Y) + 2\operatorname{Cov}(X,Y), which reduces to the additive rule when the covariance vanishes, in particular under independence. The formula E[X2]−μ2\mathbb{E}[X^2] - \mu^2 requires the second moment to be finite; when it is not, the variance is infinite even if the mean exists. The standard deviation is the square root of this quantity.

Origins and historical development

The concept of expected value grew out of seventeenth-century gambling problems, most prominently the problem of points: how to divide the stakes fairly when a game of chance is interrupted before it ends. The question had been debated for centuries before it gained new momentum in 1654, when the Chevalier de Méré, a French writer and amateur mathematician, put it to Blaise Pascal. Pascal then corresponded with Pierre de Fermat. Their letters reasoned from the possible continuations of an unfinished game rather than from the game's past results, and historians usually date the founding of probability theory to this exchange. The letters stayed private for a time, so their methods reached a wider public only through later work.

Christiaan Huygens's De ratiociniis in ludo aleae (1657) was the first printed work to state the principle explicitly. Huygens had heard of the Paris discussions but worked out his own solutions, and he extended the method beyond two players to more complicated cases. His foundational proposition held that a prospect is worth the sum that would give the same expectation in a fair game. From it he derived the rule for two equally likely prospects: if a player expects either aa or bb with equal chance, the expectation is worth a+b2\frac{a+b}{2}. His justification was game-theoretic rather than based on long-run frequencies, and it fixed which divisions of stakes count as fair. The word "expectation" itself was not used in its modern sense by Pascal or Huygens; the mathematical meaning developed gradually afterward.

Jakob Bernoulli's Ars Conjectandi, published posthumously in 1713, marked the next step. Its first part reprinted Huygens's treatise with commentary and offered a simpler route to the same rule, using gamblers who draw from boxes whose contents are sums of money. Its fourth part contains the early statement of the law of large numbers, which connects long-run averages of observed outcomes with the underlying probabilities. Pierre-Simon Laplace then gave the quantity its explicit name. In the 1814 Essai philosophique sur les probabilités he defined the advantage of a game as the sum hoped for multiplied by the probability of obtaining it, and called this "mathematical hope," tying it to the equitable division of stakes. Laplace also distinguished it from "moral expectation," a rival notion based on the utility of wealth. One source places the first appearance of the adjective "mathematical" in his 1812 Théorie analytique des probabilités, so the exact date of the term is reported differently in different accounts.

In the nineteenth century, Pafnuty Chebyshev began to think systematically in terms of the expectations of random variables. The notation changed in 1901, when William Allen Whitworth's Choice and Chance used the letter E for expectation; the notation later became standard in English-language texts and sits alongside the German Erwartungswert, the French espérance mathématique, and the Spanish esperanza matemática. The modern axiomatic foundation came in 1933, when Andrey Kolmogorov defined probability as a measure on a probability space. Under that framework, the expectation of a random variable became an integral with respect to that measure, placing the concept on measure-theoretic grounds.

Long-run averages and the law of large numbers

The frequency interpretation

Let X1,X2,…,XnX_1, X_2, \dots, X_n be independent copies of a random variable XX with finite mean μ=E[X]\mu = E[X], and let Xˉn=1n∑i=1nXi\bar X_n = \frac{1}{n}\sum_{i=1}^{n} X_i be their sample average. The sample average tends to lie near μ\mu when nn is large. If σ2=Var⁡(X)\sigma^2 = \operatorname{Var}(X) is finite, Chebyshev's inequality gives a quantitative form of this statement:

P(∣Xˉn−μ∣≥ε)≤σ2nε2for every ε>0.P\big(|\bar X_n - \mu| \ge \varepsilon\big) \le \frac{\sigma^2}{n\varepsilon^2} \qquad \text{for every } \varepsilon > 0.

The bound shrinks toward zero as nn grows. This is the precise sense in which a long series of repeated trials "settles" near the expected value. For a fair die, the average of many rolls approaches 3.5, although no single roll can show that value. The argument depends on the trials being independent and identically distributed, so each trial must be unaffected by the others (see statistical independence).

Weak and strong laws

The law of large numbers comes in two main forms, which differ in the mode of convergence. The weak law states that Xˉn\bar X_n converges in probability to μ\mu: for each tolerance ε>0\varepsilon > 0, the probability that Xˉn\bar X_n lies farther than ε\varepsilon from μ\mu tends to zero. The strong law states that Xˉn\bar X_n converges almost surely to μ\mu, meaning the set of outcomes where the running average fails to reach μ\mu has probability zero. Such failing sequences can exist; they simply form an infinitesimal fraction of the sample space. The strong form implies the weak form, but the weak form is the easier of the two to establish. Clearly the strong law implies the weak law, but the weak law is easier to prove, and it has somewhat better quantitative estimates.

The conditions differ as well. When the variance is finite, the weak law follows from a short argument based on Chebyshev's inequality, which is the most common route in textbooks. The proof is easy when the variables have a finite variance, and it is most often based on Chebyshev's Inequality. For the strong law, Kolmogorov's theorem requires only that the variables be identically distributed with a finite mean; no variance assumption is needed. The weak law for i.i.d. variables likewise holds under a finite mean alone, although the proof is harder without a variance bound. Without a finite mean, the averages need not converge to any constant at all.

Expected value compared with the mode and the median

The expected value is a weighted average, and it can differ sharply from the most likely outcome or from the median. Consider a hypothetical lottery in which a ticket costs one unit and the net gain XX takes three values: X=−1X = -1 with probability 0.97, X=4X = 4 with probability 0.02, and X=1000X = 1000 with probability 0.01. The expected value is well defined and positive:

E[X]=0.97(−1)+0.02(4)+0.01(1000)=9.11.E[X] = 0.97(-1) + 0.02(4) + 0.01(1000) = 9.11.

The mode, the most probable value, is −1-1. The median is also −1-1, because P(X≤−1)=0.97P(X \le -1) = 0.97 exceeds one half. Thus 97 percent of players lose their ticket price, while the mean is pulled upward by a rare large prize. A player who buys many tickets would see the total average approach 9.11 per ticket, so the expected value describes the long-run average of the game, not the typical result for any one player. The same gap between mean and median appears in any strongly skewed distribution, such as income or insurance claim sizes.

Limits of the interpretation

The expected value is not necessarily a value the variable can take. The mean of a fair die is 3.5, and no face shows that number. It also does not predict the outcome of any single trial: in the lottery above, a single ticket almost certainly loses. The law of large numbers concerns the average of many trials, and it does not imply that a run of losses will be offset by later gains. Deviations from the mean are not "repaid" by subsequent trials; they are simply diluted as nn increases. When the mean does not exist, as for the Cauchy distribution, the sample average does not stabilize at all, so the interpretation breaks down entirely.

Decisions, utility and paradoxes

As a decision criterion, expected value ranks options by their probability-weighted payoffs. In decision theory, an option with a higher expected gain is the default choice when stakes are small and a decision is repeated many times. The same reasoning underlies insurance pricing. An insurer that charges premiums above the expected cost of claims, after administrative costs, earns a margin across a large pool of policyholders, and the law of large numbers makes that margin dependable. An individual who buys cover pays more than the expected loss, because the purchase converts an uncertain large loss into a small certain cost. Assessing a bet works the same way. A wager that wins 100 with probability 0.5 and loses 80 with probability 0.5 has an expected return of +10, so it is favourable on average. A game with negative expected return loses money in the long run, which is why casino games are built with a house edge.

The St. Petersburg paradox shows the limits of this criterion. A fair coin is tossed until it first lands heads. If the first heads appears on toss n, the player receives 2^n units. Since P(n) = 2^(-n), each term of the expectation equals 1, so the sum is an infinite series of ones and the expected payoff diverges. Nicolas Bernoulli posed the problem in the early eighteenth century, and Daniel Bernoulli published an analysis in 1738 in the commentaries of the St. Petersburg Academy, which gave the game its name. Few people would pay more than a modest sum to play, which suggested that the expected monetary value was not the quantity people actually compare. Daniel Bernoulli's response was to evaluate the expected change in utility instead of money. He assumed that the increase in utility from a small gain is inversely proportional to current wealth, which integrates to a logarithmic utility function u(w) = ln w. Under this function the expected utility is finite and the implied fair price is modest. Gabriel Cramer had proposed a square-root utility in 1728. Later analyses showed that the paradox can be rebuilt for logarithmic utility when payoffs grow fast enough, so some treatments require bounded utility.

Expected utility theory generalizes this idea: a rational agent chooses the option that maximizes E[u(X)]E[u(X)] for some utility function u. Its modern axiomatic form was given by John von Neumann and Oskar Morgenstern in their 1944 work on game theory, whose axioms include completeness, transitivity, continuity and independence. These axioms guarantee that a utility function representing preferences exists. Risk aversion appears as concavity of u. By Jensen's inequality, E[u(X)]≤u(E[X])E[u(X)] \le u(E[X]) for concave u, so a person with such a utility function prefers a sure payment equal to the expected value of a gamble to the gamble itself. The gap between the two is a measure of risk aversion.

Experimental evidence has challenged expected utility as a descriptive model. In 1953 Maurice Allais described pairs of choices in which many respondents chose a certain option in the first pair and a risky option in the second. For instance, many people prefer a sure one million over a gamble with a 10% chance of five million and an 89% chance of one million, yet prefer a gamble with a 10% chance of five million over one with an 11% chance of one million. These choices violate the independence axiom, because adding the same common outcome to both options of each pair should not reverse a preference. Daniel Ellsberg's 1961 urn experiment produced a related violation, in which people prefer betting on a known-probability colour over an ambiguous one, a pattern now called ambiguity aversion. In response, Daniel Kahneman and Amos Tversky proposed prospect theory in 1979. It assesses outcomes as gains or losses relative to a reference point, uses a value function that is concave for gains, convex for losses and steeper for losses, and applies probability weights that overweight small probabilities and near-certain outcomes. Related formal models such as rank-dependent expected utility retain a single weighted average structure while changing how probabilities are transformed.

Linearity and indicator variables in combinatorics

Indicators turn counts into sums

An indicator variable is a random variable that takes the value 1 when an event AA occurs and 0 otherwise. Its expectation is E[IA]=P(A)E[I_A] = P(A), because the mean of a variable that is either 0 or 1 is just the probability of the 1. Any count can then be written as a sum of indicators. If XX counts how many of the events A1,…,AnA_1, \dots, A_n occur, then X=∑i=1nIAiX = \sum_{i=1}^{n} I_{A_i}, and linearity of expectation gives E[X]=∑i=1nP(Ai)E[X] = \sum_{i=1}^{n} P(A_i). The calculation requires only the individual probabilities. It does not require computing the distribution of XX, which for combinatorial counts is often intractable.

The fixed points of a random permutation

The standard illustration is the number of fixed points of a uniformly random permutation of {1,…,n}\{1, \dots, n\}, meaning elements that are sent to themselves. Let IiI_i indicate that element ii is fixed. Exactly (n−1)!(n-1)! of the n!n! permutations fix a given element, so P(Ii=1)=1/nP(I_i = 1) = 1/n. Summing over the nn elements gives n⋅1n=1n \cdot \tfrac{1}{n} = 1. The expected number of fixed points is therefore 1 for every nn. Direct enumeration over all n!n! permutations would be laborious, while the indicator argument takes a few lines.

The argument never uses the fact that the indicators IiI_i are dependent. If element 1 is fixed, the probability that element 2 is also fixed changes, but linearity does not care. This is the general point: linearity holds for any random variables, so dependence is irrelevant to the mean of a sum.

Dependent events and counting patterns

The same technique handles counts whose terms overlap. Consider the number of inversions in a random permutation, the pairs (i,j)(i, j) with i<ji < j whose order is reversed. Each pair is reversed with probability 1/2 by symmetry, and there are (n2)\binom{n}{2} pairs, so the expected count is (n2)/2\binom{n}{2}/2. Similarly, in a sequence of nn fair coin flips, the expected number of adjacent positions showing equal results is (n−1)/2(n-1)/2. The indicators for neighbouring positions are not independent, since they share a flip, yet the expectation is unaffected. Such calculations are typically far simpler than attempts to count the exact distribution of patterns.

The usual caution applies: linearity gives the mean of a sum, not the probability that the sum is positive. Showing that a count is zero with positive probability requires further arguments, which is where the probabilistic method comes in.

The probabilistic method and Ramsey graphs

The probabilistic method uses expectation to prove that an object with a desired property exists, without constructing it. The key step is the first-moment principle: if the expected number of "bad" configurations is less than 1, then some configuration has no bad features at all.

Paul Erdős applied this in 1947 to Ramsey numbers. The Ramsey number R(k)R(k) is the smallest nn such that every red–blue colouring of the edges of KnK_n contains a monochromatic complete subgraph on kk vertices. In a random colouring, a fixed set of kk vertices is monochromatic with probability 21−(k2)2^{1-\binom{k}{2}}. Summing over the (nk)\binom{n}{k} sets of kk vertices, the expected number of monochromatic kk-cliques is (nk)21−(k2)\binom{n}{k} 2^{1-\binom{k}{2}}. For nn around 2k/22^{k/2} and k≥3k \ge 3, this quantity falls below 1, so some colouring has no monochromatic kk-clique. This proves an exponential lower bound on R(k)R(k) without exhibiting such a colouring. The result is often regarded as the beginning of the probabilistic method, and it was for decades the main lower-bound technique for Ramsey numbers, with later refinements improving the bound only by constant factors.

The method is non-constructive in an essential way: it certifies existence while leaving the explicit object unknown. Later work by other mathematicians built on this approach, using the same basic idea of bounding the expected number of bad events. The method is developed further in the probabilistic method, and the counting tools used here rest on binomial coefficients and permutations.

Randomized algorithms and running time

For a randomized algorithm, the running time is itself a random variable, because the algorithm consumes random bits that determine which steps it takes. Its expected running time is the average over those internal random choices, with the input held fixed. This differs from the average-case analysis of a deterministic algorithm, which averages over a distribution of inputs. Because the randomness belongs to the algorithm, the expected cost on each input can be bounded without any assumption about how inputs are generated, so no fixed input can reliably force bad expected behaviour. The worst-case expected running time is the maximum, over all inputs, of this per-input expectation.

Randomized quicksort is the standard worked example. Its pivot is chosen uniformly at random from the current subarray. Let the sorted values be z1<⋯<znz_1 < \dots < z_n and let XX be the total number of comparisons. Define the indicator XijX_{ij} to be 1 when ziz_i and zjz_j are compared and 0 otherwise. Two values are compared exactly when the first pivot chosen from the range zi,…,zjz_i,\dots,z_j is one of them, which happens with probability 2/(j−i+1)2/(j-i+1). Linearity of expectation then gives

E[X]=∑i<j2j−i+1≤2n Hn,E[X] = \sum_{i<j} \frac{2}{j-i+1} \le 2n\,H_n,

where HnH_n is the nnth harmonic number. Since Hn∼ln⁡nH_n \sim \ln n, E[X]=O(nlog⁡n)E[X] = O(n \log n), and the total running time, which is O(n+X)O(n+X), is O(nlog⁡n)O(n \log n) in expectation. The argument needs no independence among the indicators, only linearity of expectation, which is why it works despite the strong dependence among comparisons.

Las Vegas and Monte Carlo algorithms are two classes distinguished by what the randomness affects. A Las Vegas algorithm always returns a correct answer, and only its running time is random, as in randomized quicksort. A Monte Carlo algorithm has a bounded running time but may return a wrong answer with small probability, as in Karger's randomized minimum-cut algorithm. The two classes are linked: a Las Vegas algorithm can be converted into a Monte Carlo algorithm by stopping it after a fixed time limit and outputting an arbitrary answer if it has not finished. Markov's inequality, which states that P(T≥t)≤E[T]/tP(T \ge t) \le E[T]/t for a nonnegative running time TT, bounds the probability of exceeding the limit by the expected running time, so the expectation controls the error rate of the converted algorithm.

Hash tables give the most widely used example. Under simple uniform hashing with separate chaining, where keys are placed independently and uniformly into mm slots, the load factor α=n/m\alpha = n/m is the average chain length. Successful and unsuccessful searches both take expected time Θ(1+α)\Theta(1+\alpha). Choosing the hash function at random from a universal family moves the analysis from assumptions about the data to properties of the random choice: two distinct keys collide with probability at most 1/m1/m. Summing over the other stored keys shows that the expected number of collisions with a fixed key is at most N/MN/M, where NN is the number of stored keys and MM the table size, so each lookup, insertion or deletion has expected constant cost when the table size is proportional to NN.

Amortized analysis complements these expectations. When a table grows, a single resize may cost Θ(n)\Theta(n) time, but doubling the capacity spreads that cost over the many cheap insertions that precede it, giving O(1)O(1) amortized cost per update. Amortized analysis averages over a sequence of operations rather than over random choices, and the two averages are often combined, as in an expected amortized cost for a randomized structure.

Conditional expectation and martingales

Definition and interpretation

For a random variable XX with E∣X∣<∞E|X|<\infty and a sub-σ-algebra G⊆F\mathcal G\subseteq\mathcal F, the conditional expectation E[X∣G]E[X\mid\mathcal G] is a random variable ZZ that is G\mathcal G-measurable, integrable, and satisfies

E[Z 1A]=E[X 1A]for every A∈G.E[Z\,\mathbf 1_A]=E[X\,\mathbf 1_A]\quad\text{for every } A\in\mathcal G.

Because ZZ is fixed only up to events of probability zero, the defining equalities hold almost surely. When G\mathcal G is generated by a discrete variable YY, the object reduces to E[X∣Y]=g(Y)E[X\mid Y]=g(Y), where g(y)=E[X∣Y=y]g(y)=E[X\mid Y=y] is computed from conditional probabilities. Its value is itself random, since it changes with YY.

Its central interpretation is as a prediction. Among all G\mathcal G-measurable variables WW with finite second moment, E[X∣G]E[X\mid\mathcal G] minimizes the mean-square error E[(X−W)2]E[(X-W)^2]. It is therefore the best mean-square predictor of XX given the information in G\mathcal G. The unconditional mean is the special case in which G\mathcal G is the trivial σ-algebra {∅,Ω}\{\varnothing,\Omega\}, where no information is available and the best constant predictor is E[X]E[X].

Core properties

  • Linearity and monotonicity carry over from ordinary expectation: E[aX+bY∣G]=aE[X∣G]+bE[Y∣G]E[aX+bY\mid\mathcal G]=aE[X\mid\mathcal G]+bE[Y\mid\mathcal G], and X≤YX\le Y implies E[X∣G]≤E[Y∣G]E[X\mid\mathcal G]\le E[Y\mid\mathcal G] almost surely.
  • Tower property. If H⊆G\mathcal H\subseteq\mathcal G, then
E[E[X∣G]∣H]=E[X∣H].E\big[E[X\mid\mathcal G]\mid\mathcal H\big]=E[X\mid\mathcal H].

Taking H\mathcal H to be trivial yields the law of total expectation, E[E[X∣G]]=E[X]E\big[E[X\mid\mathcal G]\big]=E[X]. Informally, coarser information cannot be recovered by averaging over finer information in a way that changes the forecast.

  • Pulling out known factors. If ZZ is G\mathcal G-measurable and XZXZ is integrable, then E[ZX∣G]=Z E[X∣G]E[ZX\mid\mathcal G]=Z\,E[X\mid\mathcal G].
  • Independence. If XX is independent of G\mathcal G, then E[X∣G]=E[X]E[X\mid\mathcal G]=E[X], since the information in G\mathcal G says nothing about XX.
  • Conditional Jensen inequality. For a convex function φ\varphi, φ(E[X∣G])≤E[φ(X)∣G]\varphi(E[X\mid\mathcal G])\le E[\varphi(X)\mid\mathcal G].

In this framework a σ-algebra represents the information available at a given time, and a larger σ-algebra represents finer information.

Martingales and optional stopping

A sequence (Mn)(M_n) adapted to a filtration (Fn)(\mathcal F_n) is a martingale if each MnM_n is integrable and

E[Mn+1∣Fn]=Mn.E[M_{n+1}\mid\mathcal F_n]=M_n.

Conditional on the history, the expected change in the process is zero, which is the sense in which a martingale models a fair game. Replacing the equality with ≥\ge or ≤\le gives a submartingale or supermartingale. For any integrable XX, the sequence Mn=E[X∣Fn]M_n=E[X\mid\mathcal F_n] is a martingale, which follows directly from the tower property.

A stopping time τ\tau is a random time whose event {τ≤n}\{\tau\le n\} is determined by information available up to time nn. The optional stopping theorem asserts that E[Mτ]=E[M0]E[M_\tau]=E[M_0] under suitable hypotheses, which include boundedness of τ\tau, boundedness of the martingale together with τ\tau being almost surely finite, or integrability of τ\tau together with bounded increments. The hypotheses cannot be dropped. In a fair coin game, a doubling strategy that stops at the first win yields a net gain of 1 with probability one, so the expected terminal value is 1 while the starting value is 0. Here the stopping time is unbounded and the martingale is not uniformly integrable, so the conclusion fails. The general statement is treated in optional stopping theorem and its companion concept, the stopping time.

Existence via the Radon–Nikodym theorem

The general definition requires a construction that does not rely on densities or elementary conditioning. For a nonnegative XX, define a measure on (Ω,G)(\Omega,\mathcal G) by Q(A)=E[X1A]Q(A)=E[X\mathbf 1_A], and then treat the general integrable case by splitting XX into its positive and negative parts. Since P(A)=0P(A)=0 implies Q(A)=0Q(A)=0 for A∈GA\in\mathcal G, QQ is absolutely continuous with respect to PP restricted to G\mathcal G. The Radon–Nikodym theorem then guarantees a G\mathcal G-measurable density Z=dQ/dPZ=dQ/dP, unique up to null sets, and this density is E[X∣G]E[X\mid\mathcal G]. The finiteness of PP ensures that the required σ-finiteness holds, so the construction applies in full generality on a probability space.

Estimation and statistics

The sample mean and bias

Let X1,…,XnX_1,\dots,X_n be observations of a variable with expected value μ\mu. The sample mean Xˉ=1n∑i=1nXi\bar X = \frac{1}{n}\sum_{i=1}^n X_i is the natural estimator of μ\mu. Applying linearity to the sum gives E[Xˉ]=μE[\bar X]=\mu for every nn, so the sample mean is an unbiased estimator. Formally, the expectation of the sample mean is computed by pulling the expectation inside the sum and reducing it to E[X]E[X].

An estimator θ^\hat\theta of a parameter θ\theta has bias Bias⁡(θ^)=E[θ^]−θ\operatorname{Bias}(\hat\theta)=E[\hat\theta]-\theta. An estimator whose expected value equals the parameter it estimates is called unbiased. In practical terms, repeating the estimation many times and averaging the results recovers the true value, and this holds at any sample size. Repeated estimation of the expectation value through the mean, on average, produces the correct value.

Unbiasedness is not automatic for every natural construction. If the variance is estimated by averaging squared deviations from Xˉ\bar X and dividing by nn, the expectation of that estimator is n−1nσ2\frac{n-1}{n}\sigma^2, so it systematically underestimates σ2\sigma^2. Dividing by n−1n-1 instead of nn yields an unbiased estimator of the variance, since the factor nn−1\frac{n}{n-1} corrects the shortfall. The intuition is that deviations measured from the sample mean rather than the true mean are smaller on average. Bias is one part of accuracy: the mean squared error splits into the variance of the estimator plus its squared bias.

Variance of the sample mean and standard error

When the observations are independent and share the same variance σ2\sigma^2, the variance of Xˉ\bar X works out to σ2/n\sigma^2/n. The spread of the estimate therefore shrinks as the sample grows, and its standard deviation shrinks at the rate 1/n1/\sqrt n. The standard deviation of an estimator is called its standard error. It is the standard deviation of the estimator and indicates how close one can expect the estimator to be to the parameter.

SE⁡(Xˉ)=σn\operatorname{SE}(\bar X)=\frac{\sigma}{\sqrt n}

The formula requires σ\sigma, which is usually unknown. Using the variance of the sample mean to gauge its accuracy therefore requires knowing the population variance, which is rarely available. In practice the sample standard deviation SS replaces σ\sigma, giving the estimated standard error S/nS/\sqrt n. Note that linearity alone delivers the mean of Xˉ\bar X; the σ2/n\sigma^2/n formula for the variance needs independence.

Method of moments

The method of moments is one of the oldest estimation techniques. Karl Pearson introduced it in 1894. For each positive integer kk, the population moment μk′=E[Xk]\mu_k'=E[X^k] is matched with the sample moment mk′=1n∑i=1nXikm_k'=\frac{1}{n}\sum_{i=1}^n X_i^k. The estimators are found by equating the first kk sample moments to the corresponding kk population moments and solving the resulting system of equations.

For an exponential distribution with rate λ\lambda, the first moment is E(X)=1/λE(X)=1/\lambda. Setting the sample mean equal to this population moment gives λ=1/m1\lambda = 1/m_1. Hence λ^=1/Xˉ\hat\lambda = 1/\bar X. For a normal distribution, the first two population moments are E(X)=μE(X)=\mu and E(X2)=μ2+σ2E(X^2)=\mu^2+\sigma^2. Matching these gives μ^=Xˉ\hat\mu=\bar X and σ^2=m2′−Xˉ2=1n∑i(Xi−Xˉ)2\hat\sigma^2 = m_2' - \bar X^2 = \frac{1}{n}\sum_i (X_i-\bar X)^2. This variance estimate is the divide-by-nn version discussed above, so method-of-moments estimators can be biased.

Posterior expectation and the central limit theorem

In Bayesian inference, the parameter is treated as random and described by a posterior distribution obtained from a prior and the data. Under squared error loss, the optimal estimator from a Bayesian viewpoint is the posterior mean. Changing the loss function changes the summary: the Bayes estimate under absolute error loss is the posterior median.

As an example, a binomial observation of 13 successes in 20 trials, combined with a suitable prior, yields a posterior that is a beta distribution with α=17\alpha=17 and β=11\beta=11. A Beta(α,β)(\alpha,\beta) variable has mean α/(α+β)\alpha/(\alpha+\beta). The posterior mean is therefore 17/28≈0.60717/28\approx 0.607, which serves as the point estimate of the success probability.

The central limit theorem describes the sampling distribution of Xˉ\bar X for large samples. Its distribution is approximately normal, centred at μ\mu, with variance σ2/n\sigma^2/n. This approximation is the basis for confidence intervals and tests that use the standard error, as well as for interpreting the uncertainty of sample-mean estimates in general.

Machine learning and optimization

Expected risk and empirical risk

In supervised learning, a predictor ff is scored by a loss function L(y,f(x))L(y, f(x)). Its expected risk is R(f)=E[L(Y,f(X))]R(f) = \mathbb{E}[L(Y, f(X))], the expectation taken over the joint distribution of inputs and labels. This quantity is also called the true risk or generalization error. Because the data-generating distribution is almost always unknown, the expectation cannot be computed directly. Learning therefore substitutes the empirical risk, the sample average of the loss over nn training examples:

R^(f)=1n∑i=1nL(yi,f(xi)).\hat R(f) = \frac{1}{n}\sum_{i=1}^{n} L(y_i, f(x_i)).

Each training loss is a draw from the same distribution, so this sample mean estimates the expected risk in the same way a sample mean estimates an expectation. Empirical risk minimization (ERM) selects the predictor that minimizes R^\hat R, using it as a proxy for the unreachable target.

Generalization gap and overfitting

The difference Δ(f)=R(f)−R^(f)\Delta(f) = R(f) - \hat R(f) is called the generalization gap, and the identity R(f)=R^(f)+Δ(f)R(f) = \hat R(f) + \Delta(f) holds by definition. Minimizing the empirical risk therefore controls the true risk only if the gap stays small. Predictors are usually better on examples they have seen than on new ones, so the gap is typically positive.

The gap is the formal side of overfitting. A model that memorizes its training set can drive R^\hat R close to zero while its performance on unseen data stays poor. In the classical picture, increasing model complexity first lowers both the empirical and the expected risk, and beyond some point the expected risk rises again while the empirical risk keeps falling. Practitioners estimate the true risk with a held-out test set, whose average loss is another sample mean. The trade-off between fitting the sample and generalizing from it is discussed in the bias–variance trade-off and in generalization theory.

Stochastic gradient descent

Minimizing the empirical risk by gradient descent requires the gradient of the average loss, which is the average of the per-example gradients. Computing it means touching the whole dataset at every step, which is impractical for large datasets. Stochastic gradient descent (SGD) instead draws one example ii uniformly at random and uses ∇ℓi(θ)\nabla \ell_i(\theta) as the update direction. Because the draw is uniform, the expected value of this gradient equals the full gradient, E[∇ℓi(θ)]=∇R(θ)\mathbb{E}[\nabla \ell_i(\theta)] = \nabla R(\theta), so the estimate is unbiased even though each individual step is noisy.

Mini-batch SGD uses a random subset BB of mm examples and the averaged gradient gB(θ)=1m∑i∈B∇ℓi(θ)g_B(\theta) = \frac{1}{m}\sum_{i \in B}\nabla \ell_i(\theta). It remains unbiased, while its variance falls in proportion to 1/m1/m. The practical trade-off is between cost per step and gradient noise: a larger batch gives a more accurate direction but requires more computation. Because the noise has mean zero, it cancels over many iterations; convergence analyses typically require step sizes whose sum diverges while the sum of their squares stays finite. Mini-batch sizes in common use range from tens to a few hundred examples.

Expected return in reinforcement learning

In reinforcement-learning, an agent acts in an environment and receives rewards. The discounted return from time tt is Gt=Rt+1+γRt+2+γ2Rt+3+⋯G_t = R_{t+1} + \gamma R_{t+2} + \gamma^2 R_{t+3} + \cdots, where the discount factor γ\gamma lies between 0 and 1. The return satisfies the recursion Gt=Rt+1+γGt+1G_t = R_{t+1} + \gamma G_{t+1}. The state-value function is the expected return under a policy π\pi from a given state: vπ(s)=Eπ[Gt∣St=s]v_\pi(s) = \mathbb{E}_\pi[G_t \mid S_t = s].

Taking expectations of the recursion gives the Bellman expectation equation:

vπ(s)=∑aπ(a∣s)∑s′,rp(s′,r∣s,a) [r+γ vπ(s′)].v_\pi(s) = \sum_a \pi(a \mid s) \sum_{s', r} p(s', r \mid s, a)\,\bigl[r + \gamma\, v_\pi(s')\bigr].

The value of a state is thus the expected immediate reward plus the discounted expected value of the successor state. The equation relates values across neighboring states and turns a long-horizon problem into a one-step consistency condition. For optimal behavior, the Bellman optimality equation replaces the policy average with a maximum over actions, Q∗(s,a)=E[Rt+1+γmax⁡a′Q∗(St+1,a′)∣St=s,At=a]Q^*(s,a) = \mathbb{E}[R_{t+1} + \gamma \max_{a'} Q^*(S_{t+1}, a') \mid S_t = s, A_t = a]. Value iteration and policy evaluation use these equations to compute values, and Monte Carlo methods estimate them by averaging sampled returns.

Expectation values in physics

Quantum expectation values and the Born rule

In quantum mechanics a measurable quantity is represented by a self-adjoint operator A^\hat A acting on a hilbert-space of states. For a pure state described by a wave-function ψ\psi normalized so that ⟨ψ∣ψ⟩=1\langle\psi|\psi\rangle = 1, the expectation value is

⟨A⟩=⟨ψ∣A^∣ψ⟩.\langle A\rangle = \langle \psi | \hat A | \psi \rangle .

For a mixed state with density operator ρ\rho, the same quantity is Tr(ρA^)\mathrm{Tr}(\rho\hat A). If A^\hat A has eigenvalues aia_i with eigenprojectors PiP_i, then ⟨A⟩=∑iai⟨ψ∣Pi∣ψ⟩\langle A\rangle = \sum_i a_i \langle\psi|P_i|\psi\rangle. This is a probability-weighted average of the possible measurement values, where the weights are the probabilities assigned by the Born rule. In the nondegenerate case, the weight of outcome aia_i is ∣⟨ai∣ψ⟩∣2|\langle a_i|\psi\rangle|^2. The expectation value therefore has the same algebraic form as the expected value of a random-variable with a discrete distribution, but the distribution itself is fixed by the state and the operator.

Quantum and classical averages differ in origin

In classical statistical physics, an expectation value averages over a probability distribution that reflects incomplete knowledge. Each system has definite values of position and momentum, and the averaging compensates for not knowing which values apply. In quantum theory the state vector is treated as the complete description of the system, so the randomness is not attributed to ignorance of the initial state. Instead, it arises when a measurement is made.

This distinction has consequences for interpretation. Some authors stress that the quantum expectation is a formal quantity with a meaning that does not depend on any interpretation, and that the statement linking it to measurement results is a separate assumption.Note that the q-expectation value has a formal meaning independent of the interpretation; the measured expectation form of Born's rule just asserts that measurements result in a random variable whose expectation agrees with the formal q-expectation. In quantum statistical mechanics, where analyses often proceed without any explicit measurement, the expectation values that appear are usually treated as formal expressions.One usually makes a theoretical analysis of quantum processes where no actual measurement is made before the process is completed.

Ehrenfest's theorem

Paul Ehrenfest showed in 1927 that expectation values of position and momentum obey equations with the same form as classical motion. For a particle with Hamiltonian H=p2/2m+V(x)H = p^2/2m + V(x), the result reads

d⟨x⟩dt=⟨p⟩m,d⟨p⟩dt=−⟨dVdx⟩.\frac{d\langle x\rangle}{dt} = \frac{\langle p\rangle}{m}, \qquad \frac{d\langle p\rangle}{dt} = -\left\langle \frac{dV}{dx} \right\rangle .

The first equation is the quantum analogue of the velocity relation, and the second is an analogue of Newton's second law. However, the theorem does not say that the expected position follows a classical trajectory in general. The force term is the expectation of −dV/dx-dV/dx, not the force evaluated at the expected position, so in general ⟨V′(x)⟩≠V′(⟨x⟩)\langle V'(x)\rangle \neq V'(\langle x\rangle). The gap between these two quantities is controlled by the spread of the wave packet. The statement is exact for a harmonic oscillator, where the force is linear, and it is approximately valid when the wave function is strongly localized. The approximation's dependence on the spread of the wave packet is noted in a standard treatment of the theorem.For general systems, if the wave function is highly concentrated around a point, then the expected position and expected momentum will be almost the same, since both will be approximately equal to that point.

Ensemble averages in statistical mechanics

In statistical mechanics, a system held at fixed temperature TT by a heat reservoir is described by the canonical ensemble. Each microstate ii with energy EiE_i has probability

pi=e−βEiZ,β=1kBT,Z=∑ie−βEi,p_i = \frac{e^{-\beta E_i}}{Z}, \qquad \beta = \frac{1}{k_{\mathrm B} T}, \qquad Z = \sum_i e^{-\beta E_i},

where ZZ is the partition-function. The average energy is the expectation of the Hamiltonian over this distribution, ⟨E⟩=∑iEipi\langle E\rangle = \sum_i E_i p_i. It can be obtained from ZZ alone by differentiation:

⟨E⟩=−∂ln⁡Z∂β.\langle E\rangle = -\frac{\partial \ln Z}{\partial \beta} .

This derivative relation is the practical reason the partition function is central. Once ZZ is known as a function of temperature, the average energy, and from it other thermodynamic quantities, follow without summing over individual states. The average energy in this setting coincides with the internal-energy of the system. The energy itself is not fixed in the canonical ensemble, so its fluctuations are also measured by a variance, given by ⟨E2⟩−⟨E⟩2\langle E^2\rangle - \langle E\rangle^2.

These ensemble averages, like the quantum expectation values above, are probability-weighted means. The difference lies in the source of the weights: in the canonical ensemble they come from the boltzmann-distribution and thermal equilibrium, and in quantum theory they come from the Born rule applied to a state.

References

  1. Properties of Expected Value - GeeksforGeeksgeeksforgeeks.org
  2. Random Variables COS 341 Fall 2002, lecture 21cs.princeton.edu
  3. Variance 3.3.1 Linearity of Expectation with Indicator RVsweb.stanford.edu
  4. 6.2: Variance of Discrete Random Variables - Statistics LibreTextsstats.libretexts.org
  5. Foundations of Vector Retrievalarxiv.org
  6. Covarianceen.wikipedia.org
  7. Expected valueen.wikipedia.org
  8. Theory of Probability. A Historical Essayarxiv.org
  9. Chance Combinatorics: The Theory that History Forgot John D. Nortonsites.pitt.edu
  10. Theory of Probability. An Elementary Treatise against a Historical Backgroundarxiv.org
  11. Expected values (mathematical concept)ebsco.com
  12. Reading Theorie Analytique des Probabilitesarxiv.org
  13. Definition:Expectation - ProofWikiproofwiki.org
  14. Expected value - Wikiwandwikiwand.com
  15. Expected Value Formula: E(X) = Σx·P(x) — Definition, Examples & Calculatorstatisticsfundamentals.com
  16. Faith Believes, Hope Expects: The Impact of Calvin's Theology on the Mathematics of Chancearxiv.org
  17. Weak and Strong Law of Large Numbersdavidbieber.com
  18. 275A, Notes 3: The weak and strong law of large numbersterrytao.wordpress.com
  19. Law of Large Numbersstatlect.com
  20. The Laws of Large Numbers Compared Tom Verhoeff July 1993 1 Introductiondklevine.com
  21. St. Petersburg paradoxen.wikipedia.org
  22. The St. Petersburg Paradox (Stanford Encyclopedia of Philosophy)plato.stanford.edu
  23. Utility assessmenten.wikipedia.org
  24. The Saint Petersburg Paradox and Its Solution[v1]preprints.org
  25. The time resolution of the St Petersburg paradoxroyalsocietypublishing.org
  26. Exploring the Allais Paradox in Microeconomic Theoryumbrex.com
  27. A Contextual Risk Model for the Ellsberg Paradoxarxiv.org
  28. Paradoxes and violations of normative decision theory Titlecalhoun.nps.edu
  29. Chapter 6 Alternatives to Expected Utility Theoryocw.mit.edu
  30. 13 Challenges to Expected Utilityjonathanweisberg.org
  31. Expected number of fixed points of permutation equals one - Grouppropsgroupprops.subwiki.org
  32. Expected Value and Linearity of Expectation - Probability for Quant Interviewsdatainterview.com
  33. MITOCWocw.mit.edu
  34. Combinatorics/Bounds for Ramsey numbers - Wikibooks, open books for an open worlden.wikibooks.org
  35. Upper bounds on diagonal Ramsey numbers [after Campos, Griffiths, Morris, and Sahasrabudhe]arxiv.org
  36. An exponential improvement for diagonal Ramseyarxiv.org
  37. Packing nearly optimal Ramsey R(3,t) graphsarxiv.org
  38. Examples in probability: Ramsey numbers and the prhomepages.inf.ed.ac.uk
  39. Randomized Algorithms Part Twoweb.stanford.edu
  40. Lecture 3 Probabilistic Analysis and Randomized Quicksort 3.1 Overviewcs.cmu.edu
  41. Randomized algorithmen.wikipedia.org
  42. Las Vegas algorithmen.wikipedia.org
  43. Lecture 10 Universal and Perfect Hashing 10.1 Overviewcs.cmu.edu
  44. GitHub - smilank3/hashing_with_chaining · GitHubgithub.com
  45. Universal Hash Function - an overviewsciencedirect.com
  46. Introduction to Randomness and Statisticsarxiv.org
  47. Unbiased Estimator - an overviewsciencedirect.com
  48. 7.2: Sample Variance - Statistics LibreTextsstats.libretexts.org
  49. Moment Estimator - an overviewsciencedirect.com
  50. Chapter 9 Method of Moments, Maximum Likelihood Estimator (Lecture on 01/28/2020)bookdown.org
  51. Method of Moments - GeeksforGeeksgeeksforgeeks.org
  52. The Bayesian Way: Uncertainty, Learning, and Statistical Reasoningarxiv.org
  53. Squared Error Loss Function - an overviewsciencedirect.com
  54. 1 Estimating the uncertainty attached to a sample mean: s2 ...web.stanford.edu
  55. 8 Estimation 8.1 Introductionarchive.math.arizona.edu
  56. Estimation of the variancestatlect.com
  57. Efficiency (statistics)en.wikipedia.org
  58. Bayesian Estimate - an overviewsciencedirect.com
  59. Predicting the generalization gap in neural networks using topological data analysisarxiv.org
  60. 2.4 Generalization Error and Empirical Risk Minimizationinformit.com
  61. Patterns, predictions, and actions: A story about machine learningarxiv.org
  62. Generalizationmlstory.org
  63. Alice's Adventures in a Differentiable Wonderland -- Volume I, A Tour of the Landarxiv.org
  64. Learn Risk Minimization: Expected vs Empirical Riskcodefinity.com
  65. Stochastic Gradient Descent: Theory, Numerical Examples, and Implementationekbanaml.github.io
  66. Understanding Stochastic Gradient Descent: Estimating the Gradient from a Samplestatology.org
  67. 2/27 16.1 Stochastic gradient descent 16.2 SGD for Risk ...web.stanford.edu
  68. Gradient Descent with Stochastic Subspaces via Persistence of Memoryarxiv.org
  69. A Distributional Perspective on Reinforcement Learningarxiv.org
  70. An Introduction to Deep Reinforcement and Imitation Learningarxiv.org
  71. Deep Reinforcement Learning: From First Principles to Reasoning Modelsarxiv.org
  72. Reinforcement Learning Part 4: Expected Return, Value Functions, and Bellman Equations - Shawn Hymelshawnhymel.com
  73. Foundations of quantum physics I. A critique of the traditionarxiv.org
  74. The Born Rule—100 Years Ago and Today - PMCpmc.ncbi.nlm.nih.gov
  75. Ehrenfest theoremen.wikipedia.org
  76. Measurement in quantum mechanicsen.wikipedia.org
  77. Unifying Quantum and Classical Dynamicsarxiv.org
  78. Ehrenfest's Theoremmaths.dur.ac.uk
  79. 17.3: The Average Ensemble Energy is Equal to the Observed Energy of a System - Chemistry LibreTextschem.libretexts.org
  80. Canonical Ensemble - an overviewsciencedirect.com
  81. Partition function (statistical mechanics)en.wikipedia.org