Rules that simplify calculations
Expectation is linear: E[aX+bY] = aE[X]+bE[Y], whether or not X and Y are independent. Variance is different: Var(X+Y) = Var(X)+Var(Y)+2Cov(X,Y). Only when covariance is zero does it reduce to the sum of variances; independence is sufficient but not necessary. See covariance and correlation.
Variance is measured in squared units, while standard deviation returns to the original units. The mean, variance, and standard deviation lesson shows how these summaries are calculated from data.
Calculate the mean and spread of a distribution
For a fair die, each result 1 through 6 has probability 1/6. The expectation is (1+2+3+4+5+6)/6=3.5. To calculate variance, find each result's distance from 3.5, square those distances, and average: Var(X)=[(−2.5)²+(−1.5)²+(−0.5)²+(0.5)²+(1.5)²+(2.5)²]/6=35/12. The standard deviation is √(35/12), about 1.71. A single roll remains an integer; expectation is a distribution average, not a prediction of one roll.
Expanding the squared deviation gives the shortcut Var(X)=E[X²]−(E[X])². For aX+b, the expectation is aE[X]+b, while variance is a²Var(X): shifting every result leaves spread unchanged, and scaling results by a multiplies variance by a². For sums, Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y), so variances add directly only when covariance is zero. Independence is sufficient for zero covariance when moments exist, but it is not necessary. These distinctions prevent an incorrect assumption that all random variables in a sum are independent.
Try this above
Change the probability assigned to each outcome. Watch the mean move and compare the spread with the distribution’s shape.
For a continuous random variable, replace the probability-weighted sum with an integral against the probability density: E[X]=∫x f(x)dx, when the integral exists. The same idea applies: outcomes with more probability contribute more to the average. Variance is finite only when the second moment exists. Some heavy-tailed distributions have a defined mean but infinite variance, so standard-deviation-based summaries and the usual central limit theorem may fail. Check existence conditions before applying algebraic rules to an unusual distribution.
For independent X and Y, covariance is zero and Var(X+Y)=Var(X)+Var(Y). If they are perfectly positively related, the covariance term increases the sum's variance; if they tend to move oppositely, it can reduce it. For example, adding two measurements from the same process is not equivalent to adding two independent outcomes. Check the dependence structure before applying the shortcut. The expectation's linearity is more general: E[X+Y]=E[X]+E[Y] does not require independence, which is a useful contrast to variance.