Expectation
For a random variable
,
the expectation is
where
is the probability mass function (PMF) and
is the probability density function (PDF).
The expectation is the weighted average of all possible outcomes,
where the weight is the probability of that outcome happening.
For a function
,
the expectation of
is
Example
is the outcome of a fair coin flip,
,
.
For a function
,
,
.
Then
.
Properties For a constant
,
we have that
Multivariate expectation
For multiple random variables
and a function
,
the expectation is
Similarly, for constants
,
,
Linearity of expectation For any two random
variables
and
,
This rule holds true regardless of whether
and
are independent or completely dependent. Dependency affects variance,
but it never breaks the linearity of expectation.
Independent scenario: flip two fair coins, let
if Coin 1 = H, let
if Coin 2 = H.
and
.
.
Dependent scenario: Flip one fair coin, but count its result
twice. Let
if the coin is Heads, and let
.
and
.
.