I'm reading Introduction to Algorithms-Cormen, Leiserson, Rivest, Stein, Section 9.2 Selection in Expected linear time. Page-217
They have defined Indicator Random Variable $X_k$ as
$X_k$ = I {the subarray A[p..q] has exactly k elements}
and Random variable T(n) as
T(n) = the running time on an input array A[p..r] of n elements
then there is a para saying
For a given call of RANDOMIZED-SELECT, the indicator random variable $X_k$ has the value 1 for exactly one value of k, and it is 0 for all other k. When $X_k$ = 1, the two subarrays on which we might recurse have sizes k - 1 and n - k. Hence, we have the recurrence.
$T(n) \leq \sum_{k=1}^{n} X_k . (T(max(k-1, n-k))+O(n))$
$= \sum_{k=1}^{n} X_k . T(max(k-1, n-k))+O(n)$
I'm not getting how they have defined the above recurrence can anybody explain it to me.