Expected value E[X]=∑xp(x) (discrete) or E[X]=∫xf(x)dx (continuous) is the long-run average. Linearity of expectation: E[aX+b]=aE[X]+b. For independent variables, E[XY]=E[X]E[Y]. Expected value is the center of a distribution.
Expected value formalizes a simple intuition: if you repeat an experiment many times, what value will the outcomes average to? You already know, from probability mass functions, that a random variable assigns a probability to each possible outcome. Expected value weights each outcome by its probability and sums the results: E[X] = ∑ x · p(x). For a fair six-sided die, that is (1)(1/6) + (2)(1/6) + ... + (6)(1/6) = 3.5. Notice that 3.5 is not a possible outcome — expected value is a property of the distribution, not a prediction about any single trial.
The most important property of expected value is linearity. If you scale a random variable by a constant a and shift it by b, the expected value scales and shifts the same way: E[aX + b] = aE[X] + b. More powerfully, E[X + Y] = E[X] + E[Y] for *any* X and Y — no independence assumption required. This lets you decompose complicated sums into manageable pieces. For example, the expected number of heads in 10 fair coin flips can be computed as the sum of 10 simple expectations (each 1/2), giving E = 5, without reasoning about the joint distribution at all.
Independence matters for products, not sums. The product rule E[XY] = E[X]E[Y] holds only when X and Y are independent. If they are correlated — say X is the temperature and Y is ice cream sales — then the product expectation will differ from the product of the expectations. Distinguishing where independence is required versus where it is not is a recurring source of errors.
Expected value is the first moment of a distribution and represents its center of mass. It is closely related to variance (the second central moment), which measures spread around the expected value. Understanding expected value deeply — especially linearity — is the foundation for almost everything in probability theory, statistics, and decision-making under uncertainty.