Let x1 < x2 < · · · < xn (with n ≥ 2) and let S be the set of all the xi
. Let T be a
randomly chosen subset of S. What is the expected value of the indexed alternating sum of
T? Express your answer in terms of the xi
.
Note: We define the indexed alternating sum of T as
X
|T|
i=1
(−1)i+1(i)T[i],
where T[i] is the ith element of T when listed in increasing order. For example, if T = {1, 3, 5}
then the indexed alternating sum of T is
1 · 1 − 2 · 3 + 3 · 5 = 10.
Alternating sums of empty sets are defined to be 0.
Assistant
To solve this problem, let's compute the expected value (E) of the indexed alternating sum for a randomly chosen subset (T) of (S = { x_1, x_2, \ldots, x_n }) where (x_1 < x_2 < \ldots < x_n).
First, note that the events of including each (x_i) in (T) are independent with probability (1/2). The position (k) of (x_i) in (T) (if included) is determined by the number of elements less than (x_i) included in (T).
Define (N_{<i}) as the number of elements among (x_1, x_2, \ldots, x_{i-1}) included in (T). (N_{<i}) follows a binomial distribution (\text{Bin}(i-1, 1/2)). The position of (x_i) in (T) (if it's included) is (k = N_{<i} + 1). The contribution of (x_i) to the sum is then:
[
\text{Contribution of } x_i = (-1)^{k+1} k x_i = (-1)^{N_{<i}+2} (N_{<i}+1) x_i = (-1)^{N_{<i}} (N_{<i}+1) x_i
]
We need to compute (E[\text{Contribution of } x_i]):
[
E[\text{Contribution of } x_i] = x_i \cdot E[(-1)^{N_{<i}} (N_{<i}+1)] \cdot P(x_i \text{ is included})
]
Since (P(x_i \text{ is included}) = 1/2), we have:
[
E[\text{Contribution of } x_i] = \frac{x_i}{2} \cdot E[(-1)^{N_{<i}} (N_{<i}+1)]
]
Now, we compute (E[(-1)^{N_{<i}} (N_{<i}+1)]). For (i = 1), (N_{<1} = 0), so (E[(-1)^{N_{<1}} (N_{<1}+1)] = 1). For (i \geq 2), (N_{<i}) can take values from (0) to (i-1), but because of the alternating sign and the symmetry of the binomial distribution, the expected value becomes zero for (i \geq 3).
So, we find:
[
E[\text{Contribution of } x_1] = \frac{1}{2} x_1
]
[
E[\text{Contribution of } x_2] = \frac{x_2}{2} \cdot \left( -\frac{1}{2} \right) = -\frac{1}{4} x_2
]
[
E[\text{Contribution of } x_i] = 0 \text{ for } i \geq 3
]
Therefore, the overall expected value is:
[
E = E[\text{Contribution of } x_1] + E[\text{Contribution of } x_2] + \sum_{i=3}^n E[\text{Contribution of } x_i] = \frac{1}{2} x_1 - \frac{1}{4} x_2
]
Answer: An explicit expression: Expected value = (½) x₁ minus (¼) x₂; that is,
E = (½)x₁ – (¼)x₂.