Prove that $\mathbb E [T_n(x) ~ T_n(y)] = nF_X(x) + n(n - 1)F_X(x)F_X(y)$, for $xLet $X_1, \cdots,X_n $ be iid random variables with distribution $F. T_n(x)$ denotes the number of elements $\le x; x \in \mathbb R$. Prove that $\mathbb E [T_n(x) ~ T_n(y)] = nF_X(x) + n(n - 1)F_X(x)F_X(y)$, for $x<y.$
Attempt
Let $j = T_n(y) ,i = T_n(x)$. Then
$\mathbb E [T_n(x) ~ T_n(y)] = \sum_{j = 0}^n ~\sum_{i = 0} ^j ~ ^jC_i~ [F_X(x)]^i [F_X(y) - F_X(x)]^{j-i} \cdot j \cdot i$
$= \sum_{j = 0}^n j \cdot [F_X(y) - F_X(x)]^{j}~~\sum_{i = 0} ^j ~ ^jC_i~ \dfrac {[F_X(x)]^i} {[F_X(y) - F_X(x)]^{i}} \cdot i$
$= \sum_{j = 0}^n j^2 \cdot [F_X(y) - F_X(x)]^{j}~ \dfrac {[F_X(x)]} {[F_X(y) - F_X(x)]} ~~\sum_{i = 0} ^j ~ ^{j-1}C_{i-1}~ \dfrac {[F_X(x)]^{i-1}} {[F_X(y) - F_X(x)]^{i-1}}$
$= \sum_{j = 0}^n j^2 \cdot [F_X(y) - F_X(x)]^{j-1}~ {[F_X(x)]}~\sum_{i = 1} ^j ~ ^{j-1}C_{i-1}~ \dfrac {[F_X(x)]^{i-1}} {[F_X(y) - F_X(x)]^{i-1}}$
$= \sum_{j = 0}^n j^2 \cdot [F_X(y) - F_X(x)]^{j-1}~ {[F_X(x)]}~~\sum_{m = 0} ^{j-1} ~ ^{j-1}C_m~ \dfrac {[F_X(x)]^m} {[F_X(y) - F_X(x)]^m}$
$= \sum_{j = 0}^n j^2 \cdot [F_X(y) - F_X(x)]^{j-1}~ {[F_X(x)]}~\big( \dfrac {[F_X(x)]} {[F_X(y) - F_X(x)]} +1 \big)^{j-1}$
$= \sum_{j = 0}^n j^2 \cdot [F_X(y) - F_X(x)]^{j-1}~ {[F_X(x)]}~\big( \dfrac {[F_X(y)]} {[F_X(y) - F_X(x)]} \big)^{j-1}$
$= \sum_{j = 0}^n j^2 \cdot {[F_X(x)]}~{[F_X(y)]}^{j-1} $
$= \dfrac{F_X(x)}{F_X(y)}\sum_{j = 0}^n j^2 \cdot ~{[F_X(y)]}^{j} $
This doesn't lead to the result being proved. Could someone advise?

$\newcommand{\one}{\mathbf 1}$I think we can make this a lot easier with indicators. We can write $T_n(x)$ as
$$
T_n(x) = \sum_{i=1}^n \one_{X_i \leq x}
$$
(so $T_n(x) \sim \text{Binomial}(n, F(x))$ is just the unscaled empirical CDF). Then
$$
\text E[T(x)T(y)] = \text E\left[\sum_{ij} \one_{X_i \leq x} \one_{X_j \leq y}\right] = \sum_{ij} \text E[\one_{X_i \leq x} \one_{X_j \leq y}]
$$
by linearity. Since the $X_i$ are iid then when $i\neq j$ we'll have
$$
\text E[\one_{X_i \leq x} \one_{X_j \leq y}] = \text E[\one_{X_i \leq x}] \text E[\one_{X_j \leq y}] = F(x)F(y)
$$
and there will be $n(n-1)$ of these terms. There will also be $n$ terms for $i=j$ where we have
$$
\text E[\one_{X_i \leq x} \one_{X_i \leq y}] = \text E[\one_{X \leq \min\{x,y\}}] = F(x)
$$
since $x<y$ is assumed. All together this means
$$
\text E[T(x)T(y)] = n F(x) + n(n-1)F(x)F(y).
$$
