Appearance
Expectation
The expected value of random variable is defined as
It is easy to check that
where the notation is defined as . Since we consider a finite sample space, the range of is always finite. Denote by and the minimum and maximum values in respectively.
Example 40
It is easy to check that . This is simply because for every , we have , so
Theorem 41 (Additivity of expectation)
Let and be random variables. Then
Exercise 107 (Linearity of expectation)
If are real numbers and are random variables, then
The indicator variable of event is a random variable that takes values, i.e., such that
In other words, this is the (random) predicate indicating whether . It is easy to check that the expected value of an indicator variable is the probability of (do you see why?).
Indicator variables play a central role in probability.
Exercise 108
Prove: Every random variable can be written as a linear combination of indicator variables.
Example 41
Let where is an indicator random variable for event . Therefore, . This just follows from the linearity of expectation.
Example 42
In a random graph probability space , calculate the expected number of edges.
Proof:
Let be the number of edges. So we can write as a sum of the pairs where is an indicator of whether there is an edge connecting and . That is, . By the linearity of expectation:
Exercise 109
Calculate the following expectations for the probability space (see Coin tossing).
- The number of heads.
- The number of runs of consecutive heads (e.g., has 3 runs of consecutive heads).
Exercise 110
Calculate the expected number of Hamiltonian cycles (contain every vertex) in a random graph.