This function computes the two-sample Cramer-von Mises statistics U.
CramerVonMisesTwoSamples(S1, S2)
Vector containing the sample 1 from which CDF1 will be estimated.
Vector containing the sample 2 from which CDF2 will be estimated.
U: The value of the Cramer-von Mises statistics.
CDF1 and CDF2 are estimated empirically to compute the two-sample Cramer-von Mises statistics.
T.W. Anderson "On the distribution of the Two-sample Cramer-von Mises criterion". The Annals of Mathematical Statistics, 33 (3), 1148-1159 (1962).
P.-A. Michelangeli, M. Vrac, H. Loukos. "Probabilistic downscaling approaches: Application to wind cumulative distribution functions", Geophys. Res. Lett., doi:10.1029/2009GL038401, 2009.