Академический Документы
Профессиональный Документы
Культура Документы
5-2
Thus, E X D E D D " n X
i D1
Xi
# (linearity of expectation)
D 1; and so we expect that exactly 1 customer gets back his own hat. Note that this is a situation in which the indicator random variables are not independent. For example, if n D 2 and X1 D 1, then X2 must also equal 1. Conversely, if n D 2 and X1 D 0, then X2 must also equal 0. Despite the dependence, Pr fXi D 1g D 1=n for all i, and linearity of expectation holds. Thus, we can use the technique of indicator random variables even in the presence of dependence.
i D1 n X i D1
n X
E Xi 1=n
Xij :
iD1 j DiC1
We want the expected number of inverted pairs, so we take the expectation of both sides of the above equation to obtain "n 1 n # X X E X D E Xij :
iD1 j DiC1
n 1 n X X
n 1 X
E Xij
i D1 j Di C1
1=2
i D1 j Di C1
5-3
D D D
! n 1 2 2 n.n 2 n.n 1/ 1 2 1/ :
1/=4.