linearity of expectation
Of all the rules in probability, this is the one that feels almost too good to be true. It says you can pull expectation through sums and constant multiples, freely, and — astonishingly — you do not need the pieces to be independent. Whenever a quantity can be broken into a sum, its expectation is just the sum of the expectations.
Precisely: E[aX + bY] = a E[X] + b E[Y] for any constants a, b and any random variables X, Y, and this extends to any number of terms. The miracle is the part most people misremember: it holds even when X and Y are heavily dependent. Why? Because expectation is built from a sum (or integral), and you can always reorder a sum; dependence affects HOW X and Y move together, but reordering a sum of weighted values never asks about that. (Variance and products are a different story — there independence really does matter.)
This is the secret weapon for hard counting problems, because you almost never need the full distribution. Want the expected number of fixed points in a random shuffle, or the expected number of empty bins, or expected matches in a deck? Write the count as a sum of simple yes/no indicator variables, take the expectation of each one (each is just a probability), and add. The dependencies among the indicators — and there usually are nasty ones — are completely ignored. That is the indicator-variable trick, and linearity is what makes it legal.
Roll two dice; let S be the sum. Even though the two dice combine in non-trivial ways, E[S] = E[die1] + E[die2] = 3.5 + 3.5 = 7. And if you bizarrely glued them so both always show the same face (totally dependent), E[S] is still E[X] + E[X] = 7. Linearity does not care.
Expectation of a sum is the sum of expectations — even for dependent variables.
Independence is NOT required for linearity of expectation — that is its whole power. Independence is only needed for E[XY] = E[X]E[Y] and for variances to add.