Let \(X_1,X_2,\ldots ,X_n\) and \(Y_1,Y_2,\ldots ,Y_m\) be independent, identically distributed random variables with a common continuous distribution function. Compute the expected value and the variance of \[ Z=\sum _{1\leq i\leq n}\sum _{1\leq j\leq n} I\{X_i\leq Y_j\}. \]
where \(I\{A\}\) denotes the indicator function of the event \(A\).